[Booki-dev] Challenges in rendering automatic covers

Tuukka Hastrup Tuukka.Hastrup at iki.fi
Fri Oct 14 04:50:52 PDT 2011


I made some progress with help from Elisa on IRC.

First, she sent this example of what kind of a result we're ideally 
targetting, although it could be much simpler at this point:
http://tuukka.iki.fi/tmp/example-cover.png

Second, a new idea to alternatively use Scribus for this came up in the 
discussion, as Scribus is meant for page-making given text and image 
assets. Unfortunately, on the IRC channel #scribus, I heard that the 
efforts to make Scribus suitable for automatic rendering are still 
experimental. Thus, someone could explore e.g. running Scribus headless 
with Xvfb and scripting it with Scribus Scripter2 which was part of the 
GSOC this year:
http://scripter2.jainbasil.net/
http://jainbasil.net/scripter2/

Third, on the IRC channel #inkscape, I learned about the current 
limitations of the SVG approach such as flowed text (automated 
text-layout) being Inkscape-only and Inkscape not supporting 
high-quality rendering of SVG images nested within an outer SVG image. 
It might be possible to convert the flowed text to non-flowed with 
Inkscape then use something like wkhtmltopdf to convert standard SVG to 
PDF. wkhtmltopdf crashes when I try to convert an SVG though. The link I 
got about nested SVG in Inkscape was this:
http://article.gmane.org/gmane.comp.graphics.inkscape.user/14208

The three earlier issues still remain as well:

2011-10-14 02:05, Tuukka Hastrup wrote:
> I hit some "challenges" trying to render book covers automatically as
> needed for lulu.com integration. At the moment, I can render a blank PDF
> of the right dimensions ;-) I'm wondering if anyone else has ideas on
> how to solve (or work around) these:
>
> 1. How to express in SVG a float layout similar to an IMG tag floating
> on the right of a text paragraph in HTML?
>
> 2. Alternatively, how to combine separate HTML-to-PDF renderings of a
> front cover, spine, and back cover into a single PDF *page*?
>
> 3. In either case. how to scale the font size of the book title in SVG
> *or* HTML so that the title width matches the horizontal page available
> in the cover?
>
> Actually, I wouldn't mind if someone else wanted to whip up something
> for this as it's only tangential even though required for the lulu.com
> integration.
>
>
> Regards
> Tuukka
>
> P.S. Here's what I use for the blank test PDFs: wkhtmltopdf-i386
> --page-width 210 --page-height 297 --load-error-handling ignore
> /dev/zero a4.pdf
>
> _______________________________________________
> Booki-dev mailing list
> Booki-dev at lists.flossmanuals.net
> http://lists.flossmanuals.net/listinfo.cgi/booki-dev-flossmanuals.net



More information about the Booki-dev mailing list