Print to PDF preserving hyperlinks

@codegenki Thanks, and I agree. “Save as PDF” (from pdfcrowd dot com) looks quite as able, but has limits on page size. Thanks for the reference to another add-on.

There is a 10 year old open ticket for this problem: https://bugzilla.mozilla.org/show_bug.cgi?id=454059

Feel free to add your +1 vote. It’s astonishing this has not been fixed for such a long time period.

2 Likes

To generate PDFs with hyperlinks requires code in Firefox or an add-on to build the document rather than sending it to a printer driver.

  • Adobe’s “Create PDF” extension is a proprietary WebExtensions example (bundled with Acrobat Standard or Pro, but not Reader)
  • The legacy extension Print Pages to PDF did it using the wkhtmltopdf library, which might be how Safari and Chrome do it (Possible Update for Print Pages to PDF Add-on)

Note: The tabs.SaveAsPDF() method available to extensions emulates printing, so that doesn’t help with this problem.

Actually, I use “Save as PDF - by pdfcrowd.com” Firefox plug-in.

However, I still think that browser (Firefox) should be able to print page as PDF with hyperlinks. If Chrome can do that, what prevents Firefox from doing the same, without plug-ins?

@Konstantin_Boyandin
What prevents? So called “Mozilla knows better”…

@developer11 Yes, that’s a mighty spell, it has already finished off Xmarks, with their bookmarks sync.

Looks like Mozilla learned nothing and will continue to neglect developers’ and users’ actual needs, no matter what.

1 Like

No offense intended, but without a link pointing to an authoritative source of reference that strikes me as opinion or conjecture. It would be much more informative if you will please post a link to where the matter has been discussed. eg. it’s on the road map but not top priority, it would add uneccessary undesirable code bloat because it’s an edge case feature that addons can provide, implementation would be more involved than it’s felt it’s worth because of the way the engine is designed, etc.

Knowing the actual “why not” would at least give anyone that found this topic and wanted to help change this a starting point.

I haven’t heard of that one. I should update my list of converters post: So many PDF converters

I don’t think anyone’s disagreeing this would be nice to have but it’s obviously on the back burner. As long as there are effective workarounds, I don’t see the priority getting raised. Someone who cares needs to step forward and code it.

@jscher2000 The “nice to have” is, in fact, almost obvious feature. if I print a Web page, it could be quite obvious to keep the active working hyperlinks within it.

To Google Chrome developers that was obvious enough, Chrome prints PDF files with working links. To Firefox developers, strangely, that’s not obvious.

The problem with crutches (workarounds, plugins in this case) is that they a) can die at any moment; b) can require payment to print with links; c) may not work as expected.

For example, mentioned “Save as PDF” actually loads current page from its server, then prints and sends as PDF. If the page requires authentication to access the content, plugin will not print the page I see in browser.

So no, this is a feature that is VERY nice to have in browser, in native implementation.

At this step the development management, if they condescend to this mundane thread, will say something like “We may consider that somewhere in future”, correct?

Bells and whistles are of much more importance than the really useful features.

2 Likes

I am not associated with Mozilla the entity. What I may have in common is that I have been writing code for many years. I have seen many instances where an author of a what started as a relatively “simple” script received many “feature requests” (including edge cases) that when added resulted maintenance problems and at times even complaints that the script was too large and confusing. The sad fact is that it’s impossible to please all of the people all of the time.

Whether or not a developer wants to do one or a few things well, or wants to do “everything” is up to the developer. Pull Requests can be a big help in lessening the work load, but it’s still up to the developer to decide on accepting or rejecting the PRs.

What I meant by “authoritative” is a post made by someone that is “Mozilla” where they gave the reason for the feature not existing.

Live links in printed PDF documents is a feature, really requested by majority of users. Google Chrome does that. Opera does that. Brave does that.

But Mozilla Firefox doesn’t. What’s worse, all the ado is about a minor improvement (to add a real link while generating PDF output is de facto including several lines of code).

Once again. What worries me is that Mozilla stopped doing changes actually requested by many users (carry out a survey about active links in PDF files, to see whether those are requested). The canned response to most criticism is “do it yourself, or use a plug-in”.

Since we have seen how Mozilla can abandon developers of plug-ins (see the thread mentioning Bookmarks API that was still unfinished when Firefox ceased to support XUL - and read of some consequences, such as Xmarks shutdown), the official Mozilla policy can be named hypocrisy.

What I would like to ask Mozilla to do is to run survey about adding live hyperlinks into PDF (without any plug-ins) and add, officially, that task to its public planned features lists.

Otherwise, it will be just another promise or canned response “do it yourself if you need it”.

1 Like

But doesn’t it? No addons or extensions:

If the hyperlink was in the form of

<a href=“URL”>Text</a>

you will only see “Text” in PDF, without any URL.

So no, Firefox doesn’t.

2 Likes

Shall silence from Mozilla devs be interpreted as “We don’t care, we won’t do that”?

1 Like

Any updates on this? I am working on paged html documentation and the only reason why the developers choose chrome is due to the hyperlink issue.

1 Like

Plus one for this feature.

1 Like

oh my god I’ve sent job application documents with links to my references last week and created the PDF from html in firefox … In print preview the links react to cursor hover and in the final result they look like real links (underline etc)

I’ve created my prior applications with chrome and did not check another time if the links still work when using firefox. At this point I feel really upset :persevere:

3 Likes

12 years after bug report and almost 3 years after this discourse thread the issue is still unfixed: https://bugzilla.mozilla.org/show_bug.cgi?id=454059 although Jonathan West reported some work being done it still feels very low prio :disappointed_relieved:

1 Like

I suppose that’s a clear message from the devs “We won’t do that”.

Well, if Mozilla prefers my donating to third parties implementing such obvious and useful features that even Google Chrome offers - no problems. I will support them instead of supporting Mozilla.

Good news: tonight’s Nightly build (future Firefox 90) now encodes links when you use the new print experience and “Save to PDF” as your printer.