You need to use a font that has a glyph for each character. None of the "base 14" fonts do so.
Also, FYI, please provide example input in terms of FO content, not XSL input. On Mon, Dec 14, 2015 at 9:14 PM, FOPUser <[email protected]> wrote: > We are currently using FOP 1.0 for PDF generation. One of the requirements > for our application is to support special characters. The special > characters are part of the content that the application receives from a > third party. So, we don’t know where special characters occurs in the > content. The requirement is the render the special characters in the PDF . > While, testing the special characters we found all, the special characters > from the Symbol fonts are rendered as ‘#’ in the PDF. From the logs it is > clear non availability of the glyps are the reason for special characters > rendered as #. The symbol fonts are part of the 14 base fonts and doesn’t > need any additional configuration. Appreciate any help that will help us > move forward on this. > I am using the example from the > https://xmlgraphics.apache.org/fop/quickstartguide.html and below are > examples and output from PDF generation. > > name.xml: > <name>Ohm unicode - "Ω" Omega decimal code- "Ω"</name> > > name2fo.xsl: > > <?xml version="1.0" encoding="utf-8"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:fo="http://www.w3.org/1999/XSL/Format"> > <xsl:output method="xml" indent="yes"/> > <xsl:template match="/"> > <fo:root> > <fo:layout-master-set> > <fo:simple-page-master master-name="A4-portrait" > page-height="29.7cm" page-width="21.0cm" margin="2cm"> > <fo:region-body/> > </fo:simple-page-master> > </fo:layout-master-set> > <fo:page-sequence master-reference="A4-portrait"> > <fo:flow flow-name="xsl-region-body"> > <fo:block> > <xsl:value-of select="name"/> > </fo:block> > </fo:flow> > </fo:page-sequence> > </fo:root> > </xsl:template> > </xsl:stylesheet> > > Output: > C:\fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf > > Dec 14, 2015 9:49:55 PM org.apache.fop.events.LoggingEventListener > processEvent > WARNING: Glyph "?" (0x2126, Ohm) not available in font "Helvetica". > Dec 14, 2015 9:49:55 PM org.apache.fop.events.LoggingEventListener > processEvent > WARNING: Glyph "?" (0x3a9, Omegagreek) not available in font "Helvetica". > Dec 14, 2015 9:49:55 PM org.apache.fop.events.LoggingEventListener > processEvent > INFO: Rendered page #1. > name.pdf <http://apache-fop.1065347.n5.nabble.com/file/n43155/name.pdf> > name.pdf <http://apache-fop.1065347.n5.nabble.com/file/n43155/name.pdf> > > > > -- > View this message in context: > http://apache-fop.1065347.n5.nabble.com/FOP-Special-characters-rendering-tp43155.html > Sent from the FOP - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
