Loading...
Convert
DEMO
New
Save
Share
Clone
Settings
?
Help
»
Input
+

You can upload an HTML file, or a zip, tar.gz, or tar.bz2 archive. The archive can contain external files like images, stylesheets and scripts.

Set the filename of the main HTML document stored in the input archive. If not specified, the first HTML file in the archive is used for conversion. Use this method if the input archive contains multiple HTML documents.
Options
+
Page Setup
Set the output page size.
Possible values: "A0", "A1", "A2", "A3", "A4", "A5", "A6", "Letter"
Set the output page width. The safe maximum is 200in otherwise some PDF viewers may be unable to open the PDF. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
Set the output page height. Use -1 for a single page PDF. The safe maximum is 200in otherwise some PDF viewers may be unable to open the PDF. The value must be -1 or specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
Set the output page orientation.
Possible values: "landscape", "portrait"
Disable page margins.
Set the output page top margin. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
Set the output page right margin. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
Set the output page bottom margin. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
Set the output page left margin. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
Set the page range to print. A comma separated list of page numbers or ranges. Special strings may be used, such as `odd`, `even` and `last`.
px
Set the viewport width for formatting the HTML content when generating a PDF. By specifying a viewport width, you can control how the content is rendered, ensuring it mimics the appearance on various devices or matches specific design requirements. It is available for API client version >= 6.0.0. More Pdfcrowd versioning details.
Possible values:
  • "balanced" - The smart option to adjust the viewport width dynamically to fit the print area, ensuring an optimal layout.
  • "small" - A compact layout where less text fits on each PDF page, ideal for detailed sections or mobile views.
  • "medium" - A balanced amount of text per page, striking a good compromise between readability and content density.
  • "large" - A broader layout that accommodates more text per page, perfect for reducing page count and enhancing flow.
  • "extra-large" - Maximize the text per page, creating a spacious and content-rich PDF, akin to a widescreen experience.
  • A precise viewport width in pixels, such as 1024px, to tailor the PDF's text density to your specific requirements. The value must be in the range 96-65000px.
px
Set the viewport height for formatting the HTML content when generating a PDF. By specifying a viewport height, you can enforce loading of lazy-loaded images and also affect vertical positioning of absolutely positioned elements within the content. It is available for API client version >= 6.0.0. More Pdfcrowd versioning details.
Possible values:
  • "auto" - The height of the print area is used.
  • "large" - Value suitable for documents with extensive lazy-loaded content.
  • A specific numerical value, such as 10000px, to set as the window height, allowing precise control based on the document's requirements.
Specifies the mode for fitting the HTML content to the print area by upscaling or downscaling it. It is available for API client version >= 6.0.0. More Pdfcrowd versioning details.
Possible values:
  • "auto" - Automatic mode
  • "smart-scaling" - Smartscaling to fit more content into the print area.
  • "no-scaling" - No scaling is performed.
  • "viewport-width" - The viewport width fits the print area width.
  • "content-width" - The HTML content width fits the print area width.
  • "single-page" - The entire HTML content fits the print area of a single page.
  • "single-page-ratio" - The entire HTML content fits the print area of a single page, maintaining the aspect ratio of the page height and width.
Specifies which blank pages to exclude from the output document. It is available for API client version >= 5.13.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Possible values:
  • "trailing" - Trailing blank pages are removed from the document.
  • "all" - All empty pages are removed from the document.
  • "none" - No blank page is removed from the document.
Watermark & Background
Apply a watermark to each page of the output PDF file. A watermark can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the watermark. The file must exist and not be empty.
Load a file from the specified URL and apply the file as a watermark to each page of the output PDF. A watermark can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the watermark. The supported protocols are http:// and https://.
Apply each page of a watermark to the corresponding page of the output PDF. A watermark can be either a PDF or an image. The file must exist and not be empty.
Load a file from the specified URL and apply each page of the file as a watermark to the corresponding page of the output PDF. A watermark can be either a PDF or an image. The supported protocols are http:// and https://.
Apply a background to each page of the output PDF file. A background can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the background. The file must exist and not be empty.
Load a file from the specified URL and apply the file as a background to each page of the output PDF. A background can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the background. The supported protocols are http:// and https://.
Apply each page of a background to the corresponding page of the output PDF. A background can be either a PDF or an image. The file must exist and not be empty.
Load a file from the specified URL and apply each page of the file as a background to the corresponding page of the output PDF. A background can be either a PDF or an image. The supported protocols are http:// and https://.
The page background color in RGB or RGBA hexadecimal format. The color fills the entire page regardless of the margins. The value must be in RRGGBB or RRGGBBAA hexadecimal format.
General Options
Use the print version of the page if available (@media print).
Do not print the background graphics.
Do not execute JavaScript.
Do not load images.
Disable loading fonts from remote sources.
Use a mobile user agent. It is available for API client version >= 5.3.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Specifies how iframes are handled. It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Possible values:
  • "all" - All iframes are loaded.
  • "same-origin" - Only iframes with the same origin as the main page are loaded.
  • "none" - Iframe loading is disabled.
Try to block ads. Enabling this option can produce smaller output and speed up the conversion.
Set the default HTML content text encoding.
Set the locale for the conversion. This may affect the output format of dates, times and numbers. It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Set the HTTP authentication user name.
Set the HTTP authentication password.
Set cookies that are sent in Pdfcrowd HTTP requests.
Do not allow insecure HTTPS connections.
Abort the conversion if the main URL HTTP status code is greater than or equal to 400.
Abort the conversion if any of the sub-request HTTP status code is greater than or equal to 400 or if some sub-requests are still pending. See details in a debug log.
Do not send the X-Pdfcrowd HTTP header in Pdfcrowd HTTP requests.
Specifies behavior in presence of CSS @page rules. It may affect the page size, margins and orientation. It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Possible values:
  • "default" - The Pdfcrowd API page settings are preferred.
  • "mode1" - The converter version 18.10 mode.
  • "mode2" - CSS @page rule is preferred.
Apply custom CSS to the input HTML document. It allows you to modify the visual appearance and layout of your HTML content dynamically. Tip: Using !important in custom CSS provides a way to prioritize and override conflicting styles. It is available for API client version >= 5.14.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Run a custom JavaScript after the document is loaded and ready to print. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...). In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
Run a custom JavaScript right after the document is loaded. The script is intended for early DOM manipulation (add/remove elements, update CSS, ...). In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
Set a custom HTTP header that is sent in Pdfcrowd HTTP requests. A string containing the header name and value separated by a colon.
Wait the specified number of milliseconds to finish all JavaScript after the document is loaded. Your API license defines the maximum wait time by "Max Delay" parameter. Must be a positive integer number or 0.
Convert only the specified element from the main document and its children. The element is specified by one or more CSS selectors. If the element is not found, the conversion fails. If multiple elements are found, the first one is used.
Specify the DOM handling when only a part of the document is converted. This can affect the CSS rules used.
Possible values:
  • "cut-out" - The element and its children are cut out of the document.
  • "remove-siblings" - All element's siblings are removed.
  • "hide-siblings" - All element's siblings are hidden.
Wait for the specified element in a source document. The element is specified by one or more CSS selectors. The element is searched for in the main document and all iframes. If the element is not found, the conversion fails. Your API license defines the maximum wait time by "Max Delay" parameter.
The main HTML element for conversion is detected automatically. It is available for API client version >= 5.5.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
The input HTML is automatically enhanced to improve the readability. It is available for API client version >= 5.5.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Possible values:
  • "none" - No enhancements are used.
  • "readability-v1" - Version 1 of the enhancements is used.
  • "readability-v2" - Version 2 of the enhancements is used.
  • "readability-v3" - Version 3 of the enhancements is used.
  • "readability-v4" - Version 4 of the enhancements is used.
PDF Format
Convert HTML forms to fillable PDF forms. Details can be found in the blog post.
Create linearized PDF. This is also known as Fast Web View.
Encrypt the PDF. This prevents search engines from indexing the contents.
Protect the PDF with a user password. When a PDF has a user password, it must be supplied in order to view the document and to perform operations allowed by the access permissions.
Protect the PDF with an owner password. Supplying an owner password grants unlimited access to the PDF including changing the passwords and access permissions.
Disallow printing of the output PDF.
Disallow modification of the output PDF.
Disallow text and graphics extraction from the output PDF.
Set the title of the PDF.
Set the subject of the PDF.
Set the author of the PDF.
Associate keywords with the document.
Extract meta tags (author, keywords and description) from the input HTML and use them in the output PDF.
Viewer Preferences
Specify the page layout to be used when the document is opened.
Possible values:
  • "single-page" - Display one page at a time.
  • "one-column" - Display the pages in one column.
  • "two-column-left" - Display the pages in two columns, with odd-numbered pages on the left.
  • "two-column-right" - Display the pages in two columns, with odd-numbered pages on the right.
