UPDATE (Jan 29, 2013):
——————-
There is good news and sad news. First, the sad news.
According to their twitter account, the wonderful Joliprint service that I’ve been using to convert webpages to PDFs has closed its doors. A visit to joliprint.com confirms the service has gone off-line as of January 4. We will miss their excellent, handy pdf utility.
THE GOOD NEWS: I’ve discovered another service called Web2PDF that is about 10% less elegent, but will do the trick. My tutorial follows the same process as before, but I’ve updated it with a new magical javascript and one additional step. So, if you’re running into trouble with the last javascript returning a “not found error,” follow the steps below and you should be set.
Disaster averted.
——————
I’m basically like a crazy digital squirrel who snatches up tasty bits from the internet and hides them in my information tree.
And saving webpages as pdf files on my iPhone and iPad was one nut I just couldn’t crack. Until now.
Let me show you how.
Wanted: PDFs
I’ve been looking for a simple way to save webpages as PDFs from the iOS Safari browser for quite some time. See, I use Evernote to store research, interesting tidbits, records, blog material, and just about everything else I’m interested in. The great thing about Evernote is that everything I save in it is searchable — including pdfs.
That’s why I wanted to do more than just email a webpage url which is the usual MO for sharing web content from Safari. I want to capture the text itself as a gloriously searchable pdf file that will look great and print well for years to come without the need for tedious copy and paste and without the aid of a computer.
Magical Javascript
I finally have a simple, handy solution. In a few easy steps, you can create a custom bookmarklet in iOS Safari that will do just what I always dreamed — take a webpage and convert it to pdf. It’s free. It’s easy. And it has this digital squirrel twitching with delight.
The secret is this little string of letters and symbols:
javascript:void(window.open('http://www.web2pdfconvert.com/engine?cURL='+escape(location.href)+'&title='+escape(document.title)+'&utm_source=safari&utm_medium=bookmarklet&utm_campaign=add-ons'))
It’s a javascript. A magical formula that we’re going trick iOS Safari into running for us to create pdfs.
A Few Simple Steps
Follow the easy steps below to create your own pdf maker bookmarklet. Before you jump into step one, copy the javascript above exactly and send it to yourself in an email. That will make your task easier.
- 1. Create a new bookmark in Safari for iOS. Any page will do.
- 2. Save the bookmark.
- 3. Open the bookmarks list, then tap “edit.”
- 4. Tap on the bookmark you just created to edit it.
- 5. Paste the pdf maker javascript text into the “address” field. Make sure you paste it exactly.
- 6. Change the bookmark name to something memorable if you like, then tap “bookmarks” to save.
- 7. IMPORTANT: Reopen the bookmark you just saved and make sure the javascript is still exactly right, including those tiny single quote marks.
- 8. Browse to a webpage you’d like to pdf, open bookmarks, and tap your new pdf maker.
- 9. Tap and hold the “Download PDF” link on the page, then tap “Open.”
- 10. Success! Your webpage is now a pdf. Tap “open in…” to send your new pdf to another app, like evernote.
Thanks, Owen. As a note, I had to fiddle with the the copy and paste routine a few times because my iPhone didn’t want to render the “tiny single quote marks” correctly. So I had to manually re-add them. No problem.
Yeah, a lot of times iOS Safari won’t handle JavaScript in bookmarks very well. Usually you can save the bookmark, then open it again and edit the JavaScript. After the second save, it usually works. 🙂
Love the intro!
PS – Do you mind if I link to this article through my site?
I don’t mind at all…. Thanks for reading!
Done! Thanks again for the info!
http://www.techstravagant.com/?p=3444
Thanks for this! It’s a huge help! Though a bit frustrating that several characters are converted by WordPress to HTML characters and thus do not work well when directly copied to the bookmark editing window on iOS, as you hinted at. Perhaps you would be so kind as to wrap the corrected code within “pre” tags?
That’s a good thought, Lucy. I’ve experimented with your suggestion and sadly discovered that iOS still converts those characters to HTML when pasting the script into the bookmark editing window. 😦
javascript:pdf_url=location.href;location.href=’http://api.joliprint.com/api/rest/url/print/s/joliprint.com?url=’+escape(pdf_url)+’&disposition=attachment’
Not working for me; getting a Not Found error. Would someone double-check the syntax (either mine or the original)? Thanks.
Thanks for speaking up, Barry. You did everything right on your end. Looks like the Joliprint service closed down as of Jan 4, 2013. BUT, I’ve updated this post with a new javascript from a differenct service that will do just about the same thing as Joliprint. Let us know if you have any luck!
I had no idea Joliprint was gone until your comment. Thanks again!