Saving as PDF in Safari

Posted by Pierre Igot in: Macintosh
August 23rd, 2003 • 1:10 am

I frequently save articles that I like on the web as PDF files on my hard drive using Mac OS X’s built-in print-to-PDF architecture. This is because I am all too familiar with the tendency of online articles to disappear from the web after a while and become only accessible to those who are willing to pay a fee. (As I have serious doubts about whether any of that money ever goes to the authors of the articles themselves, I tend to be reluctant when it comes to paying the fee. I think I have a fairly good idea of how much it costs to maintain and provide access to a database of articles on-line, and it’s not that much. After all, I do it myself with this web site and it’s not exactly a huge expense for me. (There is the issue of traffic and bandwidth, of course — but the articles I am talking about are not likely to generate millions or even hundreds of thousands of hits per day on an on-going basis.)

So I tend to save articles as PDF files. The problem is that saving as a PDF file is not done through the “Save” dialog, but through the “Print” dialog, by selecting an option and opening another dialog where you can name your PDF file and indicate where you want to save it.

In that secondary dialog box, however, Safari is not smart enough to provide me with a default choice for the name of the PDF file that would be based on the title of the web page. For example, if the title of the web page is “The New Yorker: Politics: Lunch with the chairman, Seymour Hersh”, I’d expect Safari to at least attempt to come up with a Mac OS X-friendly file name for the PDF file, such as “The New Yorker- Politics- Lunch with the chairman, Seymour Hersh.pdf”, for example. It might not be exactly the title that I would give it myself (I have my own abbrevation system in file names), but at least it gives me the pieces of information that I need to build my own file name.

Instead, Safari gives me this: “.pdf”. In other words, nothing. I have to retype the name of the publication, the article title, the name of the author, everything. I realize that most web pages have titles that are far from being as information-rich as the one given as an example above — in fact, the New Yorker web site only provides generic section information in its web page titles — but anything would be better than nothing, which is what Safari gives you now.

Then the problem is compounded by the fact that the top of the actual web page is hidden by the Print dialog sheet that pops out of the window’s title bar. Why is it a problem? Well, if the information you need to name your PDF file is not included in the window’s title, it’s likely to appear at the top of the web page itself. But if it’s hidden, you can’t see it. In other words, if you didn’t carefully memorize the exact wording of the title of the article and the exact spelling of the author before selecting “Print” in Safari, then when it comes time to name your PDF file for the article, you are out of luck. More often than not, I find myself HAVING to exit the Save as PDF dialog, exit the main Print dialog sheet, look at the top of the web page again, attempt to memorize everything I need, and try again. Alternatively, I just give the PDF file a bogus name and then go to the Finder and edit the file name once Safari has folded up its dialog boxes and lets me view the top of the page again. But this, of course, means that I first have to locate the PDF file I just saved in the Finder — for which task Default Folder X provides invaluable assistance. I just go to the Default Folder Dock icon, under “Recent Folders”, and the folder where I saved the PDF file is right there at the top of the menu as the most recent folder used and I can just SELECT it in that menu to open it in the Finder and finally edit the name of the PDF file.

If I didn’t have Default Folder X, I would have to browse through all kinds of windows and folders in ORDER to reach the destination where the PDF file was saved — because Mac OS X’s own built-in “Recent” feature is not smart enough for this. A long time ago I actually devoted an entire column to what I called the “need for a decent ‘Recent’ feature in Mac OS X“. I am still waiting for Apple to finally understand that the “Recent” feature needs to be document-centric and not application-centric. In this particular case, I need Application B (the Finder) to know where I saved my PDF file in Application A (Safari). Mac OS X’s Recent Folders feature (in the “Go” menu in the Finder) is utterly unable to do such a simple thing. All it can remember is the last 10 (or 20 or whatever) folders that I visited… in the Finder.

To make a long story short, we have two shortcomings (Safari’s lack of help for naming PDF files and the insufficient Recent Folders feature in the Finder) that conspire to make something that should be fairly simple (saving a web page as a PDF file) more complicated than necessary for the end user.

8 Responses to “Saving as PDF in Safari”

  1. ssp says:

    Have you tried using Apple’s “PDF workflow” (or however they call it) feature?

    Just make a folder called ‘PDF Services’ in your Library folder and place an alias of wherever you want the PDFs to go inside it. Then magically the ‘PDF’ button in the Print dialogue will be a menu containing that folder. Simply select it and the PDF will be saved with an appropriate title at the selected location.

    IIRC there is a technote on this with more details, but that’s what it boils down to for me.

  2. Pierre Igot says:

    Interesting. I do have the PDF Services menu on, but I thought you could only put aliases of applications in there. When I choose an application such as Acrobat Reader, all Safari does is create a temporary PDF file called “Print Job.pdf” and open it in Acrobat Reader.

    But then following your suggestion I put an alias of a folder in there. And indeed Safari does save a PDF file in that folder with a name that is a truncated version of the title of the window, with the “.pdf” extension.

    Could be handy!

    Of course, it doesn’t solve the issue regarding the exact location where I want to store the file. As you can imagine, since printing to PDF is a habit of mine, I have hundreds of such files, so I have to file them away in different folders (“Macintosh”, “Politics”, “Health”, etc.) and subfolders within those folders.

    I would still have to

    1) go to the default folder location (the alias in PDF Services)

    2) select the file and rename it with a more accurate name

    3) move the file manually to the proper destination

    So it wouldn’t improve the workflow that much to use the option you suggest. But it’s a valid suggestion. I wasn’t aware that Safari did use the title of the web page as the PDF file name when using the folder option in PDF Services.

    It should do the same thing when the user selects the “Save as PDF” command and does things manually.

  3. ssp says:

    I suppose it’s valid to expect Safri to suggest a filename normally. Have you filed a bug report on this? It should be easy to fix, seeing that it already works for the PDF Services.

    You could avoid step 3 above by placing aliases of all relevant folders into the PDF Services folder, I guess.

  4. ssp says:

    Does Safari really truncate the file names? Even this page’s rather long name isn’t truncated. (Having longer names would be bad style anyway…)

    Printing this page gives quite strange results, btw.

  5. Pierre Igot says:

    1) I will file a “bug” report through Bug Reporter. It should also be noted that file names for the PDF files are suggested in other applications, so it’s probably a Safari-specific issue.

    2) I can’t really place aliases of “all relevant folders” in the PDF Services, there are just too many of them :).

    3) I can’t reproduce the truncating I noted earlier. Might have been because of some punctuation in the title of the web page I tried.

    4) Agreed about printing this blog. I just haven’t had time to work on this at all. I need to create printer-friendly CSS — but I also need to determine why the default printing behaviour with this CSS is so bad. It’s on the list :). Thanks for reminding me, though.

  6. Pierre Igot says:

    OK, I’ve added a “Printer-Friendly” link below each blog entry that refers to a page with a printer-friendly design. Let me know if it doesn’t work for you.

  7. ssp says:

    The font looks huge.

  8. Pierre Igot says:

    I am afraid that’s a bug in Safari. The font size specified in my CSS is 11 points, which is perfectly reasonable for printing purposes. Things print just fine in Camino. The huge font problem is not limited to this web site. If you try to print an article from the New Yorker web site, you will encounter the same problem. The only solution is to actually decrease the size of the font on screen before printing.

    This bug was introduced in the final version of Safari. Prior betas were not affected.

Leave a Reply

Comments are closed.