iOS: Save Web Pages to a PDF File Without Using an App

One of the features that OS X has but is missing in iOS is the facility to print a document page to PDF. With some limitations, I'll show you how to print web pages in iOS Safari to a PDF file and drop it into iBooks or some other app.

__________________

This technique depends on a web service from pdfmyurl.com, and there will be very small banner ads inserted into your PDF file. Also, this service may or may not exist forever, and so be prepared to move onto another technique if that happens. Finally, the technique depends on a Safari bookmarklet, a bookmark that contains code. So you won't be able to use this technique anywhere else but in a browser.

Also, I found that this service tends to break web pages into multiple PDF pages, and that may not suit you. In the discussion at the end, I'll speak to that and alternative methods.

Here's the code you're going to insert into a bookmarklet.

javascript:pdf_url=location.href;location.href='http://pdfmyurl.com?url='+escape(pdf_url)

Copy this code snippet exactly as is to your iOS device using any method you like. For simplicity and enduring reference, I used email.

Now follow these steps to create the bookmarklet.

________________________

1. On your iOS device copy the string defined above into the iOS copy/paste buffer. If you used email, drag select the blue dots until the blue area contains only the code, then tap "Copy."

2. In iOS Safari, go to any web page. It doesn't matter which one. That's because all we need to do is construct the bookmarklet.

3. Use the Share button just to right of the URL/search field at the top, and select "Add Bookmark."

4. Change the name of the bookmark's page to "Save as PDF."

5. Save the bookmark now because, at this point, the URL isn't editable.

6. Open the Safari Bookmarks, and tap the "Edit button at the bottom. Scroll down to the "Save as PDF" and drag it to the top with those horizontal drag bars.

7. Tap the text of the bookmark name to edit its fields.

8. Tap the URL field. Delete what's there. Tap and hold the empty field until the iOS Paste button appears. Tap on the word Paste.

9. The string you saved above will be dropped into the Address field. Tap "All" at the top, then tap "Done" at the bottom of the bookmark list. You're done creating the bookmarklet.

9. Go to a desired web page that you want save as a PDF. Open the bookmarks again and tap "Save as PDF." The processing might take a minute or so for a complex page. Watch the progress bar at the top. A PDF of that page will be returned.

10. Tap the upper right side of the PDF's page until you see "Open in iBooks" next to "Open in..." Pick iBooks for now. Be alert because this prompt goes away quickly.  iBooks will open the PDF file and save it there. You're done. 

Discussion

This technique works only in a browser that supports bookmarklets. The resulting PDF has very small ad banners, and it may be broken into more pages than you'd like. But at least you've captured the web page as PDF.

For more flexibility, there are iOS apps that can capture the pages from other kinds of apps and the PDF is, in some cases, better presented as a single PDF page. Plus, you won't have to worry about the Internet service disappearing some day.

I've had a chance inspect PDF Printer from Darsoft, $5.99 and Save2PDF from EuroSmartz, $4.99. (These are iPad links.) From what I've seen, I like them so far.

Note that because of sandboxing, these apps have their own built-in browser that you must use, and the PDFs that are created are managed within the app. For example, you can rename the PDF file. But, you can also export them to another app, say GoodReader or iBooks.

I hope to take a look at these two apps and perhaps other similar apps in a future article or review.