I am trying to use FOP from with an application
deployed on JBoss with a single ear file.  My goal is
to have all font metrics, font files, and image files
loaded from within the war file embedded in the ear
file.  The fop.jar is in the WEB-INF/lib directory of
the war file.  The font and image files are under the
WEB-INF/classes directory of the war file.

I am doing something wrong, but cannot determine what.
 Any help would be most appreciated it.  The details
are below.

Regards,
Dave

I have used the following code to configure FOP:

   static
   {
      org.apache.fop.configuration.Configuration.put(
            "baseDir",
           
AbstractDataRetriever.class.getResource("resource/").getFile());
      org.apache.fop.configuration.Configuration.put(
            "fontBaseDir",
           
AbstractDataRetriever.class.getResource("resource/").getFile());
      File userConfigFile = new
File(AbstractDataRetriever.class.getResource(
            "resource/userconfig.xml").getFile());
      try
      {
         new
org.apache.fop.apps.Options(userConfigFile);
      }
      catch (org.apache.fop.apps.FOPException fope)
      {
         LOG.error("FOP initialization failed!",
fope);
      }
   }

My userconfig.xml file contains the following entries:

<fonts>
 <font metrics-file="arial.xml" kerning="yes"
embed-file="arial.ttf">
    <font-triplet name="Arial" style="normal"
weight="normal"/>
    <font-triplet name="ArialMT" style="normal"
weight="normal"/>
 </font>
 <font metrics-file="arialbd.xml" kerning="yes"
embed-file="arialbd.ttf">
    <font-triplet name="Arial" style="normal"
weight="bold"/>
    <font-triplet name="ArialMT" style="normal"
weight="bold"/>
 </font>

I see following errors in my log file:

2005-01-18 11:06:52,005 INFO 
[com.mwvis.imr.report.PdfReportProcessor] building
formatting object tree
2005-01-18 11:06:52,005 INFO  [STDOUT] [INFO] 
2005-01-18 11:06:52,005 INFO  [STDOUT] setting up
fonts
2005-01-18 11:06:52,396 INFO 
[com.mwvis.imr.report.PdfReportProcessor] [1]
2005-01-18 11:06:52,406 WARN 
[com.mwvis.imr.report.PdfReportProcessor]
table-layout=auto is not supported, using fixed!
2005-01-18 11:06:52,456 INFO  [STDOUT] [INFO] 
2005-01-18 11:06:52,456 INFO  [STDOUT] Using
org.apache.xerces.parsers.SAXParser as SAX2 Parser
2005-01-18 11:06:52,706 ERROR
[com.mwvis.imr.report.PdfReportProcessor] Error while
creating area : Error while recovering Image
Informations
(file:/C:/Java/jboss-3.2.6/server/default/tmp/deploy/tmp10488com.mwvis.security.mgr_1_0.ear-contents/IntelliManagerReports.war/WEB-INF/classes/com/mwvis/imr/data/resource/MwvisLogo.gif)
:
C:\Java\jboss-3.2.6\server\default\tmp\deploy\tmp10488com.mwvis.security.mgr_1_0.ear-contents\IntelliManagerReports.war\WEB-INF\classes\com\mwvis\imr\data\resource\MwvisLogo.gif
2005-01-18 11:06:52,716 WARN 
[com.mwvis.imr.report.PdfReportProcessor]
table-layout=auto is not supported, using fixed!
2005-01-18 11:06:52,726 INFO  [STDOUT] [INFO] 
2005-01-18 11:06:52,726 INFO  [STDOUT] Using
org.apache.xerces.parsers.SAXParser as SAX2 Parser
2005-01-18 11:06:53,177 DEBUG
[com.mwvis.imr.report.PdfReportProcessor] Last
page-sequence produced 1 pages.
2005-01-18 11:06:53,177 INFO 
[com.mwvis.imr.report.PdfReportProcessor] Parsing of
document complete, stopping renderer
2005-01-18 11:06:53,187 INFO  [STDOUT] [ERROR] 
2005-01-18 11:06:53,187 INFO  [STDOUT] Failed to embed
font [10] Arial:
C:\Java\jboss-3.2.6\server\default\tmp\deploy\tmp10488com.mwvis.security.mgr_1_0.ear-contents\IntelliManagerReports.war\WEB-INF\classes\com\mwvis\imr\data\resource\arial.ttf
2005-01-18 11:06:53,187 INFO  [STDOUT] [ERROR] 
2005-01-18 11:06:53,187 INFO  [STDOUT] Failed to embed
font [13] Arial,Bold:
C:\Java\jboss-3.2.6\server\default\tmp\deploy\tmp10488com.mwvis.security.mgr_1_0.ear-contents\IntelliManagerReports.war\WEB-INF\classes\com\mwvis\imr\data\resource\arialbd.ttf
2005-01-18 11:06:53,197 DEBUG
[com.mwvis.imr.report.PdfReportProcessor] Initial heap
size: 31476Kb
2005-01-18 11:06:53,197 DEBUG
[com.mwvis.imr.report.PdfReportProcessor] Current heap
size: 31302Kb
2005-01-18 11:06:53,197 DEBUG
[com.mwvis.imr.report.PdfReportProcessor] Total memory
used: -173Kb
2005-01-18 11:06:53,197 DEBUG
[com.mwvis.imr.report.PdfReportProcessor]   Memory use
is indicative; no GC was performed
2005-01-18 11:06:53,197 DEBUG
[com.mwvis.imr.report.PdfReportProcessor]   These
figures should not be used comparatively
2005-01-18 11:06:53,197 DEBUG
[com.mwvis.imr.report.PdfReportProcessor] Total time
used: 1192ms
2005-01-18 11:06:53,197 DEBUG
[com.mwvis.imr.report.PdfReportProcessor] Pages
rendered: 1
2005-01-18 11:06:53,197 DEBUG
[com.mwvis.imr.report.PdfReportProcessor] Avg render
time: 1192ms/page



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to