How to do it with headlesstrue Ask Question Asked 8 months ago Modified 8 months ago Viewed 89 times 1 The C statement that clicks the download button is: await frameContent2. at (ProcessStartInfo startInfo) at (ProcessStartInfo startInfo) at () at (LauncherBase p) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\States\ChromiumStartingState.cs:line 69 at (LaunchOptions options) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\Launcher.cs:line 61 at (LaunchOptions options) in C:\projects\puppeteer-sharp\lib\PuppeteerSharp\Launcher.cs:line 84 at .generatePDFAsync(String html) in C:_Projekte\AvidaCloud Dev CreateBooking\src\AvidaCloud.Domain\Services\Email\EmailService. PuppeteerSharp downloads a csv with headlessfalse. FROM microsoft/dotnet:2.2-runtime AS base RUN apt-get update -y RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc 6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3. Please see the application event log or use the command-line sxstrace.exe tool for more detail. puppeteer-core is intended to be a lightweight version of Puppeteer for launching an existing browser installation or for connecting to a remote one. The application has failed to start because its side-by-side configuration is incorrect. Var browserFetcher = new BrowserFetcher() Īwait using var browser = await Puppeteer.LaunchAsync(new LaunchOptions ) The Puppeteer package contains an entire Chromium browser bundled into the deployment. FROM microsoft/dotnet:2.2-runtime AS base RUN apt-get update -y RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1. NET runtime and version are you targeting E.g. Var encoding = įile.AppendAllText(Directory.GetCurrentDirectory() "\\Invoice.html", html, 8) Which version of PuppeteerSharp are you using 1.10 Which. The code is below : public async Task generatePDFAsync(string html) I am trying to create a functionality where I am converting a html string to pdf through byte.
0 Comments
Leave a Reply. |