Here is small example of one IR with only one column that shown in content all Croatian national characters: When you print PDF (Download as PDF) then you get a PDF file like this one. Problem is more than obvious.
Regardless there are some instructions which said that proper "fop.xml" should be edited with some content, this approach didn't work in mine example.
The Solution
On my Windows PC, I have for example the Arial font that contains the Croatian characters. Solution is a little bit more complex and described in next steps.- Open file
\apex\core\reports3.sql (this contains the 'generic XSL-FO definition' that should be modified) - Save that file it under new name reports3_new.sql (preserve original for any kind of problem later)
- find the part with "#BODY_FONT_FAMILY#" and replace with "Arial"
Here is small example for body definition. Original part
<xsl:attribute-set name="body-font"> <xsl:attribute name="height">12.0pt</xsl:attribute> <xsl:attribute name="font-family">#BODY_FONT_FAMILY#</xsl:attribute> <xsl:attribute name="white-space-collapse">false</xsl:attribute> <xsl:attribute name="font-size">#BODY_FONT_SIZE#pt</xsl:attribute> <xsl:attribute name="font-weight">#BODY_FONT_WEIGHT#</xsl:attribute> </xsl:attribute-set>
change to:<xsl:attribute-set name="body-font"> <xsl:attribute name="height">12.0pt</xsl:attribute> <xsl:attribute name="font-family">Arial</xsl:attribute> <xsl:attribute name="white-space-collapse">false</xsl:attribute> <xsl:attribute name="font-size">#BODY_FONT_SIZE#pt</xsl:attribute> <xsl:attribute name="font-weight">#BODY_FONT_WEIGHT#</xsl:attribute> </xsl:attribute-set>
This will set use of Arial font for all parts (header, body or footer) in reports. If you need some other setup, change with font you like in part you need. - start SQLplus and connect as APEX_040200 user (or add APEX_040200 in previously edited package specification and connect any privileged user)
- Now recompile the changed file of step 2
- Recompile package & package body APEX_040200.wwv_render_report3
- In defaults.xml add entry which points to new "fop.xml" file. In mine case this is:
c:\oracle\product\apex_listener\fop.xml - In fop.xml, on mentioned location, place next content:
<fop version="1.0" encoding="UTF-8"> <renderers> <renderer mime="application/pdf"> <fonts> <!-- Arial --> <font kerning="yes" embed-url="c:\windows\fonts\arial.ttf"> <font-triplet name="Arial" style="normal" weight="normal" /> <font-triplet name="ArialMT" style="normal" weight="normal" /> </font> </fonts> </renderer> </renderers>
where "C:\windows" is the location of installed windows. - Restart the APEX Listener
The End
As I was informed, this workaround should be fully implemented in next Apex 5.0 when such a workaround should not be necessary.Hope this helps someone.
Cheers!