Feed
 

Saving PDFs from Safari

Avatar Douglas Cheney
When saving a PDF file in Safari using reader I find that the images are not showing just blank pages. Has anyone else had this problem and is there a workaround

Re: Saving PDFs from Safari

Avatar Mick Burrell
I suspect it's because the images are stored in a different place on the web site and are loaded by the page you're visiting.

You could load it in Safari and take a screenshot.

Re: Saving PDFs from Safari

Avatar Douglas Cheney
Until the latest version of Safari when saving as a PDF using reader and the print dialog I always got a complete copy of the article

Re: Saving PDFs from Safari

Avatar Eleanor Spenceley
I've tried this on Monterey 12.3.1 with the BBC website and am not seeing any issue. Is it a specific website which is having this issue or are you experiencing it on many? What version of OS are you running?

Re: Saving PDFs from Safari

Avatar Douglas Cheney
I am running Monterey 12.3.1 and the latest version of Safari and the web site I am having the problem with is OS X Daily

Re: Saving PDFs from Safari

Avatar Eleanor Spenceley
Now that is interesting, I too can see the problem. It's interesting the images on the pages are actually are embedded images from Pinterest. Perhaps they block or not load the same when the page is generated into PDF.

Re: Saving PDFs from Safari

Avatar Tony Still
You could try (I haven't tested it) saving the page as a Web Archive. Safari (File>Save As) offers the choice in the Format pop-up at the bottom of the Save As dialogue. This promises to save images, amongst other things.

If you specifically need a PDF, you should then be able to open the archive and export a PDF from it.

Re: Saving PDFs from Safari

Avatar Douglas Cheney
Thank you Tony I will try that

Re: Saving PDFs from Safari

Avatar Andrew Kemp
Although saving as a web archive works (and looks as though it is embedding all of the images), exporting a PDF from the web archive does not -- the images are missing again.

It appears to be related to the loading="lazy" attribute on the offending img elements. If I try printing this article as a PDF, for example, the first image (which does not have the attribute) is included, but the subsequent images (which do have it) are not.

One solution, although a bit tedious and fiddly, is to open the web inspector on the original page from Safari's 'Develop' menu, and delete the loading="lazy" attribute from each of the img elements that have it. Then exporting the page as a PDF does include those images (this works both in Reader mode, and without it).

Re: Saving PDFs from Safari

Avatar Andrew Kemp
[Deleted an alternate suggestion that does not work, in general]

Re: Saving PDFs from Safari

Avatar Tony Still
Bah! Someone is being lazy.

Thanks for testing it Andrew.

Re: Saving PDFs from Safari

Avatar Douglas Cheney
Sorry Tony I tried that out and as Andrew says it doesn't work up until the last OS update it worked very well.
 
Feed