Specify how the document should be displayed when opened.
Possible values:
  • "full-screen" - Full-screen mode.
  • "thumbnails" - Thumbnail images are visible.
  • "outlines" - Document outline is visible.
Specify how the page should be displayed when opened.
Possible values:
  • "fit-width" - The page content is magnified just enough to fit the entire width of the page within the window.
  • "fit-height" - The page content is magnified just enough to fit the entire height of the page within the window.
  • "fit-page" - The page content is magnified just enough to fit the entire page within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension.
Display the specified page when the document is opened. Must be a positive integer number.
Specify the initial page zoom in percents when the document is opened. Must be a positive integer number.
Specify whether to hide the viewer application's tool bars when the document is active.
Specify whether to hide the viewer application's menu bar when the document is active.
Specify whether to hide user interface elements in the document's window (such as scroll bars and navigation controls), leaving only the document's contents displayed.
Specify whether to resize the document's window to fit the size of the first displayed page.
Specify whether to position the document's window in the center of the screen.
Specify whether the window's title bar should display the document title. If false , the title bar should instead display the name of the PDF file containing the document.
Set the predominant reading order for text to right-to-left. This option has no direct effect on the document's contents or page numbering but can be used to determine the relative positioning of pages when displayed side by side or printed n-up
Data
Set the input data for template rendering. The data format can be JSON, XML, YAML or CSV.
Load the input data for template rendering from the specified file. The data format can be JSON, XML, YAML or CSV.
Specify the input data format.
Possible values:
  • "auto" - the data format is auto detected
  • "json"
  • "xml"
  • "yaml"
  • "csv"
Set the encoding of the data file set by setDataFile.
Ignore undefined variables in the HTML template. The default mode is strict so any undefined variable causes the conversion to fail. You can use {% if variable is defined %} to check if the variable is defined.
Auto escape HTML symbols in the input data before placing them into the output.
Auto trim whitespace around each template command block.
Set the advanced data options:
  • csv_delimiter - The CSV data delimiter, the default is ,.
  • xml_remove_root - Remove the root XML element from the input data.
  • data_root - The name of the root element inserted into the input data without a root node (e.g. CSV), the default is data.
Miscellaneous
Turn on the debug logging. Details about the conversion are stored in the debug log. The debug log is available in conversion statistics.
Tag the conversion with a custom value. The tag is used in conversion statistics. A value longer than 32 characters is cut off.
A proxy server used by Pdfcrowd conversion process for accessing the source URLs with HTTP scheme. It can help to circumvent regional restrictions or provide limited access to your intranet. The value must have format DOMAIN_OR_IP_ADDRESS:PORT.
A proxy server used by Pdfcrowd conversion process for accessing the source URLs with HTTPS scheme. It can help to circumvent regional restrictions or provide limited access to your intranet. The value must have format DOMAIN_OR_IP_ADDRESS:PORT.
A client certificate to authenticate Pdfcrowd converter on your web server. The certificate is used for two-way SSL/TLS authentication and adds extra security. The file must exist and not be empty.
A password for PKCS12 file with a client certificate if it is needed.
Tweaks
Set the internal DPI resolution used for positioning of PDF contents. It can help in situations when there are small inaccuracies in the PDF. It is recommended to use values that are a multiple of 72, such as 288 or 360. It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details. The value must be in the range of 72-600.
Set the top left X coordinate of the content area. It is relative to the top left X coordinate of the print area. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt". It may contain a negative value.
Set the top left Y coordinate of the content area. It is relative to the top left Y coordinate of the print area. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt". It may contain a negative value.
Set the width of the content area. It should be at least 1 inch. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
Set the height of the content area. It should be at least 1 inch. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
A 2D transformation matrix applied to the main contents on each page. The origin [0,0] is located at the top-left corner of the contents. The resolution is 72 dpi. It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
A 2D transformation matrix applied to the page header contents. The origin [0,0] is located at the top-left corner of the header. The resolution is 72 dpi. It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
A 2D transformation matrix applied to the page footer contents. The origin [0,0] is located at the top-left corner of the footer. The resolution is 72 dpi. It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Disable automatic height adjustment that compensates for pixel to point rounding errors. It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Add special CSS classes to the main document's body element. This allows applying custom styling based on these classes:
  • pdfcrowd-page-X - where X is the current page number
  • pdfcrowd-page-odd - odd page
  • pdfcrowd-page-even - even page
