I have had no luck generating a PDF from a Safari web page while preserving links. The links show up as a different color on the PDF. But, when one taps on the link, it does nothing. It doesn’t matter whether I use Create/Make PDF or Print/pinch-zoom to generate the PDF.
Is there a solution to this issue?
Of course, on macOS, it’s quite simple to generate a PDF of a web site with all the links properly functional in the PDF.
Does this only happen in Safari? I use Chromeas my main browser instead of Safari, and as a test I just saved this webpage as a PDF then opened in Preview, and it opened perfectly fine back in Chrome.
I just tried several web sites using Chrome on iOS: nytimes.com, washingtonpost.com, a random search on google.com. In all cases, when I generate a PDF from the web site, none of the links in the PDF work.
Yes, this is what I’ve been doing — but, WebArchive doesn’t scratch a particular itch. I use DevonThink, which provides me an option to save as a WebArchive. That part is convenient. Unfortunately, one can’t annotate a WebArchive like a PDF. Therefore, I resort to also storing a PDF version on which I can write on the margins, circle stuff, etc.
As a workaround have you tried “save as pdf to Books”? The resulting pdf does not preserve the links but it takes the target of the link (the URL) and inserts it in parentheses after the link word. You don’t say if you need/want a live link or not, but this might be good enough. From Books you can always export it to GoodReader etc. If you send it to the Mac, the url is live.
I registered this account just to make this post, to help anyone else having this same problem.
The problem in Safari for MacOS is it will strip links when exporting to PDF. It will remove anchor tags when they are inside paragraph text or inside any tag.
I found the solution in Orion browser, that will “Export as PDF…” the same way as Safari, but preserve all links.
If this looks like spam I apologize. This solution actually works, and works well. I tried everything, including various command line tools or remaking the HTML to please Safari.
I hope somebody with the same problem stumbles upon my post.
You shouldn’t be having any trouble preserving links in the print to pdf function in MacOS Safari, that’s worked for several years. You don’t need any special settings or software for that.
The issue with links not working in print to pdf is an iOS issue. (And I’m amused to use @midas0441 flagged this with Apple in 2018, since it’s now 2022 and they still haven’t fixed it )
My (terrible) work-around is that I now just save the links in a note and print to pdf when I’m on my Mac. Which is ridiculous!
In Safari 14 (ie Mojave version) links are not always preserved when using “Export as PDF…” option. This option preserves CSS styles and page size, which printing to PDF does not.
Only if the html element such as p, h1, h2 etc is wrapped inside an anchor tag (a href) will the links work. If the anchor tag is inside the html element, links will be removed when using “Export as PDF…” in Safari. In Orion browser the links are not removed. If there are any other working solutions for this without the need for 3rd party software, I’m eager to hear.