FOP: Convert RFT to PDF

2009-05-19 Thread yazzy

Hi

I have been asked to use FOP to convert RFT documents to PDF. 

FOP has to be embeded within ASP page (JScript).

I have never used FOP and search found no examples to convert RFT to PDF
format. The only example I found was ExampleObj2PDF.java but I don't think
this the solution.

My query is 

1) Can FOP be used to convert RFT to PDF.
2) If FOP can be used, please would I have links to the sites.

Thanks in advance





-- 
View this message in context: 
http://www.nabble.com/FOP%3A-Convert-RFT-to-PDF-tp23614305p23614305.html
Sent from the FOP - Dev mailing list archive at Nabble.com.



Re: FOP: Convert RFT to PDF

2009-05-19 Thread Pascal SANCHO

yazzy a écrit :

Hi

I have been asked to use FOP to convert RFT documents to PDF. 


FOP has to be embeded within ASP page (JScript).

I have never used FOP and search found no examples to convert RFT to PDF
format. The only example I found was ExampleObj2PDF.java but I don't think
this the solution.

My query is 


1) Can FOP be used to convert RFT to PDF.
2) If FOP can be used, please would I have links to the sites.

Thanks in advance

Hi,
For questions related to FOP usage, you should prefer ask it on this 
list: fop-us...@xmlgraphics.apache.org .


FOP aims to transform XML input to various output format, including PDF 
or RTF.

But FOP cannot convert from RFT to PDF.

googlelizing convert RTF to PDF should give you what you look for.

Pascal


FW: How to trap a Barcode4J exception from Java prgram running embedded FOP

2009-05-19 Thread Anil Pinto
Anybody, has any information that can help with this ? Is there any error
listener that I can register with FOP to be able to catch these errors ?


-Original Message-
From: Anil Pinto [mailto:api...@lobotec.com]
Sent: Wednesday, May 13, 2009 12:20 PM
To: FOP Mailing List
Subject: How to trap a Barcode4J exception from Java prgram running embedded
FOP


Hi,

We have been running FOP from within a Java application that
programmatically applies the XSL and XML to create PDFs.

We have also incorporated references to the Barcode4J program to be able to
embed barcodes in the PDF.

Recently we encountered an error in the FOP process and expected the
exception to be caught by the surrounding exception handling code, but it
did not. Under most circumstances any errors thrown by the FOP process are
caught, but for the following error, the exception trace is shown (I think
internally) but is not available to be caught and handled. The subsequent
exception that happens due to this initial exception is then caught by the
try catch block.

Could someone from the FOP/Barcode4J team please throw some light on this
situation ?


=== This exception is not caught but the trace is printed on the
console 

java.lang.IllegalArgumentException: Unable to fit message in columns
 at
org.krysalis.barcode4j.impl.pdf417.PDF417LogicImpl.generateBarcodeLogic(PDF4
17LogicImpl.java:199)
 at
org.krysalis.barcode4j.impl.pdf417.PDF417Bean.generateBarcode(PDF417Bean.jav
a:79)
 at
org.krysalis.barcode4j.impl.ConfigurableBarcodeGenerator.generateBarcode(Con
figurableBarcodeGenerator.java:161)
 at org.krysalis.barcode4j.xalan.BarcodeExt.generate(BarcodeExt.java:69)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at
org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(Extension
HandlerJavaClass.java:399)
 at
org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(Extension
HandlerJavaClass.java:438)
 at
org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java
:220)
 at
org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.jav
a:473)
 at
org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:206)
 at org.apache.xpath.XPath.execute(XPath.java:335)
 at org.apache.xalan.templates.ElemCopyOf.execute(ElemCopyOf.java:132)
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2411)
 at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
1374)
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2411)
 at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
1374)
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2411)
 at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
1374)
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2411)
 at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
1374)
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2411)
 at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
1374)
 at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApp
lyTemplates.java:393)
 at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
a:176)
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2411)
 at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
1374)
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2411)
 at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2281)
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1367)
 at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
709)
 at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
1284)
 at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
1262)


 The following exception is caught by the Try {}
catch (Exception e) {} ===

javax.xml.transform.TransformerException: org.xml.sax.SAXException:
Mismatch: instream-foreign-object (http://www.w3.org/1999/XSL/Format) vs.
root (http://www.w3.org/1999/XSL/Format)
 at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
725)
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2339)
 at