{"id":21468972,"url":"https://github.com/sicos1977/chromiumhtmltopdf","last_synced_at":"2025-04-13T13:12:37.887Z","repository":{"id":41308844,"uuid":"97328832","full_name":"Sicos1977/ChromiumHtmlToPdf","owner":"Sicos1977","description":"Convert HTML to PDF with a Chromium based browser","archived":false,"fork":false,"pushed_at":"2025-04-03T14:38:01.000Z","size":3752,"stargazers_count":455,"open_issues_count":1,"forks_count":84,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-06T10:02:28.027Z","etag":null,"topics":["chrome","convert","edge","google","html","microsoft","pdf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sicos1977.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Sicos1977"]}},"created_at":"2017-07-15T16:38:28.000Z","updated_at":"2025-04-05T11:16:59.000Z","dependencies_parsed_at":"2023-10-13T08:32:49.259Z","dependency_job_id":"301620c2-15a6-487e-8492-757f6706b24c","html_url":"https://github.com/Sicos1977/ChromiumHtmlToPdf","commit_stats":null,"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sicos1977%2FChromiumHtmlToPdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sicos1977%2FChromiumHtmlToPdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sicos1977%2FChromiumHtmlToPdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sicos1977%2FChromiumHtmlToPdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sicos1977","download_url":"https://codeload.github.com/Sicos1977/ChromiumHtmlToPdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717237,"owners_count":21150389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome","convert","edge","google","html","microsoft","pdf"],"created_at":"2024-11-23T09:11:53.502Z","updated_at":"2025-04-13T13:12:37.866Z","avatar_url":"https://github.com/Sicos1977.png","language":"C#","funding_links":["https://github.com/sponsors/Sicos1977"],"categories":[],"sub_categories":[],"readme":"﻿ChromiumHtmlToPdf\n==============\n\n## What is ChromiumHtmlToPdf?\n\nChromiumHtmlToPdf is a 100% managed C# .NETStandard 2.0 library and .NET 8 console application (that also works on Linux and macOS) that can be used to convert HTML to PDF format with the use of Google Chromemium (Google Chrome and Microsoft Edge browser)\n\nFrom version 4.0 and up the library is now fully async but you can still use it without this if you want.\n\n## Why did I make this?\n\nI needed a replacement for wkHtmlToPdf, a great tool but the project is archived on GitHub and no new features are added anymore, also it's not 100% compatible with HTML5.\n\n## License Information\n\nChromiumHtmlToPdf is Copyright (C)2017-2025 Kees van Spelde (Magic-Sessions) and is licensed under the MIT license:\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in\n    all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n    THE SOFTWARE.\n\n## Installing via NuGet\n\n[![NuGet](https://img.shields.io/nuget/v/ChromeHtmlToPdf.svg?style=flat-square)](https://www.nuget.org/packages/ChromeHtmlToPdf)\n\nThe easiest way to install ChromiumHtmlToPdf is via NuGet (Yes I know the nuget package has another name, this is because there is already a package with the new name I used).\n\nIn Visual Studio's Package Manager Console, simply enter the following command:\n\n    Install-Package ChromeHtmlToPdf\n\n### Converting a file or url from code\n\n```csharp\nvar pageSettings = new PageSettings()\nusing (var converter = new Converter())\n{\n    converter.ConvertToPdf(new Uri(\"http://www.google.nl\"), @\"c:\\google.pdf\", pageSettings);\n}\n\n// Show the PDF\nSystem.Diagnostics.Process.Start(@\"c:\\google.pdf\");\n```\n\nor if you want to do it the async way\n\n```csharp\nvar pageSettings = new PageSettings()\nusing var converter = new Converter();\nawait converter.ConvertToPdfAsync(new Uri(\"http://www.google.nl\"), @\"c:\\google.pdf\", pageSettings);\n\n// Show the PDF\nSystem.Diagnostics.Process.Start(@\"c:\\google.pdf\");\n```\n\n### Enable extra logging when having weird issues with Chrome or Edge\n\nWhen Chromium exits unexpectedly it does this most of the time without giving a meaningfull error. \nWhen this is the case than try to turn on Chromium Debug logging to get extra information about why it crashes\n\n```c#\n/// \u003csummary\u003e\n///     Enables Chromium logging;\u003cbr/\u003e\n///     - The output will be saved to the file \u003cb\u003echrome_debug.log\u003c/b\u003e in Chrome's user data directory\u003cbr/\u003e\n///     - Logs are overwritten each time you restart chrome\u003cbr/\u003e\n/// \u003c/summary\u003e\n/// \u003cremarks\u003e\n///     If the environment variable CHROME_LOG_FILE is set, Chrome will write its debug log to its specified location.\u003cbr/\u003e\n///     Example: Setting CHROME_LOG_FILE to \"chrome_debug.log\" will cause the log file to be written to the Chrome process's\u003cbr/\u003e\n///     current working directory while setting it to \"D:\\chrome_debug.log\" will write the log to the root of your computer's D: drive.\n/// \u003c/remarks\u003e\npublic bool EnableChromiumLogging { get; set; }\n```\n\n### Converting from Internet Information Services (IIS)\n\n- Download Google Chrome or Microsoft Edge portable and extract it\n- Let your website run under the ApplicationPool identity\n- Copy the files to the same location as where your project exists on the webserver\n- Reference the ChromeHtmlToPdfLib.dll from your webproject\n- Call the converter.ConverToPdf method from code\n\nThats it.\n\nIf you get strange errors when starting Google Chrome or Microsoft Edge than this is due to the account that is used to run your site. I had a simular problem and solved it by hosting ChromiumHtmlToPdf in a Windows service and making calls to it with a WCF service.\n\n### Converting from the command line\n\n```\nChromiumHtmlToPdfConsole --input https://www.google.com --output c:\\google.pdf\n```\n![screenshot](https://github.com/Sicos1977/ChromiumHtmlToPdf/blob/master/console.png)\n\n### Console app exit codes\n\n0 = successful, 1 = an error occurred\n\nInstalling on Linux or macOS\n============================\n\n### Installing .NET\n\nSee this url about how to install .NET on Linux\n\nhttps://docs.microsoft.com/en-us/dotnet/core/install/linux\n\nAnd this url about how to install .NET on macOS\n\nhttps://docs.microsoft.com/en-us/dotnet/core/install/macos\n\n### Installing Chrome\n\nSee this url about how to install Chrome on Linux\n\nhttps://support.google.com/chrome/a/answer/9025903?hl=en\n\nAnd this url about how to install Chrome on macOS\n\nhttps://support.google.com/chrome/a/answer/7550274?hl=en\n\n### Example installing Chrome on Linux Ubuntu\n\n```\nwget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -\n\nsudo sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" \u003e\u003e /etc/apt/sources.list.d/google.list'\n\nsudo apt-get update\n\nsudo apt-get install google-chrome-stable\n\ngoogle-chrome --version\n\ngoogle-chrome --no-sandbox --user-data-dir\n```\n\nPre compiled binaries\n=====================\n\nYou can find pre compiled binaries for Windows, Linux and macOS over here\n\nLatest version (.net 8)\n---------------\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/4.3.2/ChromiumHtmlToPdf_4_3_2.zip\n\n.NET 8.0 for the console app\n---------------------------------\nThe console app needs .NET 8 to run, you can download this framework from here\n\nhttps://dotnet.microsoft.com/en-us/download/dotnet/8.0\n\nDocumentation\n-------------\n\nExample usage:\n    ChromiumHtmlToPdf --input https://www.google.nl --output c:\\google.pdf\n\n| **Option**                       | **Description**                                                                                                                                                                                                                                                       |\n|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `--input`                        | Required. The input content, URL, or file.                                                                                                                                                                                                                            |\n| `--input-is-list`                | Indicates `--input` is a list of URLs/files. Use `--output` for the location of converted files. Use `|` to specify an output file (e.g., `inputfile.html|myoutputfile.pdf`). Defaults to input file name if no output file is provided.                              |\n| `--output`                       | Required. The output file.                                                                                                                                                                                                                                           |\n| `--browser`                      | Required. Specifies the browser to use (default: Chrome or Edge).                                                                                                                                                                                                   |\n| `--landscape`                    | (Default: false) Sets paper orientation to landscape.                                                                                                                                                                                                               |\n| `--display-headerfooter`         | (Default: false) Displays header and footer.                                                                                                                                                                                                                        |\n| `--print-background`             | (Default: false) Prints background graphics.                                                                                                                                                                                                                        |\n| `--scale`                        | (Default: 1) Specifies the webpage rendering scale.                                                                                                                                                                                                                 |\n| `--paper-format`                 | (Default: Letter) Specifies paper format, overriding `--paper-width` and `--paper-height`. Valid values: Letter, Legal, Tabloid, Ledger, A0-A6, FitPageToContent.                                                                                                 |\n| `--paper-width`                  | (Default: 8.5) Sets paper width in inches.                                                                                                                                                                                                                          |\n| `--paper-height`                 | (Default: 11) Sets paper height in inches.                                                                                                                                                                                                                          |\n| `--no-margins`                   | Removes margins by enabling Chromium's `--no-margins` parameter.                                                                                                                                                                                                    |\n| `--window-size`                  | (Default: HD_1366_768) Specifies window size, overriding `--window-width` and `--window-height`. Valid values: SVGA, WSVGA, XGA, WXGA, FHD, 4K_UHD, etc.                                                                                                           |\n| `--window-width`                 | (Default: 1366) Specifies window width in pixels.                                                                                                                                                                                                                   |\n| `--window-height`                | (Default: 768) Specifies window height in pixels.                                                                                                                                                                                                                   |\n| `--user-agent`                   | Overrides default user-agent string for Chromium.                                                                                                                                                                                                                   |\n| `--margin-top`                   | (Default: 0.4) Top margin in inches.                                                                                                                                                                                                                                |\n| `--margin-bottom`                | (Default: 0.4) Bottom margin in inches.                                                                                                                                                                                                                             |\n| `--margin-left`                  | (Default: 0.4) Left margin in inches.                                                                                                                                                                                                                               |\n| `--margin-right`                 | (Default: 0.4) Right margin in inches.                                                                                                                                                                                                                              |\n| `--pageranges`                   | Specifies pages to print (e.g., '1-5, 8, 11-13').                                                                                                                                                                                                                   |\n| `--chromium-location`            | Specifies Chrome/Edge location. Defaults to executable folder or registry.                                                                                                                                                                                          |\n| `--chromium-userprofile`         | Specifies location for Chromium user profile.                                                                                                                                                                                                                       |\n| `--proxy-server`                 | Configures Chromium to use a custom proxy server.                                                                                                                                                                                                                   |\n| `--proxy-bypass-list`            | Specifies hosts to bypass proxy. Requires `--proxy-server`. Format: `*.google.com;*foo.com;127.0.0.1:8080`.                                                                                                                                                          |\n| `--proxy-pac-url`                | Specifies PAC file URL for proxy (e.g., `http://wpad/windows.pac`).                                                                                                                                                                                                  |\n| `--user`                         | Runs browser under a specific user (used with `--password`).                                                                                                                                                                                                        |\n| `--password`                     | Specifies password for `--user`.                                                                                                                                                                                                                                    |\n| `--tempfolder`                   | Specifies folder for temporary files.                                                                                                                                                                                                                               |\n| `--multi-threading`              | (Default: false) Enables multi-threading (requires `--input-is-list`).                                                                                                                                                                                              |\n| `--max-concurrency-level`        | (Default: 0) Limits concurrency level for multi-threading.                                                                                                                                                                                                          |\n| `--wait-for-window-status`       | Waits for `window.status` to match a string before conversion.                                                                                                                                                                                                      |\n| `--wait-for-window-status-timeout`| (Default: 60000) Timeout for `--wait-for-window-status`.                                                                                                                                                                                                            |\n| `--timeout`                      | Specifies timeout (ms) before aborting conversion.                                                                                                                                                                                                                  |\n| `--media-load-timeout`           | Specifies timeout (ms) for media load after DOM content is loaded.                                                                                                                                                                                                  |\n| `--pre-wrap-file-extensions`     | Wraps files in HTML `\u003cPRE\u003e` tags.                                                                                                                                                                                                                                   |\n| `--encoding`                     | Specifies encoding for `--input` file.                                                                                                                                                                                                                              |\n| `--image-resize`                 | (Default: false) Resizes images to fit page width.                                                                                                                                                                                                                  |\n| `--image-rotate`                 | (Default: false) Rotates images per EXIF data.                                                                                                                                                                                                                      |\n| `--image-load-timeout`           | (Default: 30000) Timeout for downloading images.                                                                                                                                                                                                                    |\n| `--sanitize-html`                | (Default: false) Removes HTML elements that could lead to XSS.                                                                                                                                                                                                     |\n| `--logfile`                      | Specifies log file (wildcards: `{PID}`, `{DATE}`, `{TIME}`).                                                                                                                                                                                                        |\n| `--run-javascript`               | Runs JavaScript after loading webpage but before PDF conversion.                                                                                                                                                                                                   |\n| `--url-blacklist`                | Blocks specified URLs (e.g., `*.google.com;*foo.com`).                                                                                                                                                                                                              |\n| `--snapshot`                     | Saves webpage snapshot as `.mhtml` alongside `.pdf`.                                                                                                                                                                                                                |\n| `--log-network-traffic`          | Enables logging of network traffic.                                                                                                                                                                                                                               |\n| `--disk-cache-disabled`          | (Default: false) Disables disk cache.                                                                                                                                                                                                                              |\n| `--disk-cache-directory`         | Specifies directory for disk cache.                                                                                                                                                                                                                                |\n| `--disk-cache-size`              | Specifies size of disk cache (MB).                                                                                                                                                                                                                                 |\n| `--web-socket-timeout`           | Specifies WebSocket timeout (ms).                                                                                                                                                                                                                                 |\n| `--wait-for-network-idle`        | Waits until network is idle before conversion.                                                                                                                                                                                                                      |\n| `--help`                         | Displays help information.                                                                                                                                                                                                                                         |\n| `--version`                      | Displays version information.                                                                                                                                                                                                                                     |\n| `--no-sandbox`                   | Never use a sandbox.                                                                                                                                                                                                                                     |\n| `-enable-chromium-logging`       | Enables Chromium logging; The output will be saved to the file chrome_debug.log in Chrome's user data directory. Logs are overwritten each time you restart Chromium.                                                                                                                                                                                                                                     |\n| `--disable-gpu`                   | Passes --disable-gpu to Chromium. This should be useful on common server hardware.                                                                                                                                                                                                                                     |\n| `--ignore-certificate-errors`                   | Passes --ignore-certificate-errors to Chromium. Useful when generating from internal web server.                                                                                                                                                                                                                                     |\n| `--disable-crash-reporter`                   | Passes --disable-crash-reporter and --no-crashpad to Chromium.                                                                                                                                                                                                                                     |\n\n\nOlder versions (.net core 3.1 - end of life)\n--------------\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/4.2.11/ChromiumHtmlToPdf_4_2_11.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/4.1.2/ChromiumHtmlToPdf_v4_0_2.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/4.0.1/ChromiumHtmlToPdf_v4_0_1.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/3.0.0/ChromiumHtmlToPdf_v3_0_0.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/2.6.5/ChromeHtmltoPdf_265.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/2.6.4/ChromeHtmlToPDF_264.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/2.6.0/ChromeHtmlToPDF_260.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/2.5.33/ChromeHtmlToPdf_253.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/2.5.1/ChromeHtmlToPdf_251.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/2.2/ChromeHtmlToPdf_220.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/2.1.6/ChromeHtmlToPdf_216.zip\nhttps://github.com/Sicos1977/ChromiumHtmlToPdf/releases/download/2.0.11/ChromeHtmlToPdf_211.zip\n\n.NET Core 3.1 for the console app (end of life)\n---------------------------------\nThe console app needs .NET Core 3.1 to run, you can download this framework from here\n\nhttps://dotnet.microsoft.com/en-us/download/dotnet/3.1\n\nInstalling it from scoop the package manager\n============================================\n\nSee this for more information about scoop --\u003e https://scoop.sh/#/\n\nJust run the command from any PowerShell window (thanks to https://github.com/arnos-stuff)\n\n```\nscoop install https://gist.githubusercontent.com/arnos-stuff/4f9b2d92d812b25d0ee8335c543cba78/raw/cfa861ab3078a20c69157ab45daf33f26005fd63/chrome-html-to-pdf.json\n```\n\nLogging\n=======\n\nFrom version 2.5.0 ChromiumHtmlToPdfLib uses the Microsoft ILogger interface (https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger?view=dotnet-plat-ext-5.0). You can use any logging library that uses this interface.\n\nChromiumHtmlToPdfLib has some build in loggers that can be found in the ```ChromiumHtmlToPdfLib.Logger``` namespace.\n\nFor example\n\n```csharp\nvar logger = !string.IsNullOrWhiteSpace(\u003csome logfile\u003e)\n                ? new ChromiumHtmlToPdfLib.Loggers.Stream(File.OpenWrite(\u003csome logfile\u003e))\n                : new ChromiumHtmlToPdfLib.Loggers.Console();\n```\n\nSetting a common Google Chrome or Microsoft Edge cache directory\n================================================================\n\nYou can not share a cache directory between a Google Chrome or Microsoft Edge instances because the first instance that is using the cache directory will lock it for its own use. The most efficient way to make optimal use of a cache directory is to create one for each instance that you are running.\n\nI'm using Google Chrome from a WCF service and used the class below to make optimal use of cache directories. The class will create an instance id that I use to create a cache directory for each running Chrome instance. When the instance shuts down the instance id is put back in a stack so that the next executing instance can use this directory again.\n\n```csharp\npublic static class InstanceId\n{\n    #region Fields\n    private static readonly ConcurrentStack\u003cstring\u003e ConcurrentStack;\n    #endregion\n\n    #region Constructor\n    static InstanceId()\n    {\n        ConcurrentStack = new ConcurrentStack\u003cstring\u003e();\n\n        for(var i = 100000; i \u003e 0; i--)\n            ConcurrentStack.Push(i.ToString().PadLeft(6, '0'));\n    }\n    #endregion\n\n    #region Pop\n    /// \u003csummary\u003e\n    /// Returns an instance id and pops it from the \u003csee cref=\"ConcurrentStack\"/\u003e\n    /// \u003c/summary\u003e\n    /// \u003creturns\u003e\u003c/returns\u003e\n    public static string Pop()\n    {\n        if (ConcurrentStack.TryPop(out var instanceId))\n            return instanceId;\n\n        throw new Exception(\"Instance id stack is empty\");\n    }\n    #endregion\n\n    #region Push\n    /// \u003csummary\u003e\n    /// Pushes the \u003cparamref name=\"instanceId\"/\u003e back on top of the \u003csee cref=\"ConcurrentStack\"/\u003e\n    /// \u003c/summary\u003e\n    /// \u003cparam name=\"instanceId\"\u003e\u003c/param\u003e\n    public static void Push(string instanceId)\n    {\n        ConcurrentStack.Push(instanceId);\n    }\n    #endregion\n}\n```\n\nUsing it in a Docker container\n==============================\n\n```\n# Suppress an apt-key warning about standard out not being a terminal. Use in this script is safe.\nENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn\n\n# export DEBIAN_FRONTEND=\"noninteractive\"\nENV DEBIAN_FRONTEND noninteractive\n\n# Install deps + add Chrome Stable + purge all the things\nRUN apt-get update \u0026\u0026 apt-get install -y \\\n\tapt-transport-https \\\n\tca-certificates \\\n\tcurl \\\n\tgnupg \\\n\t--no-install-recommends \\\n\t\u0026\u0026 curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \\\n\t\u0026\u0026 echo \"deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main\" \u003e /etc/apt/sources.list.d/google-chrome.list \\\n\t\u0026\u0026 apt-get update \u0026\u0026 apt-get install -y \\\n\tgoogle-chrome-stable \\\n\t--no-install-recommends \\\n\t\u0026\u0026 apt-get purge --auto-remove -y curl gnupg \\\n\t\u0026\u0026 rm -rf /var/lib/apt/lists/*\n\n# Chrome Driver\nRUN apt-get update \u0026\u0026 \\\n    apt-get install -y unzip \u0026\u0026 \\\n    wget https://chromedriver.storage.googleapis.com/2.31/chromedriver_linux64.zip \u0026\u0026 \\\n    unzip chromedriver_linux64.zip \u0026\u0026 \\\n    mv chromedriver /usr/bin \u0026\u0026 rm -f chromedriver_linux64.zip\n```\n\nSee this issue for more information --\u003e https://github.com/Sicos1977/ChromiumHtmlToPdf/issues/39\n\n# Using this library on Linux or from a docker container\n\nTo make the library work the flag --no-sandbox will be set by default (on Windows this flag is not set). The library automaticly detect on which system you are running the code and sets the flag when needed. If for whatever reason you get a converting error then check if this flag is set and if not then add it manually.\n\n```csharp\nconverter.AddChromiumArgument(\"--no-sandbox\")\n```\n\nWhen Chrome crashes for unknown reasons in a docker container\n=============================================================\n\nOn most desktop Linux distributions, the default /dev/shm partition is large enough. However, on many cloud providers using Docker containers (such as the Google App Engine Flexible Environment) or Heroku, the default /dev/shm size is appreciably smaller (64MB and 5MB, respectively). On these platforms it's impossible to change the size of /dev/shm, which makes using Chrome difficult or impossible. This is particularly an issue for those who want to take advantage of its new headless mode.\n\nIf it is not possible to change the partition size than add the flag `--disable-dev-shm-usage` to tell Chrome not to use this parition\n\n```csharp\nconverter.AddChromiumArgument(\"--disable-dev-shm-usage\")\n```\n\nCore Team\n=========\n    Sicos1977 (Kees van Spelde)\n\n## Reporting Bugs\n\nHave a bug or a feature request? [Please open a new issue](https://github.com/Sicos1977/ChromiumHtmlToPdf/issues).\n\nBefore opening a new issue, please search for existing issues to avoid submitting duplicates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsicos1977%2Fchromiumhtmltopdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsicos1977%2Fchromiumhtmltopdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsicos1977%2Fchromiumhtmltopdf/lists"}