PDFMyUrl buttons


The PDFmyURL bookmarklet is an a small script/application, that can be stored as the URL of a bookmark in a web browser or as a hyperlink on a web page.

It is designed to add one-click functionality to a browser or web page. When clicked, the bookmarklet performs a function: PDF the current page of your browser.

Customization part 1: Creating a bookmarklet 

The Default bookmarklet looks like this:


This code can be customized by adding options to the javascript. Click here for a complete list of options

For example: to make a portrait pdf with the bookmarklet you need to add (take a look at the advanced options on pdfmyurl itself to see all advanced options).


so that the bookmarklet code looks like this:


Customization part 2: Creating a pdf button on a page

This piece of technology will let you place a “Make a PDF of this page” button on your website.

Making links on your page that can generate a pdf is easy. So if you would like to know if it is possible to generate a PDF automatically by a link study this page for some examples! A ‘direct’ link or function script than automatically generate a PDF according to the *current* content of a site is done as follows:

<a href="javascript:pdf_url=location.href;location.href='http://pdfmyurl.com?s=l&url='+escape(pdf_url)">A pdf button!</a>

If you look closely then you’ll notice that the bold red bit corresponds to the bookmarklet example described above! So basically putting this nifty piece of html on your page, will allow users to click on your page, and make a pdf of the contents of just that page (just like a bookmarklet!). Go ahead and try it underneath:

A pdf button!

Leave a Reply

Your email address will not be published. Required fields are marked *