This means you are still somehow referencing one of the base 14 fonts.
Even if you use Times-Roman, you have to explicitely define this font in
the configuration for PDF/A (as if it were a custom font) even though
it's normally available for use for non-PDF/A documents. The
specification requires that ALL fonts are embedded. And that's not the
case with the normal base 14 fonts.
It's a good idea to set "font-family" to your main font you're using in
your documents and to set this property top-level directly on fo:root.
This is what I've done in the example. That way no default value for
font-family can creep in anywhere. Of course, you also have to make sure
that you can an entry in the FOP configuration for every font that you
use in your documents.
Your Java code looks good, but see my question below (not related to the
problem here).
On 14.02.2007 16:10:07 Virginijus Kandrotas wrote:
>
> Hello Jeremias,
>
> Thank you for your help and the example you have attached, but it still not
> working for me. I think there is some problems with the FOP configuration. I
> getting this error:
>
> org.apache.fop.pdf.PDFConformanceException: For PDF/A-1b, all fonts, even
> the base 14 fonts, have to be embedded! Offending font: Times-Roman
> at org.apache.fop.pdf.PDFFont.validate(PDFFont.java:199)
<snip/>
>
> Can you please look at my code maybe you can see what is wrong ?
>
> FopFactory fopFactory = FopFactory.newInstance();
>
> File configFile = new
> File("/home/vk/a-tests/fop/exampl/fop.xconf");
> fopFactory.setUserConfig(configFile);
>
> FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
> foUserAgent.getRendererOptions().put("pdf-a-mode",
> "PDF/A-1b");
>
> PDFRenderer pdfrenderer = new PDFRenderer();
> pdfrenderer.setUserAgent(foUserAgent);
>
> foUserAgent.setRendererOverride(pdfrenderer);
>
>
> // Construct fop with desired output format
> Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,
> foUserAgent, outputMessages[0]);
>
> fopFactory.addElementMapping(new FOElementMapping());
> fopFactory.addElementMapping(new SVGElementMapping());
> fopFactory.addElementMapping(new
> BatikExtensionElementMapping());
> fopFactory.addElementMapping(new
> ExtensionElementMapping());
> fopFactory.addElementMapping(new XMPElementMapping());
> fopFactory.addElementMapping(new RDFElementMapping());
> fopFactory.addElementMapping(new
> PSExtensionElementMapping());
Why are you doing this? Didn't it work otherwise? Strange environment
(application server)???
>
> // Setup JAXP using identity transformer
> TransformerFactory factory =
> TransformerFactory.newInstance();
> Transformer transformer = factory.newTransformer(); //
> identity transformer
>
> // Setup input stream
> Source src = new StreamSource(inputMessages[0]);
>
> // Resulting SAX events (the generated FO) must be piped
> through to FOP
> Result res = new SAXResult(fop.getDefaultHandler());
>
> // Start XSLT transformation and FOP processing
> transformer.transform(src, res);
>
>
> Thank you in advance,
>
> Virginijus Kandrotas
> --
> View this message in context:
> http://www.nabble.com/Need-working-example-or-help-how-to-use-PDF-A-1b-with-FOP-0.93-tf3227266.html#a8966701
> Sent from the FOP - Users mailing list archive at Nabble.com.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]