[publican-list] wkhtmltopdf output vs fop output

Jeff Fearn jfearn at redhat.com
Thu Aug 4 23:28:38 UTC 2016


On 02/08/16 01:48, Erich Steinböck wrote:
> For our project, until now we used to build all our docs with
> Publican/fop.  As Publican has deprecated fop use, I've made a first try
> with building one of the docs with the Publican/wkhtmltopdf combo.  We've
> never used any project-specifc formatting, neither with fop, nor now with
> wkhtmltopdf - I'm just using the defaults.
> 
> Generally, the PDF layout which wkhtmltopdf produces, looks nice and clean,
> but I'm seeing several major issues versus fop:
> 
> The PDF grew from 740 to 901 pages.  I might not really care, but it's
> rather obvious to the reader that the TOC is now 30 instead of 11 pages,
> because it seems to not only list higher-level headings, but maybe all of
> them.  The index grew from 63 pages in two-column layout with page numbers
> to 130 pages of a single-column layout list of links (which looks rather
> bad).

See my reply to the other email :)

> Each heading shows a leading (invalid) special character in the TOC of the
> PDF viewer (Adobe Acrobat Pro DC 2015), something like "OPreface", or
> "OChapter 1." (the chapter headings themselves don't show this in the
> normal PDF flow)
> 
> All links, in addition to their normal blue color, now feature a prominent
> blue underline which interrupts the flow of reading.
> 
> Examples, which typically are defined with "<example><programlisting><![CDATA[
> ... ]]></programlisting></example>", now show a proportional font, instead
> of a monospaced font.
> 
> Embedded .svg's, typically defined with "<mediaobject><imageobject><imagedata
> fileref="images/...svg" scale="55" /></imageobject></mediaobject>" are now
> scaling to a fixed width, instead of variable width, but scaled to 55% of
> their size.

If you use the common brand do these things happen? We haven't had any
reports of these things and we a lot of docs generated with this tool chain.

e.g.

https://jfearn.fedorapeople.org/en-US/Publican/4.3/pdf/Users_Guide/Publican-4.3-Users_Guide-en-US.pdf

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/pdf/Migration_Planning_Guide/Red_Hat_Enterprise_Linux-7-Migration_Planning_Guide-en-US.pdf

The RH one  has a dotted underline for links, but that's an override.

> Unchanged to as what fop did, headings, example titles etc. still allow
> page breaks between them and any immediately following body text.

Yeah widows and orphans is hard to solve. I think upstream would have to
get a newer version of the browser engine to get better at that. CSS3
has some nice pagination handling but the engine version being used
doesn't support it.

> Are others also experiencing this?  How can this be fixed?  Are there other
> pre-defined layouts hwich might work better?

Take a look at the HTML and see if it looks like what you want in there,
it will be missing the headers and footers, edit you overrides.css to
get the look you want, then regenerate the PDF to see if the changes
look the same in the older engine.

Cheers, Jeff.

-- 
Jeff Fearn
Senior Software Engineer
PnT - DevOps - Development
Red Hat Asia Pacific Pty Ltd
http://dilbert.com/fast/2004-08-17/
PGP Fingerprint: B61A DC52 3E0E B17C 94D7 945C BB37 478C F119 9BCA




More information about the publican-list mailing list