Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: fgl_report_selectDevice("PDF") on Red Hat  (Read 16991 times)
.
Posts: 11


« on: September 07, 2009, 01:18:31 pm »

Hello,

I'm doing some tests with the OrderReportASCII.4gl sample (I found it on the GRD/samples/demo/ directory), it works fine on my Windows XP with GST 2.13, GRE 1.0013, FGL 2.2006 and GDC 2.20.15, but, when I put it on my Linux RedHat, it raise this error:

[newxges220@oraculo newxges220]$ fglrun OrderReportASCII.42r
DEBUG running report from data file "./OrderReportASCIIData.xml"
Exception at document location :
publicId=-//FOURJS//any XML stdin//EN systemId=file:/tmp/compatibility line no=349
LoaderStyleSheet: element no 336 path=/PXML
MarginStyleSheet: element no 336 path=/PXML
VirtualPageStyleSheet: element no 343 path=/PXML
BoxerStyleSheet: element no 344 path=/PXML
PxmlLayouter: element no 346 path=/PXML
PdfWriterStyleSheet: element no 1 path=/DVI
ExecStyleSheet: element no 1 path=/DVI
Processor error:
ExceptionConverter: DocumentException: java.io.IOException: /usr/lib/X11/fonts/Type1/cour.pfb not found as file or resource.
        at com.lowagie.text.pdf.RandomAccessFileOrArray.<init>(Unknown Source)
        at com.lowagie.text.pdf.RandomAccessFileOrArray.<init>(Unknown Source)
        at com.lowagie.text.pdf.Type1Font.getFullFontStream(Unknown Source)
        at com.lowagie.text.pdf.Type1Font.writeFont(Unknown Source)
        at com.lowagie.text.pdf.FontDetails.writeFont(Unknown Source)
        at com.lowagie.text.pdf.PdfWriter.addSharedObjectsToBody(Unknown Source)
        at com.lowagie.text.pdf.PdfWriter.close(Unknown Source)
        at com.lowagie.text.pdf.PdfDocument.close(Unknown Source)
        at com.lowagie.text.Document.close(Unknown Source)
        at com.fourjs.pxml.stylesheet.PdfWriterStyleSheet.b(PdfWriterStyleSheet.java:486)
        at com.fourjs.pxml.layoutnode.LayoutTreeRoot.ai(LayoutTreeRoot.java:235)
        at com.fourjs.pxml.layoutnode.LayoutTreeRoot.a(LayoutTreeRoot.java:184)
        at com.fourjs.pxml.stylesheet.PxmlLayouter.endElementEvent(PxmlLayouter.java:472)
        at com.fourjs.pxml.stylesheet.StyleSheet.endElement(StyleSheet.java:222)
        at com.fourjs.pxml.stylesheet.BoxerStyleSheet.endElementEvent(BoxerStyleSheet.java:196)
        at com.fourjs.pxml.stylesheet.StyleSheet.endElement(StyleSheet.java:222)
        at com.fourjs.pxml.stylesheet.VirtualPageStyleSheet.endElementEvent(VirtualPageStyleSheet.java:247)
        at com.fourjs.pxml.stylesheet.StyleSheet.endElement(StyleSheet.java:222)
        at com.fourjs.pxml.stylesheet.NSStyleSheet.k(NSStyleSheet.java:57)
        at com.fourjs.pxml.stylesheet.MarginStyleSheet.a(MarginStyleSheet.java:260)
        at com.fourjs.pxml.stylesheet.NSStyleSheet.endElementEvent(NSStyleSheet.java:38)
        at com.fourjs.pxml.stylesheet.StyleSheet.endElement(StyleSheet.java:222)
        at com.fourjs.pxml.stylesheet.StyleSheet.endElementEvent(StyleSheet.java:228)
        at com.fourjs.pxml.stylesheet.StyleSheet.endElement(StyleSheet.java:222)
        at com.fourjs.pxml.stylesheet.LoaderStyleSheet.endElement(LoaderStyleSheet.java:64)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:16                                                    85)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
        at com.fourjs.pxml.stylesheet.StyleSheetPipe.c(StyleSheetPipe.java:147)
        at com.fourjs.pxml.stylesheet.StyleSheetPipe.run(StyleSheetPipe.java:153)



...but, if I change the CALL fgl_report_selectDevice("PDF") to fgl_report_selectDevice("SVG"), it works fine and I can see the resulting report without problems... I put the sample in another RedHat server and the same problem occurs, I try to change my JRE (I move to 1.6 version)... but the problem was still happening żany suggestion?

Thanks in advance,
Rodrigo






Romain W.
Four Js
Posts: 48


« Reply #1 on: September 15, 2009, 11:10:53 am »

Hi,

The java engine uses only .pfb fonts for PDF reports. It might be possible that the font mentioned in the java error message ('cour.pfb') doesn't exist in the directory indicated. Did you check?
Otherwise, are there other 'cour.*' fonts in that directory (/usr/lib/X11/fonts/Type1)? I especially think about a font called 'cour.pfa'. If yes, you can use the Linux/Unix tool 'pfa2pfb' to convert the font (the tool might not be installed by default, so you have to install it).
But other conversion tools exist, for example the 't1binary' tool, part of the 't1utils' package, available for several Linux distributions.

Hope this helps
Best regards,
Romain W.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines