You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "PRAVAT (JIRA)" <ji...@apache.org> on 2014/11/20 14:01:34 UTC

[jira] [Commented] (FOP-2428) Apache PDF issue with Wingdings characters

    [ https://issues.apache.org/jira/browse/FOP-2428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14219340#comment-14219340 ] 

PRAVAT commented on FOP-2428:
-----------------------------

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

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.

fop.xconf:-

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

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);
fopFactory.setUserConfig(cfg);
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
(v6.3.4#6332)