PRAVAT commented on FOP-2428:

FOP version - 1.0
OS - Unix, Windows
XSL-FO desc:
<fo:block font-family="Wingdings">

Result -  Output in PDF and RTF different, RTF converts the character that we 
want to use for. We can not change the actual text to unicode in the xsl-fo. 
With the actual text it works fine for RTF, not for PDF format.


    <renderer mime="application/pdf">
            <font metrics-url="Wingdings.xml" embed-url="Wingdings.ttf">
                        <font-triplet name="Wingdings" style="normal" 
 <renderer mime="application/rtf">
            <font metrics-url="Wingdings.xml" embed-url="Wingdings.ttf">
                        <font-triplet name="Wingdings" style="normal" 

Code Snippet:
Used below FOP API to transform the document: fo to PDF
FopFactory fopFactory = FopFactory.newInstance();
 fopFactory.setFontBaseURL("file:///" + fontFilesDirectory);
DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(userConfigFile);
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, pdf);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
Source src = new StreamSource(fo);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);

> Apache PDF issue with Wingdings characters
> ------------------------------------------
>                 Key: FOP-2428
>                 URL: https://issues.apache.org/jira/browse/FOP-2428
>             Project: Fop
>          Issue Type: Bug
>          Components: fo/inline
>    Affects Versions: 1.0
>         Environment: Windows, Unix
>            Reporter: PRAVAT
>            Priority: Critical
>              Labels: ApachePDf, Wingding
> The below unicode     Character       s give different results for Apache RTF 
> and PDF format. The font used here is Winfdings. RTF gives the correct 
> output, where as the PDF does not find these characters. I am using APache 
> FOP 1.0.
> U+00FD        ý              
> U+00FE        þ       

This message was sent by Atlassian JIRA

Reply via email to