[FM Discuss] Challenges in rendering automatic covers
Cedric Gémy
cedric.gemy at gmail.com
Wed Oct 19 01:32:51 PDT 2011
lo
1. How to express in SVG a float layout similar to an IMG tag floating on
the right of a text paragraph in HTML?
as far as i know there is none but can be doen with CSS which should work
with SVG too
2. Alternatively, how to combine separate HTML-to-PDF renderings of a front
cover, spine, and back cover into a single PDF *page*?
you mean with something like PDFtk ? Why not generate a svg file directly at
the right size containing front+spine+back ?
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?
I guess SVG attribute transform with scale value can do this
http://www.w3.org/TR/2011/REC-SVG11-20110816/coords.html#TransformAttribute
if you have any question regarding SVG please do mind asking me. I'm
programming SVG since the early days of the language so i'm quite used to it
even if i became lazy using Inkscape :)
cheers
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.comintegration.
2011/10/16 adam hyde <adam at flossmanuals.net>
> i did find some time ago a javascript that enabled 90 degree rotation
> alignment of text...good for the spine...on a plane now so will check when i
> am at the doc sprint hotel
>
> adam
>
>
> On 14/10/11 17:29, Tuukka Hastrup wrote:
>
>> 2011-10-14 05:34, adam kirjoitti:
>>
>>> actually, why not just use html and convert to pdf?
>>>
>>
>> Yeah, maybe that's ok for now although it doesn't give as much options
>> as Inkscape for the artist.
>>
>> To get the required PDF with front, spine and back on one page from HTML
>> format, we would need to figure out a way to combine the three separate
>> PDF pages, *or* make the combined layout as well as the spine text 90
>> degree rotation in CSS. Would anyone know how to do a HTML/CSS design
>> like this right away?
>>
>> On 10/14/2011 01:50 PM, Tuukka Hastrup wrote:
>>>
>>>>
>>>> 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<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://scripter2.jainbasil.net/>
>>>> http://jainbasil.net/**scripter2/ <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<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 <Booki-dev at lists.flossmanuals.net>
>>>>> http://lists.flossmanuals.net/**listinfo.cgi/booki-dev-**
>>>>> flossmanuals.net<http://lists.flossmanuals.net/listinfo.cgi/booki-dev-flossmanuals.net>
>>>>>
>>>> ______________________________**_________________
>>>> Discuss mailing list
>>>> Discuss at lists.flossmanuals.net
>>>> http://lists.flossmanuals.net/**listinfo.cgi/discuss-**flossmanuals.net<http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net>
>>>>
>>>
>>>
>> ______________________________**_________________
>> Discuss mailing list
>> Discuss at lists.flossmanuals.net
>> http://lists.flossmanuals.net/**listinfo.cgi/discuss-**flossmanuals.net<http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net>
>>
> ______________________________**_________________
> Discuss mailing list
> Discuss at lists.flossmanuals.net
> http://lists.flossmanuals.net/**listinfo.cgi/discuss-**flossmanuals.net<http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net>
>
--
Cédric Gémy
-----------------------------------------------------------------
Formationlibre.org
FlossManualsFrancophone
Association Francophone des Graphistes Libres
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.flossmanuals.net/pipermail/discuss-flossmanuals.net/attachments/20111019/51da5a4d/attachment-0001.htm>
More information about the Discuss
mailing list