PDF icon One little feature that iOS really needs is the ability to natively “print to PDF” directly on the iPad and iPhone, a popular trick on the Mac and in the PC world that allows you to digitally print anything and, in this case, save the contents of any web document or web page as a self-contained PDF document, allowing it to be read later, printed, or used for whatever other purpose. Since this great feature isn’t around on the iPhone and iPad at the moment, we can use a nice bookmarklet trick combined with a free third party web service to be able to add a “Save as PDF” option to Safari in iOS, which allows you to ‘print’ or convert any web page to a PDF file that is then accessible to apps like iBooks. Let’s walk through the process of setting this up:

1: Create a “Print to PDF” Bookmarklet in Safari

First we’ll create a bookmarklet that provides the PDF conversion service, this is easy and free:

  • Open Safari and go to any web page – this one doesn’t matter, it’s going to be modified anyway
  • Copy the following javascript text exactly as it appears so that it resides in the iOS clipboard:
  • javascript:pdf_url=location.href;location.href='http://pdfmyurl.com?url='+escape(pdf_url)

  • Tap the Share button and then choose “Bookmark”, name the bookmark something like “Save as PDF” or “Convert to PDF” and choose “Save” – ignore the URL for now
  • Convert a webpage to PDF in iOS Safari by using a bookmarklet

  • Now tap the Bookmarks button, and tap the Bookmarks tab at the bottom, and now choose the “Edit” button
  • Modify the bookmark to turn it into a PDF bookmarklet

  • Select the “Convert to PDF” bookmark you just created/saved and then tap into the URL feed
  • Delete the existing URL, paste in the javascript code you copied in the first step, making sure it appears exactly as intended
  • The Save a webpage as PDF bookmarklet in Safari

  • Tap “Done” and then close out of the bookmarks menu

Creating the bookmarklet is now finished and you are ready to use it.

Optional Web-to-PDF Converter URL: Though there shouldn’t be any issues with the above javascript and PDF conversion service, we’ are going to provide an alternative web-to-PDF conversion Javascript just in case the aforementioned one stops working or is problematic for you.


Everything is otherwise the same, except that this uses a different service, and the javascript will launch the converted webpage into a new window where it can then be saved. In testing, they both worked the same and thus we don’t have a preference one way or another, but considering they are free services there could be some limitations on one and not the other that we don’t know about. Anyway, use whichever you like.

2: Saving the Web Page as a PDF

Now to save a webpage as PDF all you need to do is visit the webpage you want to save as a PDF document, then select the bookmarklet that was just created.

  • Visit any web page (OSXDaily.com is always a good one, right?) and now pull down the Bookmarks menu and choose the “Convert to PDF” bookmarklet you created to instantly convert the web page to a PDF file
  • Use the "Convert to PDF" in iPad Safari

  • Select “Open in iBooks” to save the webpages PDF into the iBooks library, or choose “Open In” to select another destination app
  • Save the PDF to iBooks

iBooks will launch and you’ll then have direct access to the webpage as a PDF file stored locally on the iOS device. If the document is multipage, it’ll be broken up into unique pages with thumbnail browsing access.

A webpage saved to iBooks as a PDF file

Depending on how often you use this, you may want to set the Bookmarks bar to always be visible in Safari on the iPad, thus allowing you to always have access to the “Print PDF” bookmarklet that was created. The only real downside to showing the bookmarks bar all the time is a slight reduction in available viewing space of webpages, and it does clutter the screen slightly.

Don’t forget to check out some other helpful bookmarklets for iOS, each of which can be used to add some great features that are currently missing from Safari.

« »