It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.

If your custom styling affects the contents area size (e.g. by using different margins, padding, border width), the resulting PDF may contain duplicit contents or some contents may be missing.

Add special CSS classes to the header/footer's body element. This allows applying custom styling based on these classes:
  • pdfcrowd-page-X - where X is the current page number
  • pdfcrowd-page-count-X - where X is the total page count
  • pdfcrowd-page-first - the first page
  • pdfcrowd-page-last - the last page
  • pdfcrowd-page-odd - odd page
  • pdfcrowd-page-even - even page
It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Set the maximum time to load the page and its resources. After this time, all requests will be considered successful. This can be useful to ensure that the conversion does not timeout. Use this method if there is no other way to fix page loading. It is available for API client version >= 5.15.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details. The value must be in the range 10-30.

Allows to configure conversion via JSON. The configuration defines various page settings for individual PDF pages or ranges of pages. It provides flexibility in designing each page of the PDF, giving control over each page's size, header, footer etc. If a page or parameter is not explicitly specified, the system will use the default settings for that page or attribute. If a JSON configuration is provided, the settings in the JSON will take precedence over the global options.

The structure of the JSON must be:

  • pageSetup: An array of objects where each object defines the configuration for a specific page or range of pages. The following properties can be set for each page object:
    • pages: A comma-separated list of page numbers or ranges. Special strings may be used, such as `odd`, `even` and `last`. For example:
      • 1-: from page 1 to the end of the document
      • 2: only the 2nd page
      • 2,4,6: pages 2, 4, and 6
      • 2-5: pages 2 through 5
      • odd,2: the 2nd page and all odd pages
    • pageSize: The page size (optional). Possible values: A0, A1, A2, A3, A4, A5, A6, Letter.
    • pageWidth: The width of the page (optional).
    • pageHeight: The height of the page (optional).
    • marginLeft: Left margin (optional).
    • marginRight: Right margin (optional).
    • marginTop: Top margin (optional).
    • marginBottom: Bottom margin (optional).
    • displayHeader: Header appearance (optional). Possible values:
      • none: completely excluded
      • space: only the content is excluded, the space is used
      • content: the content is printed (default)
    • displayFooter: Footer appearance (optional). Possible values:
      • none: completely excluded
      • space: only the content is excluded, the space is used
      • content: the content is printed (default)
    • headerHeight: Height of the header (optional).
    • footerHeight: Height of the footer (optional).
    • orientation: Page orientation, such as "portrait" or "landscape" (optional).
    • backgroundColor: Page background color in RRGGBB or RRGGBBAA hexadecimal format (optional).

Dimensions may be empty, 0 or specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".

It is available for API client version >= 6.1.0. More Pdfcrowd versioning details.
Allows to configure the conversion process via JSON file. See details of the JSON string. It is available for API client version >= 6.1.0. More Pdfcrowd versioning details. The file must exist and not be empty.
Specifies the User-Agent HTTP header that will be used by the converter when a request is made to the converted web page. It is available for API client version >= 6.4.0. More Pdfcrowd versioning details.
Possible values:
  • "chrome-desktop" - The user-agent for desktop chrome corresponding to the converter used.
  • "chrome-mobile" - The user-agent for mobile chrome corresponding to the converter used.
  • "latest-chrome-desktop" - The user-agent of the recently released Chrome browser on desktops.
  • "latest-chrome-mobile" - The user-agent of the recently released Chrome browser on mobile devices.
  • A custom string for the user agent.
API Client Options
Set the converter version. Different versions may produce different output. Choose which one provides the best output for your case. It is available for API client version >= 5.0.0 and applicable for converter version >= 20.10. More Pdfcrowd versioning details.
Possible values:
  • "24.04" - Version 24.04.
  • "20.10" - Version 20.10.
  • "18.10" - Version 18.10.
Specifies if the client communicates over HTTP or HTTPS with Pdfcrowd API.

Using HTTP is insecure as data sent over HTTP is not encrypted. Enable this option only if you know what you are doing.

Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
No option name matches.
No option is changed.
«
Code
+
Preview
+

Output Preview

- press
to run the conversion -