On 02/06/2013 04:14 PM, Ruediger Landmann wrote:
Hi folks:
Publican 3.1 is now out. It's mostly a bugfix release with very few
changes that are visible to most users.
Probably the most significant issues resolved this time are related to
PDF generation. Previously, the PDFs produced by wkhtmltopdf had some
interesting quirks, like internal links that dumped you in the middle of
sections or chapters instead of the beginning, and admonitions and other
cruft that crept into the table of contents displayed by PDF viewers.
These and other quirks are now fixed, and a few enhancements to the PDF
structure (better-defined covers and titlepages) have been added. You
can find a full list of the changes below.
The source RPM is available from:
https://fedorahosted.org/releases/p/u/publican/publican-3.1.0-2.el6.src.rpm
I hope to have this packaged for Fedora in the next week or so.
Cheers
Rudi
661946 [RFE] Hard coded paths to share files
787243 Publican Users Guide. New section created for installing in
OpenSuse.
839128 Docbook 5 schema is hardcoded
839975 RFE: scripts directory in brand
845432 Revision History sorted wrongly when packaging translated books
846899 Too many formal objects get ToC entries in PDF
847206 <p/> renders with content outside tags
854425 XmlClean alters file permissions
863899 Interlingua support
872432 RFE: support a language variable in the menu_category config file
parameter
873586 "Draft" watermark does not display in PDF
874180 The test suite fails in 110.CreateBrand.t and 920.WebSite.t
874277 Spelling mistakes in POD documentation
874344 RFE -- expose the cover option for wkhtmltopdf
874795 FAQ TOCs do no render in PDFs. You get double headings.
875021 publican build ignores --brand_dir, and doesn't accept a rel
875967 Tables are generated with a 1px border and have no marker class
879388 Clickable links to different parts of a book do not work properly
880621 misaligned items in bread-crumb navigation
894522 /usr/share/perl5/vendor_perl/Publican/ is unowned
Just a note for people using wkhtmtopdf. I had to do some patched for
10.2_rc to get some of the PDF stuff fixed. I intend to pass these
upstream for consideration but I thought I'd attach the patches here so
anyone who wants can use them a.s.a.p.
shortanchors.patch fixes a bug where using a deep path when creating a
PDF can make the PDF unreadable on some commercial software.
No tocintoc.patch actually does two things. Firstly it stops the TOC
appearing in the TOC. Secondly it changes the behaviour of page
numbering so that having multiple cover pages, as we do in 3.1, doesn't
make the starting page number increase. That is, without the patch the
more cover pages you add, the higher the page numbers are in the TOC.
For brand owners the behaviour of headers, footers, and cover pages has
changed. There is now a new directory in the publican install,
book_templates, which controls the content of TOC, headers, footers, and
the cover pages. If you copy this directory to the root directory of
your your brand, you can override the XSL and Template::Toolkit
templates, allowing total control of these components in your brand.
Cheers, Jeff.
--
Jeff Fearn <[email protected]>
Senior Software Engineer
Infrastructure Engineering & Development (AEU)
Red Hat Asia Pacific Pty Ltd
GPG: 0x0357E8F0
diff -ru wkhtmltopdf-0.10.0_rc2/src/lib/outline.cc wkhtmltopdf-0.10.0_rc2-patched/src/lib/outline.cc
--- wkhtmltopdf-0.10.0_rc2/src/lib/outline.cc 2011-01-31 05:27:22.000000000 +1000
+++ wkhtmltopdf-0.10.0_rc2-patched/src/lib/outline.cc 2013-01-25 14:33:22.311191883 +1000
@@ -134,6 +134,9 @@
void OutlinePrivate::dumpChildren(QTextStream & stream, const QList<OutlineItem *> & items, int level) const {
foreach (OutlineItem * item, items) {
+ // Do not display TOC in TOC
+ if(item->value == "" ) continue;
+
for (int i=0; i < level; ++i) stream << " ";
stream << "<item title=\"" << escape(item->value) << "\" page=\"" << (item->page + prefixSum[item->document]+ settings.pageOffset) << "\" link=\"" << escape(item->anchor) << "\" backLink=\"" << escape(item->tocAnchor) << "\"";
if (item->children.empty())
@@ -213,6 +216,8 @@
root->page = 0;
root->document = document;
root->value = name;
+ // Do not display TOC in TOC
+ if(name == ps.toc.captionText) root->value = "";
root->display = true;
OutlineItem * old = root;
diff -ru wkhtmltopdf-0.10.0_rc2/src/lib/pdfconverter.cc wkhtmltopdf-0.10.0_rc2-patched/src/lib/pdfconverter.cc
--- wkhtmltopdf-0.10.0_rc2/src/lib/pdfconverter.cc 2011-01-31 05:27:22.000000000 +1000
+++ wkhtmltopdf-0.10.0_rc2-patched/src/lib/pdfconverter.cc 2013-01-25 14:34:26.281191975 +1000
@@ -289,8 +289,12 @@
if (obj.settings.includeInOutline)
outline->addWebPage(obj.page->mainFrame()->title(), wp, obj.page->mainFrame(),
obj.settings, obj.localLinks, obj.anchors);
- else
+ else {
outline->addEmptyWebPage();
+ // cover pages and such can be two pages.
+ if(obj.pageCount ==2 ) outline->addEmptyWebPage();
+ }
+
painter->restore();
}
diff -ru wkhtmltopdf-0.10.0_rc2/src/lib/pdfconverter.cc wkhtmltopdf-0.10.0_rc2-patched/src/lib/pdfconverter.cc
--- wkhtmltopdf-0.10.0_rc2/src/lib/pdfconverter.cc 2011-01-31 05:27:22.000000000 +1000
+++ wkhtmltopdf-0.10.0_rc2-patched/src/lib/pdfconverter.cc 2013-01-21 16:32:02.283758592 +1000
@@ -408,8 +408,8 @@
e = p->page->mainFrame()->findFirstElement("*[name=\""+href.fragment()+"\"]");
}
if (!e.isNull()) {
- p->anchors[href.toString()] = e;
- local.push_back( qMakePair(elm, href.toString()) );
+ p->anchors[h] = e;
+ local.push_back( qMakePair(elm, h ));
}
}
} else if (uexternal)
_______________________________________________
publican-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/publican-list
Wiki: https://fedorahosted.org/publican