Details
-
Bug
-
Resolution: Fixed
-
Minor
-
1.5
-
None
-
Solaris 10, Tomcat 6.0.16, MySQL 5.0.51a, XWIKI 1.5, JDK 1.6 Update 7
Tomcat is running as service using "jsvc" with system account nobody.
-
fop pdf cache fonts
-
Description
Export as PDF fails with:
2008-07-31 11:19:12,464 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] WARN impl.PdfExportImpl - Starting with 1.5, XWiki uses the WEB-INF/fonts/ directory as the font directory, and it should contain the FreeFont (http://savannah.gnu.org/projects/freefont/) fonts. FOP cannot access this directory. If this is an upgrade from a previous version, make sure you also copy the WEB-INF/fonts directory from the new distribution package. 2008-07-31 11:19:16,297 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] WARN truetype.TTFFile - Ascender and descender together are larger than the em box. This could lead to a wrong baseline placement in Apache FOP. 2008-07-31 11:19:16,302 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] WARN truetype.TTFFile - Ascender and descender together are larger than the em box. This could lead to a wrong baseline placement in Apache FOP. 2008-07-31 11:19:16,306 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] WARN truetype.TTFFile - Ascender and descender together are larger than the em box. This could lead to a wrong baseline placement in Apache FOP. 2008-07-31 11:19:16,648 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] WARN truetype.TTFFile - Ascender and descender together are larger than the em box. This could lead to a wrong baseline placement in Apache FOP. 2008-07-31 11:19:16,649 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] FATAL truetype.TTFFile - Unsupported TrueType font: Unicode cmap table not present. Aborting 2008-07-31 11:19:16,649 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] ERROR autodetect.FontInfoFinder - Unable to load font file: file:/usr/X11R6/lib/X11/fonts/TrueType/MonotypeSorts.ttf. Reason: TrueType font is not supported: file:/usr/X11R6/lib/X11/fonts/TrueType/MonotypeSorts.ttf 2008-07-31 11:19:16,710 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] FATAL truetype.TTFFile - Unsupported TrueType font: Unicode cmap table not present. Aborting 2008-07-31 11:19:16,710 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] ERROR autodetect.FontInfoFinder - Unable to load font file: file:/usr/X11R6/lib/X11/fonts/TrueType/Symbol.ttf. Reason: TrueType font is not supported: file:/usr/X11R6/lib/X11/fonts/TrueType/Symbol.ttf 2008-07-31 11:19:21,394 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] ERROR autodetect.FontInfoFinder - Unable to load font file: file:/usr/X11R6/lib/X11/fonts/Type1/sun/MonotypeSorts.pfb. Reason: Neither an AFM nor a PFM file was found for file:/usr/X11R6/lib/X11/fonts/Type1/sun/MonotypeSorts.pfb 2008-07-31 11:19:21,408 [http://host:8082/xwikitest/bin/export/Main/WebHome?format=pdf] [http-8082-1] WARN web.XWikiAction - Uncaught exception: Error number 11015 in 11: Exception while exporting Wrapped Exception: Error number 12002 in 12: Exception while exporting PDF Wrapped Exception: /root/.fop/fop-fonts.cache (Zugriff verweigert) com.xpn.xwiki.XWikiException: Error number 11015 in 11: Exception while exporting Wrapped Exception: Error number 12002 in 12: Exception while exporting PDF Wrapped Exception: /root/.fop/fop-fonts.cache (Zugriff verweigert) at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:64) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:216) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
Setting up a WEB-INF/classes/fop-config.xml with the additional tag <cache-file>/tmp/.fop.cache</cache-file> does not solve the problem in our case. It still uses the wrong directory.
<fop version="1.0"> <!-- Strict user configuration --> <strict-configuration>true</strict-configuration> <!-- Strict FO validation --> <strict-validation>true</strict-validation> <cache-file>/tmp/.fop.cache</cache-file> <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi <source-resolution>72</source-resolution> --> <!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi <target-resolution>72</target-resolution> --> <!-- default page-height and page-width, in case value is specified as auto --> <default-page-settings height="29.7cm" width="21cm"/> <renderers> <renderer mime="application/pdf"> <filterList> <!-- provides compression using zlib flate (default is on) --> <value>flate</value> </filterList> <fonts> <!-- This allows all fonts in the WEB-INF/fonts/ directory to be indexed --> <auto-detect/> </fonts> </renderer> </renderers> </fop>
BTW why does XWiki not find the fonts in WEB-INF/fonts? The fonts are there and the user running tomcat has full access to that directory.
Thanks for any advice
Attachments
Issue Links
- depends on
-
XWIKI-3546 Upgrade the FOP dependency to a development snapshot
- Closed
- is duplicated by
-
XWIKI-2585 The FOP base directory should have a better default value
- Closed