Save to PDF Link

Paste the following code verbatim into your HTML. It creates a link that converts the current page to PDF.


You can customize the PDF using these URL parameters:

Parameter Description
width Page width.
height Page height. Use -1 for a single page PDF.
hmargin Horizontal page margins.
vmargin Vertical page margins.
footer_text Footer text. The following variables are expanded:
  • $u - Source URL.
  • $p - The current page number.
  • $n - Total number of pages.
use_print_media Use the print CSS media type if available.
pdf_name The file name of the created PDF. If not specified then the name is auto-generated.
no_javascript Do not run JavaScript in the web page.

Page dimensions and margins can be specified in inches (in), millimetres (mm), centimetres (cm), or points (pt). If no units are specified, points are assumed.


  • A4 page
    • //
  • Letter page
    • //
  • Single-page PDF
    • //
  • Add the current page number to the page footer
    • //$p
  • Use the print version of the page
    • //
  • Do not run JavaScript
    • //

Here is a demo Save to PDF Link that converts this page to PDF.


  • You can use the following classes in your HTML code and hide/remove elements from the output:
    • pdfcrowd-remove - sets display:none on the element
    • pdfcrowd-hide - sets visibility:hidden on the element
  • You can force a page break with this HTML:
    <div style="page-break-before:always"></div>
  • You can avoid a page break inside an element with this CSS:
    img { page-break-inside:avoid }

How It Works

  • The web page must be accessible on the public Internet.
  • Only a web page from the same origin can be converted, it is not possible to specify an URL from a different origin.

Domain License

The Save to PDF Link service is free, you don't need a Pdfcrowd account to use it. However, for commercial web sites, you might consider purchasing a Domain License for your domain which removes the Pdfcrowd branding from PDF.