For documentation purposes, I need an application or plugin, which targets the creation of PDF out of web pages and goes beyond the rudimentary features provided by common browsers.

Must haves

  • selection of multiple sub-pages
  • document-internal link consistency
  • stylable header / footer
  • adjustable document scaling and page borders
  • suppression of selected site-parts (header, navigation, side panels) especially for pages that don't provide printer style sheets

Nice-to-haves

  • custom page-break insertions
  • table of content generation
  • font substitution
  • text flow control
  • multi-column re-layouting
  • document property generation (meta data)
  • It sounds like you are trying to automate(?) screen-based layout into document-style layout - always a non-trivial thing. Have you considered going the other way PDF -> HTML or even simply generating PDFs from the same information but not trying to convert arbitrarily complex HTML pages? – Paul Jowett Nov 27 '14 at 3:21
  • In cases where your have control over the presented content, it's in fact more appropriate to follow the principle of single sourcing. If you are an external consumer of a given artifact, the effort depends on your use case. – Jens Piegsa Nov 27 '14 at 8:53
up vote 12 down vote accepted

To create PDFs output of web pages I see a valuable solution by using the Mozilla Firefox browser, together with ScrapBook and Print pages to PDF plugins:

enter image description here

The Scrapbook plugin perform the pages capturing into the browser sidebar (by choosing a command in the right-click menu of the browser window, or by using the Save options from the ScrapBook menu). There is the possibility to set custom shortcut keys for a lot of commands, also.

Once a pages is saved and displayed in the sidebar, if you are looking for quick results only right click the page name and choose to print it:

enter image description here

enter image description here

We can see easily that we have a nice table of content and all the internal (and external) links work smoothly!

Looking in the document's properties I don't see anything special, only the Title and the Producer. (I didn't found a way to add custom metadata inside the pdf).

enter image description here

Let's go to produce another pdf, but this time, we'll walk on the long path:

enter image description here

enter image description here

As you can see, there are the possibility to choose the link depth. Using the first in-depth level, you'll have the possibility to download 121 StackExchange frontpages:

enter image description here

You have the option even to made a pdf with all 121 webpages or with a bookmark selection from the sidebar, so the selection of multiple sub-pages is fulfilled, also.

Looking at the Print pages to PDF plugin properties, one can see several options for formatting the output (margins, page size), an outline by headlines, custom headers and footers for the whole pdf or separate for individual webpages in the pdf.

One of the most useful feature of the Scrapbook plugin gives the ability of changing the DOM by removing children of elements, before saving the changes and converting into pdf. Also, you can highlight the text or even freely place annotations inside the web page:

enter image description here

  • 3
    That does look promising. I'll check it out and I can already say: this is the kind of answer that is going to boost this community to a high quality level. Thank you! – Jens Piegsa Feb 22 '14 at 23:20
  • On 7/21/18 it appears the download link is broken, and may no longer be supported by the newer version of firefox. – cybernard Jul 21 at 14:59

I use Bullzip PDF Printer, while i've only used it with Microsoft Word how you use it is that you use the print function with the application and you select the new printer which appeasers after Bullzip is installed, when you print it'll ask where to save the pdf

i'm not sure how much it matches to what you "Must Have" list as i only use it to convert Microsoft Word documents to .pdf but it also installs a separate application which you can use to configure the printer but in my view it's essentially just a normal printer which outputs a digital file rather than kills a tree.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.