The following options are available for the ChromiumHtmlToPdf console application:
| **Option** | **Description** |
|----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--input` | Required. The input content, URL, or file. |
| `--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. |
| `--output` | Required. The output file. |
| `--browser` | Required. Specifies the browser to use (default: Chrome or Edge). |
| `--landscape` | (Default: false) Sets paper orientation to landscape. |
| `--display-headerfooter` | (Default: false) Displays header and footer. |
| `--header-template` | Specifies a custom HTML template for the header. Overrides all other --header-* options. |
| `--footer-template` | Specifies a custom HTML template for the footer. Overrides all other --footer-* options. |
| `--header-left` | Text to print in the left corner of the header. |
| `--header-center` | Text to print in the center of the header. |
| `--header-right` | Text to print in the right corner of the header. |
| `--header-font-name` | The font name to use for the header. |
| `--header-font-size` | The font size (in pt) to use for the header. |
| `--footer-left` | Text to print in the left corner of the footer. |
| `--footer-center` | Text to print in the center of the footer. |
| `--footer-right` | Text to print in the right corner of the footer. |
| `--footer-font-name` | The font name to use for the footer. |
| `--footer-font-size` | The font size (in pt) to use for the footer. |
| `--print-background` | (Default: false) Prints background graphics. |
| `--scale` | (Default: 1) Specifies the webpage rendering scale. |
| `--paper-format` | (Default: Letter) Specifies paper format, overriding `--paper-width` and `--paper-height`. Valid values: Letter, Legal, Tabloid, Ledger, A0-A6, FitPageToContent. |
| `--paper-width` | (Default: 8.5) Sets paper width in inches. |
| `--paper-height` | (Default: 11) Sets paper height in inches. |
| `--no-margins` | Removes margins by enabling Chromium's `--no-margins` parameter. |
| `--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. |
| `--window-width` | (Default: 1366) Specifies window width in pixels. |
| `--window-height` | (Default: 768) Specifies window height in pixels. |
| `--user-agent` | Overrides default user-agent string for Chromium. |
| `--margin-top` | (Default: 0.4) Top margin in inches. |
| `--margin-bottom` | (Default: 0.4) Bottom margin in inches. |
| `--margin-left` | (Default: 0.4) Left margin in inches. |
| `--margin-right` | (Default: 0.4) Right margin in inches. |
| `--pageranges` | Specifies pages to print (e.g., '1-5, 8, 11-13'). |
| `--chromium-location` | Specifies Chrome/Edge location. Defaults to executable folder or registry. |
| `--chromium-userprofile` | Specifies location for Chromium user profile. |
| `--proxy-server` | Configures Chromium to use a custom proxy server. |
| `--proxy-bypass-list` | Specifies hosts to bypass proxy. Requires `--proxy-server`. Format: `*.google.com;*foo.com;127.0.0.1:8080`. |
| `--proxy-pac-url` | Specifies PAC file URL for proxy (e.g., `http://wpad/windows.pac`). |
| `--user` | Runs browser under a specific user (used with `--password`). |
| `--password` | Specifies password for `--user`. |
| `--tempfolder` | Specifies folder for temporary files. |
| `--multi-threading` | (Default: false) Enables multi-threading (requires `--input-is-list`). |
| `--max-concurrency-level` | (Default: 0) Limits concurrency level for multi-threading. |
| `--wait-for-window-status` | Waits for `window.status` to match a string before conversion. |
| `--wait-for-window-status-timeout`| (Default: 60000) Timeout for `--wait-for-window-status`. |
| `--timeout` | Specifies timeout (ms) before aborting conversion. |
| `--media-load-timeout` | Specifies timeout (ms) for media load after DOM content is loaded. |
| `--pre-wrap-file-extensions` | Wraps files in HTML `<PRE>` tags. |
| `--encoding` | Specifies encoding for `--input` file. |
| `--image-resize` | (Default: false) Resizes images to fit page width. |
| `--image-rotate` | (Default: false) Rotates images per EXIF data. |
| `--image-load-timeout` | (Default: 30000) Timeout for downloading images. |
| `--sanitize-html` | (Default: false) Removes HTML elements that could lead to XSS. |
| `--logfile` | Specifies log file (wildcards: `{PID}`, `{DATE}`, `{TIME}`). |
| `--run-javascript` | Runs JavaScript after loading webpage but before PDF conversion. |
| `--url-blacklist` | Blocks specified URLs (e.g., `*.google.com;*foo.com`). |
| `--snapshot` | Saves webpage snapshot as `.mhtml` alongside `.pdf`. |
| `--log-network-traffic` | Enables logging of network traffic. |
| `--disk-cache-disabled` | (Default: false) Disables disk cache. |
| `--disk-cache-directory` | Specifies directory for disk cache. |
| `--disk-cache-size` | Specifies size of disk cache (MB). |
| `--web-socket-timeout` | Specifies WebSocket timeout (ms). |
| `--wait-for-network-idle` | Waits until network is idle before conversion. |
| `--help` | Displays help information. |
| `--version` | Displays version information. |
| `--no-sandbox` | Never use a sandbox. |
| `-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. |
| `--disable-gpu` | Passes --disable-gpu to Chromium. This should be useful on common server hardware. |
| `--ignore-certificate-errors` | Passes --ignore-certificate-errors to Chromium. Useful when generating from internal web server. |
| `--disable-crash-reporter` | Passes --disable-crash-reporter and --no-crashpad to Chromium. |
| `--request-headers` | Specifies request headers to send with all requests. Format: `Header1:Value1,Header2:Value2`. Example: `Authorization:Bearer token123,X-Custom-Header:CustomValue`. Note: Headers are automatically propagated to all resource requests (CSS, JS, images, etc.) when URL blacklisting is enabled. |