0% found this document useful (0 votes)
69 views2 pages

Save As PDF

This document discusses how to add a "Save as PDF" link to website pages that allows visitors to save that page as a PDF file with one click. It describes how to add the link by including code that references the pdfmyurl.com service and passes the page URL as a parameter. Various other parameters are also described that control aspects of the generated PDF like margins, page size and orientation. Instructions are provided on setting up the service for use with a business license, including specifying approved domains.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views2 pages

Save As PDF

This document discusses how to add a "Save as PDF" link to website pages that allows visitors to save that page as a PDF file with one click. It describes how to add the link by including code that references the pdfmyurl.com service and passes the page URL as a parameter. Various other parameters are also described that control aspects of the generated PDF like margins, page size and orientation. Instructions are provided on setting up the service for use with a business license, including specifying approved domains.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Pricing HTML to PDF API Save as PDF link Help

Put a 'Save as PDF' link on your website


With a business license you can put a link on your website that lets visitors save your web pages as PDF with a single click. It literally takes
only two minutes for you to implement and offers great flexibility and power! All you need to do is put the following link on your web pages.

<a href="https://pdfmyurl.com/saveaspdf?url=YOUR_URL_HERE">Save this page as PDF</a>

By changing the url parameter (where it says YOUR_URL_HERE above) you can let your visitors download specific pages of your website
easily. Here's an example of how it would work if we would to have the page https://pdfmyurl.com/faq downloaded as PDF.

<a href="https://pdfmyurl.com/saveaspdf?url=https%3A%2F%2Fsiteproxy.ruqli.workers.dev%3A443%2Fhttps%2Fpdfmyurl.com%2Ffaq">Download the FAQ page as PDF</

Note that you need to URL encode the url parameter so that the URL arrives properly on our end. You can easily do this with a little
JavaScript for the current page like this for example:

<a href="javascript:location.href='https://pdfmyurl.com/saveaspdf?url='+escape(location.href)">Download this

You can easily control the layout of the PDF by setting defaults in our members area. You can also control the layout of the PDF by adding
parameters to the URL from the following table as well as all parameters that are used in our API.

Parameter Description

url The page on your website, which you want to convert. If you don't specify this, then we convert the page that the link is
on.
Note that you must encode the URL to make sure it's used correctly. This site can help you do so.

page_size PDF page format such as A3, A4 etc. You can find a full list of allowed values here

orientation PDF page orientation, either portrait or landscape

width Width of the PDF, in case you don't specify a standard page size

height Height of the PDF, in case you don't specify a standard page size.
If you specify a width, but no height, then we convert your page to one long single page PDF!

top Top margin in unit

bottom Bottom margin in unit

left Left margin in unit

margin Margin margin in unit


unit Unit for page sizing and margins, can be mm, in or pt. Default is mm

header Header with markup, page number etc, see the header and footer documentation for more information

footer Footer with markup, page number etc, see the header and footer documentation for more information

content Controls which content of the page you want to convert or exclude. See part of page conversion for more info.

css_media_type Set to print if you want to use the print friendly version of your web page

filename Set the filename for the PDF

title Set the title for the PDF

inline Display the PDF inline in the browser instead of as popup to save

Important usage instructions


If you acquired a business license and you want to use this functionality, then you need to be aware of the following things:

1. If you want to use this on web pages that are not accessible from the internet or in secure members area, then please use our API
instead. We've setup a great JavaScript example that let's you get started in a few minutes.
2. When your visitors click a save as PDF link, the url parameter must have a valid - url encoded - URL. This helps us determine your
page and match it the domains in your members area settings.
3. After you acquire the business license, you need to set the domain(s) of your website(s) in our members area. This allows us to tie
your subscription to the web pages that are being converted.

Terms & Conditions   Privacy Policy   License Agreement Plans and Pricing   FAQ   Contact Us   Login

You might also like