From erich.steinboeck at gmail.com Mon Aug 1 07:42:08 2016 From: erich.steinboeck at gmail.com (=?UTF-8?Q?Erich_Steinb=C3=B6ck?=) Date: Mon, 1 Aug 2016 09:42:08 +0200 Subject: [publican-list] Fedora: Brand not honoured in PDF In-Reply-To: <5c481a5d-1d83-6962-a32f-2e28fb8b6ada@redhat.com> References: <20160730153809.771374159w664ds8@10.215.1.9> <5c481a5d-1d83-6962-a32f-2e28fb8b6ada@redhat.com> Message-ID: > > include a wkhtmltopdf compatible brand > Jeff, will the switch from FOP to wkhtmltopdf be a "migration" project with tons of changes to the docs XML themselves? Or, hopefully not? Are there some simple steps how the change to wkhtmltopdf might be done? Although our publican.cfg contains a line "brand: oorexx" I assume, this was solely done to define some common content, and not at all to have some specific brand formatting. Maybe we can just use one of the predefined brands? Here is how a formatted document used to look like: https://sourceforge.net/projects/oorexx/files/oorexx-docs/5.0.0alpha/rexxref5_r11039.pdf/download Based on this look, can you suggest one of the pre-defined brands with the same (or similar) look? Thanks!!! On Mon, Aug 1, 2016 at 12:56 AM, Jeff Fearn wrote: > This is because publican dropped support for FOP a couple of years back, > and deprecated it quite a few years before that. Some brands never > updated to use wkhtmltopdf or to update their pdf.xsl to include all the > customization dropped from publican. > > You will need to talk to the brand maintainers to updated their brands > to either carry the dropped XSL of to include a wkhtmltopdf compatible > brand. > > https://bugzilla.redhat.com/show_bug.cgi?id=1168765 > > FYI the fedora docs infra still uses an ancient version of publican, > which is why they have FOP support without updating their pdf.xsl, but > out of date branding. > > FWIW I did try and get the tool chain and site updated, but failed :( > > > https://lists.fedoraproject.org/archives/list/docs at lists.fedoraproject.org/thread/STXBZUNKUSDDJWRV4UYTIT53RVPJANBY/#KM62HNT2VMZHPAAMFASJ4S6N2VONFOH7 > > > On 31/07/16 19:39, Erich Steinb?ck wrote: > > I'm having the same problem on Ubuntu 16.04 > > brand isn't honored, none of the images are found during formatting, the > > final PDF is in a dull default font. > > > > Any ideas how to debug this issue? > > > > Thanks .. Erich > > > > > > On Sun, Jul 31, 2016 at 12:38 AM, Alan Murrell wrote: > > > >> Hello, > >> > >> I am running Fedora 24, but I had this same issue in Fedora 23. I > >> installed Publican from the repositories. When I build a document in > PDF > >> format, no matter what brand I select, the resulting PDF has no brand > >> formatting or any images of any kind. > >> > >> If I build the same document in either HTML format, the resulting > document > >> is correct as far as the brand goes (including images) > >> > > > > > > > > _______________________________________________ > > publican-list mailing list > > publican-list at redhat.com > > https://www.redhat.com/mailman/listinfo/publican-list > > Wiki: https://fedorahosted.org/publican > > > > > -- > 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 > > _______________________________________________ > publican-list mailing list > publican-list at redhat.com > https://www.redhat.com/mailman/listinfo/publican-list > Wiki: https://fedorahosted.org/publican > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Norman at dunbar-it.co.uk Mon Aug 1 12:25:41 2016 From: Norman at dunbar-it.co.uk (Norman Dunbar) Date: Mon, 01 Aug 2016 13:25:41 +0100 Subject: [publican-list] Fedora: Brand not honoured in PDF In-Reply-To: References: <20160730153809.771374159w664ds8@10.215.1.9> <5c481a5d-1d83-6962-a32f-2e28fb8b6ada@redhat.com> Message-ID: Afternoon all, Can wkhtmltopdf do indexes properly yet? I've had problems with it in my pdf indexes where it creates indexes which are just pages of links html style rather than a tidy list of page numbers? It also, if I remember correctly, not do multiple indexes. Cheers, Norm. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. -------------- next part -------------- An HTML attachment was scrubbed... URL: From erich.steinboeck at gmail.com Mon Aug 1 14:06:08 2016 From: erich.steinboeck at gmail.com (=?UTF-8?Q?Erich_Steinb=C3=B6ck?=) Date: Mon, 1 Aug 2016 16:06:08 +0200 Subject: [publican-list] Fedora: Brand not honoured in PDF In-Reply-To: References: <20160730153809.771374159w664ds8@10.215.1.9> <5c481a5d-1d83-6962-a32f-2e28fb8b6ada@redhat.com> Message-ID: > > Can wkhtmltopdf do indexes properly yet? > I've had problems with it in my pdf indexes where it creates indexes which > are just pages of links html style rather than a tidy list of page numbers? > With wkhtmltopdf 0.12.3 (with patched qt) the index of one of our books is (by default, no idea if this can be changed) now a single-column list of links, not page numbers. Thus it grew from 63 pages with fop to 130 pages now .. It also, if I remember correctly, not do multiple indexes. > No idea about multiple indexes On Mon, Aug 1, 2016 at 2:25 PM, Norman Dunbar wrote: > Afternoon all, > > Can wkhtmltopdf do indexes properly yet? I've had problems with it in my > pdf indexes where it creates indexes which are just pages of links html > style rather than a tidy list of page numbers? It also, if I remember > correctly, not do multiple indexes. > > Cheers, > Norm. > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > _______________________________________________ > publican-list mailing list > publican-list at redhat.com > https://www.redhat.com/mailman/listinfo/publican-list > Wiki: https://fedorahosted.org/publican > -------------- next part -------------- An HTML attachment was scrubbed... URL: From erich.steinboeck at gmail.com Mon Aug 1 14:55:40 2016 From: erich.steinboeck at gmail.com (=?UTF-8?Q?Erich_Steinb=C3=B6ck?=) Date: Mon, 1 Aug 2016 16:55:40 +0200 Subject: [publican-list] Installing wkhtmltopdf for publican Message-ID: As I didn't find it particularly easy to install wkhtmltopdf for publican, I'm posting a short how-to here One should know that publican will be using wkhtmltopdf if it finds it, else it will use fop. So to "switch" to wkhtmltopd, we'll just have to install it. I'm running Ubuntu 16.04, so my first try was of course apt get wkhtmltopdf As running publican build --formats=pdf --langs=en-US would then bring up a bunch of wkhtmltopdf errors "is not support using unpatched qt", I did some research, finding those references: https://www.redhat.com/archives/publican-list/2014-April/msg00003.html http://stackoverflow.com/questions/18758589/wkhtmltopdf-installation-error-on-ubuntu So I did sudo apt-get remove --purge wkhtmltopdf sudo apt-get install openssl build-essential xorg libssl-dev Then, I looked up the "stable" Linux download link from http://wkhtmltopdf.org/downloads.html, and continued with wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz tar xf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz cd wkhtmltox/bin sudo chown root:root wkhtmltopdf sudo cp wkhtmltopdf /usr/local/bin/wkhtmltopdf wkhtmltopdf --version # wkhtmltopdf 0.12.3 (with patched qt) We now have the required "patched" version installed. Again building for PDF would eventually issue a bunch of "failed loading image" errors and finally die in the midst of converting pages. After more research I found https://www.redhat.com/archives/publican-list/2013-August/msg00005.html After setting ulimit -n 8192 the PDF build completed -------------- next part -------------- An HTML attachment was scrubbed... URL: From erich.steinboeck at gmail.com Mon Aug 1 15:48:07 2016 From: erich.steinboeck at gmail.com (=?UTF-8?Q?Erich_Steinb=C3=B6ck?=) Date: Mon, 1 Aug 2016 17:48:07 +0200 Subject: [publican-list] wkhtmltopdf output vs fop output Message-ID: 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). 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 "", now show a proportional font, instead of a monospaced font. Embedded .svg's, typically defined with "" are now scaling to a fixed width, instead of variable width, but scaled to 55% of their size. Unchanged to as what fop did, headings, example titles etc. still allow page breaks between them and any immediately following body text. Are others also experiencing this? How can this be fixed? Are there other pre-defined layouts hwich might work better? Thanks .. Erich -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfearn at redhat.com Thu Aug 4 22:45:48 2016 From: jfearn at redhat.com (Jeff Fearn) Date: Fri, 5 Aug 2016 08:45:48 +1000 Subject: [publican-list] Fedora: Brand not honoured in PDF In-Reply-To: References: <20160730153809.771374159w664ds8@10.215.1.9> <5c481a5d-1d83-6962-a32f-2e28fb8b6ada@redhat.com> Message-ID: On 01/08/16 17:42, Erich Steinb?ck wrote: >> >> include a wkhtmltopdf compatible brand >> > Jeff, will the switch from FOP to wkhtmltopdf be a "migration" project with > tons of changes to the docs XML themselves? Or, hopefully not? No changes are required for the XML. > Are there some simple steps how the change to wkhtmltopdf might be done? > Although our publican.cfg contains a line "brand: oorexx" I assume, this > was solely done to define some common content, and not at all to have some > specific brand formatting. Maybe we can just use one of the predefined > brands? Here is how a formatted document used to look like: > https://sourceforge.net/projects/oorexx/files/oorexx-docs/5.0.0alpha/rexxref5_r11039.pdf/download > Based on this look, can you suggest one of the pre-defined brands with the > same (or similar) look? I think you should restart due to the styles being so different. You do this by adding book_templates/overrides.css to your brand. If you just want colored headings just set the color for h1, h2, h3, etc. If you don't like the styling at all, then you can add book_templates/pdfmain-css.tmpl and replace the CSS entirely. I note the User Guide is insanely out of date :( Exposing book_templates directory happened in https://bugzilla.redhat.com/show_bug.cgi?id=874344 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 From jfearn at redhat.com Thu Aug 4 23:09:25 2016 From: jfearn at redhat.com (Jeff Fearn) Date: Fri, 5 Aug 2016 09:09:25 +1000 Subject: [publican-list] Fedora: Brand not honoured in PDF In-Reply-To: References: <20160730153809.771374159w664ds8@10.215.1.9> <5c481a5d-1d83-6962-a32f-2e28fb8b6ada@redhat.com> Message-ID: <327e1c34-04bc-526f-2152-a4f3cbe8af46@redhat.com> On 02/08/16 00:06, Erich Steinb?ck wrote: >> >> Can wkhtmltopdf do indexes properly yet? >> I've had problems with it in my pdf indexes where it creates indexes which >> are just pages of links html style rather than a tidy list of page numbers? >> > With wkhtmltopdf 0.12.3 (with patched qt) the index of one of our books is > (by default, no idea if this can be changed) now a single-column list of > links, not page numbers. Thus it grew from 63 pages with fop to 130 pages > now .. > > It also, if I remember correctly, not do multiple indexes. >> > No idea about multiple indexes > > On Mon, Aug 1, 2016 at 2:25 PM, Norman Dunbar > wrote: > >> Afternoon all, >> >> Can wkhtmltopdf do indexes properly yet? I've had problems with it in my >> pdf indexes where it creates indexes which are just pages of links html >> style rather than a tidy list of page numbers? It also, if I remember >> correctly, not do multiple indexes. The index is generated by the DocBook XSL and not wkhtmltopdf, you can view the html generated and play with the css to get the layout you want, then add that to you overrides.css, or open a bug with a patch for the pdfmain-css.tmpl :) $ firefox ./tmp/en-US/html-pdf/index.html Remember that wkhtmltopdf uses an older browser engine to render, so don't get too fancy with the CSS ;) I haven't looked in to being able to convert internal links to page numbers, if I had time to spend on it I'd look at doing it in the footer javascript, and if that's not possible then it'd have to be a hack on wkhtmltopdf. Cheers, Jeff. P.S. If anyone wants to modify the tmpl file the docs are at http://template-toolkit.org/docs/index.html -- 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 From jfearn at redhat.com Thu Aug 4 23:28:38 2016 From: jfearn at redhat.com (Jeff Fearn) Date: Fri, 5 Aug 2016 09:28:38 +1000 Subject: [publican-list] wkhtmltopdf output vs fop output In-Reply-To: References: Message-ID: <5dadf75f-6ed5-c1ff-306c-69026bc5f640@redhat.com> 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 " ... ]]>", now show a proportional font, instead > of a monospaced font. > > Embedded .svg's, typically defined with " fileref="images/...svg" scale="55" />" 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