[daisy] SVG to PDF
Bruno Dumon
bruno at outerthought.org
Thu Jul 6 09:47:19 CDT 2006
FOP (the thing that generates the PDFs in the Wiki) can indeed render
SVGs as PDF vector instructions, at least to a certain extent, the
quality of the results will depend on what SVG features are used
(filters won't work for example, see the FOP docs for more info).
In the explanation on the wiki page, the vector approach is used:
http://cocoondev.org/daisyscratchpad/g1/263.html
(see also the acrobat screenshot over there)
However, for the default SVG support in Daisy 1.5 I have opted to use
the bitmap rendering since this will give an acceptable rendering for
all SVGs. For the vector rendering, there's also still the issue to
solve about setting the size of the SVG (nothing impossible).
Now, it is so that the quality of the bitmap-rendered SVGs in the PDFs
isn't very good. In the PDFs generated by the book publishing feature,
the SVGs are rendered as high-resolution bitmaps (by default 250dpi)
which gives very nice results. However, since the PDFs in the Wiki are
rendered 'on the fly' (while the books are produced in batch),
generating such high-resolution images on the fly is not really an
option since it would be too heavy for the server. An in-between dpi
value would of course be possible, but again this would require a bit of
extra work to implement (currently the default dpi setting, I think 75
or 96 dpi, is used).
On Thu, 2006-07-06 at 10:34 -0400, CampbellG at dfo-mpo.gc.ca wrote:
> I have been speaking with a colleague here who installed 1.5M2 fresh and he
> indicated to me that his install rendered the svg's as vector images and not
> bitmaps (no pixelation). My install was an upgrade from 1.4.
>
>
> Glenn Campbell
> Acting Manager chef par intérim
> Informatics Informatique
> Canadian Coast Guard College Collège de la Garde côtière canadienne
> Telephone : 902-567-3222 téléphone : 902-567-3222
> Fax : 902-567-3232 fax : 902-567-3232
>
>
> -----Original Message-----
> From: daisy-bounces at lists.cocoondev.org
> [mailto:daisy-bounces at lists.cocoondev.org] On Behalf Of Steven Noels
> Sent: July 6, 2006 11:22 AM
> To: Daisy: open source CMS - general mailinglist
> Subject: Re: [daisy] SVG to PDF
>
>
> On 06 Jul 2006, at 16:17, CampbellG at dfo-mpo.gc.ca wrote:
>
> > My svg's are showing up in the pdf's now, however they are being
> > rendered as bitmaps.
>
> AFAICT Glen, this has been the idea all the way. Batik renders SVG into a
> bitmap format for inclusion into PDF. I don't know whether there's an
> SVG2PDF library out there.
>
> </Steven>
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org bruno at apache.org
More information about the daisy
mailing list