Let Visitors Save Your Web Pages to PDF

Pdfcrowd offers a very simple and straightforward way to save your web pages to PDF. Just paste the following code verbatim into your HTML. It creates a link that converts the containing page to PDF.


<a href="//pdfcrowd.com/url_to_pdf/">Save to PDF</a>

Options

You can customize the PDFs using these 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), millimeters (mm), centimeters (cm), or points (pt). If no units are specified, points are assumed. Examples: 210mm, 8.5in

Usage Examples

  • A4 page
    • //pdfcrowd.com/url_to_pdf/?width=210mm&height=297mm
  • Letter page
    • //pdfcrowd.com/url_to_pdf/?width=8.5in&height=11in
  • Single-page PDF
    • //pdfcrowd.com/url_to_pdf/?height=-1
  • Add the current page number to the page footer
    • //pdfcrowd.com/url_to_pdf/?footer_text=page%20%p
  • Use the print version of the page
    • //pdfcrowd.com/url_to_pdf/?use_print_media=1
  • Do not run JavaScript
    • //pdfcrowd.com/url_to_pdf/?no_javascript=1

Here is a demo link.

How It Works

  • The Save to PDF Link service picks up the URL of the web page from the HTTP referrer.
  • The web page must be accessible on the public Internet.
  • Only the current web page can be converted, it is not possible to specify a different URL to convert.

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.