Dear Batik Developers/Users
Abstract: I have difficulty providing specific (not auto-detected) font
information to an SVGConverter instance for converting to PDF's.
What we do:
We are using batik to convert svg images in to different formats.
We also use fop for transforming xml-files in to PDF's.
One major thing is to supply the correct fonts for these libraries.
I did so for fop when used as xslt-fo engine to create PDF's by supplying
a user configuration and and custom URIResolver to the FOP-Factory.
We use an SVGConverter of batik instance for converting SVG in different
formats.
The fonts work fine for images like image/png. I took care of this by
using java GraphicsEnvironment.
The problem is, when I want to transform an svg-image in to a PDF.
There the fonts have to be supplied to fop, that is used inside batik
(SVGConverter).
The problem is, that I am not able to supply the font configuration and
and URIResolver to the PDFTranscoder used inside SVGConverter.
So I thought about extending the DestinationType class, which is
responsible for creating the PDFTranscoder,
so that DestinationType can suppliy the PDFTranscoder with the needed
font configuration.
Unfortunately the class DestinationType is declared as final, so I can not
extend it.
And additionally, PDFTranscoder knows nothing about custom URIResolver, as
far as i saw.
I don't want to use the auto-detect feature, becaus of performance issues
(scans to much directories/jars for finding the fonts).
Is there a way to add a font configuration and an URIResolver
programmatically (i think embedded is the term you use) to batik
SVGConverter for PDF-Transformation.
I really would hate to copy the existing classes (SVGConverter,
DestinationType , PDFTranscoder ) and modify them :-)
thanks for your help and best regards.
Matthias Gerber
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.