[publican-list] RHEL 6 packages for publican 2.8 and 3.0.0

Jeff Fearn jfearn at redhat.com
Thu Nov 8 23:44:44 UTC 2012


On 11/08/2012 09:19 PM, Norman Dunbar wrote:
> Hi All,
>
> On 08/11/12 04:50, Ruediger Landmann wrote:
>> Getting rid of FOP is a worthy goal indeed.
> I know there's a lot of "hatred" for fop here, and I suppose if you have
> to maintain it, then it's most likely justified, but....
>
> I need to create documents that will be printed out. They need to be in
> PDF format and fop does a pretty good job. (But then again, I'm not
> maintaining it - so I feel your pain!)
>
> My documents have indices. And these have page numbers as the cross
> reference, so I get this in my printed copy:
>
> Introduction......7
> Concepts..........32
> Recursion.........98
>
> When I last tried wkhtmltopdf, I discovered that the indices were
> treated the same as the HTML (obvious really) in that the page numbers
> were replaced by section titles:
>
> Introduction......1 Introduction
> Concepts..........2 Concepts
> Recursion.........8 Recursion

The PDFs we generate, even with FOP, are not specifically for printing. 
There have always been issues with it and we specifically state they are 
for electronic distribution not printing.

So with that in mind, P3 doesn't get wkhtmltopdf to generate the toc, it 
uses the HTML TOC DocBook generates. To change that requires tweaking 
the XSL to stop making the HTML TOC and switching on a command line 
parameter to get wkhtmltopdf to make the toc.

<bang><bang><bang>

$ wkhtmltopdf --header-spacing 5 --footer-spacing 3 --margin-top 20 
--margin-left 15mm --margin-right 15mm --header-html 
/usr/share/publican/header.html toc index.html test.pdf

Now I have a PDF with two TOCs and the new TOC before the "front" page 
... eeew ... but I can see the wkhtmltopdf toc so that's good.

Chapter 4. Creating a document.........26
..4.1. Files in the book directory.....28

Seems to work as expected, we'd need to pretty up the styles and look at 
the numerous toc command line options.

Certainly seems practicable to support print PDF specifics.

Cheers, Jeff.

-- 
Jeff Fearn <jfearn at redhat.com>
Senior Software Engineer
Infrastructure Engineering & Development (AEU)
Red Hat Asia Pacific Pty Ltd
GPG: 0x0357E8F0




More information about the publican-list mailing list