Hi,

 

Add font-family="DejaVuSans" to fo:root, maybe remove auto-detect from
conf.xml also.

 

Thanks

 

From: Tunahan Coban [mailto:[email protected]] 
Sent: 06 January 2016 10:11
To: [email protected]
Subject: Embedding Fonts for PDF/A

 

Hi,

 

this is my first question to the list and I don't know if this way the right
one. 

 

So I have a problem with the fonts to generate a PDF/A.

I have testing to embed the fonts Helvetica and DejaVuSans but anyone don't
work.

 

I used the following conf.xml with trying to embed DejaVuSans:

 

<fop version="1.0">

                <accessibility>true</accessibility>

                <renderers>

                               <renderer mime="application/pdf">

 
<pdf-a-mode>PDF/A-1a</pdf-a-mode>

                                               <version>1.4</version>

                                               <fonts>

                                                               <font
kerning="yes" embed-url="C:/Utilities/DejaVuSans.ttf">

                                                               <font-triplet
name="DejaVuSans" style="normal" weight="normal"/>

                                                               </font>

 
<auto-detect/>

                                               </fonts>

                               </renderer>

                </renderers>

</fop>

 

I have download the DejaVuSans.ttf from
<http://dejavu-fonts.org/wiki/Main_Page>
http://dejavu-fonts.org/wiki/Main_Page.
 
Then I get this:
10:44:20,353 WARN  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:7080-4)
Font "Symbol,normal,700" not found. Substituting with "Symbol,normal,400".
10:44:20,353 WARN  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:7080-4)
Font "ZapfDingbats,normal,700" not found. Substituting with
"ZapfDingbats,normal,400".
10:44:20,353 WARN  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:7080-4)
Font "DejaVuSans,normal,400" not found. Substituting with "any,normal,400".
10:44:20,353 WARN  [org.apache.fop.apps.FOUserAgent] (http-/0.0.0.0:7080-4)
Font "DejaVuSans,normal,700" not found. Substituting with "any,normal,700".
 
10:44:20,602 ERROR [org.apache.fop.fo.FOTreeBuilder] (http-/0.0.0.0:7080-4)
org.apache.fop.pdf.PDFConformanceException: For PDF/A-1b, all fonts, even
the base 14 fonts, have to be embedded! Offending font: /Times-Roman
10:44:20,602 ERROR [stderr] (http-/0.0.0.0:7080-4) (Position des Fehlers
unbekannt)org.apache.fop.pdf.PDFConformanceException: For PDF/A-1b, all
fonts, even the base 14 fonts, have to be embedded! Offending font:
/Times-Roman
 

Is it the right way to embed any fonts?

 

It would be greate if you can show me an example with embedding DejaVuSans
or Helvetica..

 

Thank you so much!

 

--

 

Reply via email to