Re: Is it possible to embed .swf file into PDF and dynamically pass parameters to it (through XML string)?
Denys, There is a licensed 3rd party tool (XF Rendering Server by Ecrion, Inc [ www.ecrion.com ] ) which would allow you to create PDF with embeded .swf file. Thanks, Jayant | | From: | | --| |Denys dhryvas...@serena.com | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |04/23/2012 06:22 AM | --| | | Subject: | | --| |Is it possible to embed .swf file into PDF and dynamically pass parameters to it (through XML string)?| --| Hi - I am looking for a good Java library which gives the opportunity to create PDF files from Java application. These files are some kind of reports. Part of them are graphical reports (FusionChart reports) and I need to embed .swf files into my PDF (also dynamically in Java application) and pass some parameters to is (as flashvars). Is it possible to do using Aspose java library for working with PDF? Thanks in advance, -Denys -- View this message in context: http://old.nabble.com/Is-it-possible-to-embed-.swf-file-into-PDF-and-dynamically-pass-parameters-to-it-%28through-XML-string%29--tp33732124p33732124.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org *** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. A.M. Best Company Inc., Oldwick NJ, USA and its subsidiaries. *** - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Embedding SVG dynamically into fo file
Cristi, In order to include SVG in your XSLT file, first declare the name space as follows: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:svg=http://www.w3.org/2000/svg; Then you can generate SVG as shown below: fo:block fo:instream-foreign-object span=all content-width=500pt content-height=700pt border-style=solid border-width=1 start-indent=0 margin-left=0 svg xmlns=http://www.w3.org/2000/svg; height=500 width=700 rect x=50 y=50 height=400 width=630 fill=none stroke=black stroke-width=1 / text x=200 y=75 style=font-family: ariel; fill:black; font-size:14; font-weight:bold;Some text/text /svg /fo:instream-foreign-object /fo:block Regards, Jayant | | From: | | --| |Cristi Cioriia cristian-andrei.cior...@1and1.ro | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |01/17/2011 10:10 AM | --| | | Subject: | | --| |Embedding SVG dynamically into fo file | --| Hi guys, I have ran into a dead end trying to generate a PDF report which should contain SVG files generated on the fly, and I was hoping that I can find some help here on how to proceed next. At first, I embedded a svg file into a fo file using the fo:instream-foreign-object and everything worked as expected, generating the PDF report that I needed from the fo file by following the examples from the FO website. But then the pdf report that I have to generate uses as source data a java object which contains a string property which provides the svg file and looking at the example from the FOP website http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleObj2PDF.java I created an xslt file like this: xsl:template match=reportEntry fo:block fo:block xsl:value-of select=title/ /fo:block fo:block xsl:value-of select=description/ /fo:block fo:instream-foreign-object xsl:value-of select=svg/ /fo:instream-foreign-object /fo:block /xsl:template But now, when I run the code I get the following exception: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: Error(Unknown location): fo:instream-foreign-object is missing child elements. Required Content Model: one (1) non-XSL namespace child I have tried to find any help with google on how I can approach this, but the only resources that I found use static resources as I did in the first scenario, which is not enough for my use case. Can you point me into the right direction on how to approach this? Thanks for your help, Cristi -- Cristian-Andrei Cioriia Programator Java 11 Internet Development S.R.L. - Bucharest/Romania - Web Applications Hosting Romania 18 Mircea Eliade St Sect 1, Bucharest RO Bucharest, 012015 Num#259;r de telefon: +40 751 812 984 cristian-andrei.cior...@1and1.ro - To unsubscribe, e-mail:
Re: Embedding SVG dynamically into fo file
Cristi, Take a look at following articles. http://blog.trivadis.com/blogs/andreasmengel/archive/2008/03/14/generating-svg-pie-charts-in-pdf-documents.aspx http://www.svgopen.org/2003/papers/CreatingSVGPieChartsThroughWebService/index.html You'll need to use xsl:attribute along with svg:svg and fo:instream-foreign-object Regards, Jayant | | From: | | --| |Cristi Cioriia cristian-andrei.cior...@1and1.ro | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |01/17/2011 10:57 AM | --| | | Subject: | | --| |Re: Embedding SVG dynamically into fo file | --| Thanks for such a quick reply. Using your feedback I was able to advance a little: if I replace Some text from your sample with xsl:value-of select=svg/ I can see in my report the svg that is generated. What I need though is that this code is executed so that in the PDF report I have the actual image, not its SVG representation. Any hint on how can I achieve that? Regards, Cristi Cristi, In order to include SVG in your XSLT file, first declare the name space as follows: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:svg=http://www.w3.org/2000/svg; Then you can generate SVG as shown below: fo:block fo:instream-foreign-object span=all content-width=500pt content-height=700pt border-style=solid border-width=1 start-indent=0 margin-left=0 svg xmlns=http://www.w3.org/2000/svg; height=500 width=700 rect x=50 y=50 height=400 width=630 fill=none stroke=black stroke-width=1 / text x=200 y=75 style=font-family: ariel; fill:black; font-size:14; font-weight:bold;Some text/text /svg /fo:instream-foreign-object /fo:block Regards, Jayant | | From: | | --| |Cristi Cioriiacristian-andrei.cior...@1and1.ro | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |01/17/2011 10:10 AM | --|
SVG in FOP 1.0
I am developing two web based prototypes for rendering PDF using XSL-FO. First prototype is a Java Servlet deployed in Tomcat container in windows environment. The servlet renders PDFs to web as well as windows based clients. Everything works well, till I decided to add SVG elements to generate 3D charts. I am using pre-compiled version of FOP 1.0. Looking at the manifest file for FOP.jar, I noticed that jai_*.jar files have not been referenced. If I include following jar files, I am able to generate 3D graphs using SVG. jai_codec.jar jai_core.jar jai_imageio.jar Are these jar files sufficient for FOP to process SVG elements? I thought that batik-all-1.7.jar should be sufficient to process SVG elements. I guess I was wrong. Second prototype is .NET based solution, where I have converted FOP 1.0 to a single .NET DLL using IKVM. Same issue here with SVG elements but even if I include the jai_*.jar files in my .NET dll, still the SVG elements are ignored. There are issues mentioned with class loader functionality in the following article. But this article was published in 2004, I bet there have been considerable improvements in IKVM since then. http://onjava.com/pub/a/onjava/2004/08/18/ikvm.html == Begin - Excerpt from the article Second is the ikvmc command, which can be used to convert Java bytecodes into .NET IL. Thus, you can convert a set of Java class files into a .NET assembly. Since this manner of use statically compiles the Java bytecodes, it's known as the static mode. Note that while the dynamic mode fully supports the Java classloader semantics, in the static mode, there are necessarily some limitations. Among the issues to watch out for is the fact that all classes are loaded by the bootstrap classloader. See the threads for the gory details. In brief, many Java programs assume this.class.getClassLoader() will return non-null. That, however, is not a valid assumption for classes loaded by the bootstrap loader. Also, while classloader functionality (such as Class.forName(..)) is available to use, and indeed can be used to load either statically compiled classes or Java bytecode, remember that loading classes out of .NET assemblies that are not referenced directly or indirectly from your application may not work without manual intervention. See the documentation for more detail on this and other hairy issues that arise when two different worlds collide! == End - Excerpt from the article I do understand that this is FOP user's email group, so IKVM related issue may not be answered, but if anyone has experience using SVG elements in .XSLT file, can point me to the right jar files (other than mentioned above). Thanks in advance for your help. Regards, Jayant - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: SVG in FOP 1.0
Eric, My servlet code is pretty much same as FopServlet.java file from src\java \org\apache\fop\servlet folder. I am attaching sample Xslt and XML data file. One more thing, PDF generated using command line FOP has no issues. (See attached file: SampleXSLT.xslt)(See attached file: Data.xml)(See attached file: FopServlet.java) Thanks. Regards, Jayant | | From: | | --| |Eric Douglas edoug...@blockhouse.com | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |01/11/2011 11:48 AM | --| | | Subject: | | --| |RE: SVG in FOP 1.0 | --| I think we'd have to see some sample code to tell if jai is required or if you're missing something else. I know the FOP ant build has some optional tests based on whether jai is available, and I do create SVG graphics in my normal processing where jai is not in the classpath. -Original Message- From: Jayant Ghagre [mailto:jayant.gha...@ambest.com] Sent: Tuesday, January 11, 2011 11:41 AM To: fop-users@xmlgraphics.apache.org Subject: SVG in FOP 1.0 I am developing two web based prototypes for rendering PDF using XSL-FO. First prototype is a Java Servlet deployed in Tomcat container in windows environment. The servlet renders PDFs to web as well as windows based clients. Everything works well, till I decided to add SVG elements to generate 3D charts. I am using pre-compiled version of FOP 1.0. Looking at the manifest file for FOP.jar, I noticed that jai_*.jar files have not been referenced. If I include following jar files, I am able to generate 3D graphs using SVG. jai_codec.jar jai_core.jar jai_imageio.jar Are these jar files sufficient for FOP to process SVG elements? I thought that batik-all-1.7.jar should be sufficient to process SVG elements. I guess I was wrong. Second prototype is .NET based solution, where I have converted FOP 1.0 to a single .NET DLL using IKVM. Same issue here with SVG elements but even if I include the jai_*.jar files in my .NET dll, still the SVG elements are ignored. There are issues mentioned with class loader functionality in the following article. But this article was published in 2004, I bet there have been considerable improvements in IKVM since then. http://onjava.com/pub/a/onjava/2004/08/18/ikvm.html == Begin - Excerpt from the article Second is the ikvmc command, which can be used to convert Java bytecodes into .NET IL. Thus, you can convert a set of Java class files into a .NET assembly. Since this manner of use statically compiles the Java bytecodes, it's known as the static mode. Note that while the dynamic mode fully supports the Java classloader semantics, in the static mode, there are necessarily some limitations. Among the issues to watch out for is the fact that all classes are loaded by the bootstrap classloader. See the threads for the gory details. In brief, many Java programs assume this.class.getClassLoader() will return non-null. That, however, is not a valid assumption for classes loaded by the bootstrap loader. Also, while classloader functionality (such as Class.forName(..)) is available to use, and indeed can be used to load either statically compiled classes or Java bytecode, remember that loading classes out
3D charts and FOP 1.0
We are generating PDF reports by retrieving data in XML format from Oracle (11gR2) database. Java Servlet generates the PDF using the XML data and XSLT. I would like to know fop-user's experience in generating 3D charts with XSL-FO. Did you use SVG to generate 3D charts? Any other option? What were the technical issues related to generating 3D charts and including them in PDF report? Thanks for your help. Jayant - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: ApacheFOP v1.0 and .NET
Clay, I was able to convert FOP 0.95 JAR files to .NET DLL using IKVM 0.42.0.6. Here's the sample code (VB.BET). You'll need a windows form with a button object on it to test this code. Begin sample code '--- Java Imports java.io.File Imports java.io.OutputStream '--- JAXP Imports javax.xml.transform.Transformer Imports javax.xml.transform.TransformerFactory Imports javax.xml.transform.sax.SAXSource Imports javax.xml.transform.sax.SAXResult Imports javax.xml.transform.stream.StreamSource '--- FOP Imports org.apache.fop.apps.FOUserAgent Imports org.apache.fop.apps.Fop Imports org.apache.fop.apps.FopFactory Public Class Form1 Private Sub btnViewReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewReport.Click Dim sourceDataFile As String = XML_Data_File_Name.xml Dim sourceTemplateFile As String = Style_Sheet_File_Name.xsl Dim sourceConfigFile As String = cfg.xml Dim outputFile As String = Output_PDF_File_Name.pdf Dim blnResult As Boolean = False blnResult = CreateReport(sourceDataFile, sourceTemplateFile, sourceConfigFile, outputFile) If blnResult Then Process.Start(outputFile) End If End Sub Public Function CreateReport( _ ByVal sourceDataFile As String, _ ByVal sourceTemplateFile As String, _ ByVal sourceConfigFile As String, _ ByVal outputFile As String) As Boolean Dim xmlFile As New java.io.File(sourceDataFile) Dim xsltFile As New java.io.File(sourceTemplateFile) Dim pdfFile As New java.io.File(outputFile) Dim myfopFactory As org.apache.fop.apps.FopFactory myfopFactory = org.apache.fop.apps.FopFactory.newInstance() myfopFactory.setUserConfig(New java.io.File(sourceConfigFile)) Dim myFOUserAgent As org.apache.fop.apps.FOUserAgent myFOUserAgent = myfopFactory.newFOUserAgent Dim myoutputStream As java.io.OutputStream = New java.io.FileOutputStream(pdfFile) myoutputStream = New java.io.BufferedOutputStream(myoutputStream) Try Dim myFop As org.apache.fop.apps.Fop = myfopFactory.newFop (org.apache.fop.apps.MimeConstants.MIME_PDF, myFOUserAgent, myoutputStream) Dim mytransformerFactory As javax.xml.transform.TransformerFactory = javax.xml.transform.TransformerFactory.newInstance() Dim myTransformer As javax.xml.transform.Transformer = mytransformerFactory.newTransformer(New javax.xml.transform.stream.StreamSource(xsltFile)) Dim mySourceData As javax.xml.transform.stream.StreamSource = New javax.xml.transform.stream.StreamSource(xmlFile) Dim myResults As javax.xml.transform.sax.SAXResult = New javax.xml.transform.sax.SAXResult(myFop.getDefaultHandler) myTransformer.transform(mySourceData, myResults) Catch ex As Exception myoutputStream.close() MsgBox(ex.Message) Return False Finally myoutputStream.close() End Try Return True End Function End Class === End sample code Regards, Jayant | | From: | | --| |Benoit, Frederick C. frederick.c.ben...@saic.com | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |10/20/2010 02:27 PM | --| | | Subject: | | --| |ApacheFOP v1.0 and .NET
RE: ApacheFOP v1.0 and .NET
Clay, Copy all jar files into a folder e.g. c:\Temp Compile jar into DLL as follows ikvmc -target:library -reference:IKVM.OpenJDK.Core.dll -recurse:c:/Temp/*.jar -version:1.0 -out:c:/OutputFolderName/fop_1_0.dll In your project, add reference to fop_1_0.dll and also to IKVM.OpenJDK.*.DLL I hope this helps. Btw, I was able to convert FOP 1.0 jars and use the DLL in VS 2008. Regards, Jayant | | From: | | --| |Benoit, Frederick C. frederick.c.ben...@saic.com | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |10/20/2010 02:57 PM | --| | | Subject: | | --| |RE: ApacheFOP v1.0 and .NET | --| Jayant, Thanks for the response. In order to leverage the 508 accessibility features in FOP, I need to move to 1.0. When I convert the JARs to DLLs and reference them in my project, I cannot instantiate a FopFactory object. Clay -Original Message- From: fop-users-return-32917-frederick.c.benoit=saic@xmlgraphics.apache.or g [mailto:fop-users-return-32917-frederick.c.benoit=saic@xmlgraphics.a pache.org] On Behalf Of Jayant Ghagre Sent: Wednesday, October 20, 2010 2:46 PM To: fop-users@xmlgraphics.apache.org Cc: fop-users@xmlgraphics.apache.org Subject: Re: ApacheFOP v1.0 and .NET Clay, I was able to convert FOP 0.95 JAR files to .NET DLL using IKVM 0.42.0.6. Here's the sample code (VB.BET). You'll need a windows form with a button object on it to test this code. Begin sample code '--- Java Imports java.io.File Imports java.io.OutputStream '--- JAXP Imports javax.xml.transform.Transformer Imports javax.xml.transform.TransformerFactory Imports javax.xml.transform.sax.SAXSource Imports javax.xml.transform.sax.SAXResult Imports javax.xml.transform.stream.StreamSource '--- FOP Imports org.apache.fop.apps.FOUserAgent Imports org.apache.fop.apps.Fop Imports org.apache.fop.apps.FopFactory Public Class Form1 Private Sub btnViewReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewReport.Click Dim sourceDataFile As String = XML_Data_File_Name.xml Dim sourceTemplateFile As String = Style_Sheet_File_Name.xsl Dim sourceConfigFile As String = cfg.xml Dim outputFile As String = Output_PDF_File_Name.pdf Dim blnResult As Boolean = False blnResult = CreateReport(sourceDataFile, sourceTemplateFile, sourceConfigFile, outputFile) If blnResult Then Process.Start(outputFile) End If End Sub Public Function CreateReport( _ ByVal sourceDataFile As String, _ ByVal sourceTemplateFile As String, _ ByVal sourceConfigFile As String, _ ByVal outputFile As String) As Boolean Dim xmlFile As New java.io.File(sourceDataFile) Dim xsltFile As New java.io.File(sourceTemplateFile) Dim pdfFile As New java.io.File(outputFile) Dim myfopFactory As org.apache.fop.apps.FopFactory myfopFactory = org.apache.fop.apps.FopFactory.newInstance() myfopFactory.setUserConfig(New java.io.File(sourceConfigFile)) Dim myFOUserAgent As org.apache.fop.apps.FOUserAgent myFOUserAgent
RE: How to initialize Log4j logging in Oracle 11g
Josh, Thanks for the information and link. I was able to create a log4j.properties file and load it into my schema in Oracle database. Now I don't get the warning messages. Thanks, Jayant | | From: | | --| |Marquart, Joshua D joshua.marqu...@firstdata.com | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |07/13/2010 06:49 PM | --| | | Subject: | | --| |RE: How to initialize Log4j logging in Oracle 11g | --| Hi Jaynt, That is the standard Log4j warning message when Log4j logging is not configured correctly for the application. It can be safely ignored, but if you wish to configure your logging, you should throw a log4j.xml or log4j.properties configuration file into your classpath. Here is a link to the log4j wiki http://wiki.apache.org/logging-log4j/ -Josh -Original Message- From: Jayant Ghagre [mailto:jayant.gha...@ambest.com] Sent: Monday, July 12, 2010 4:04 PM To: fop-users@xmlgraphics.apache.org Subject: How to initialize Log4j logging in Oracle 11g Hello, I am getting following warning message when I execute FOP 0.95 in Oracle 11g using Java Stored procedure. How can I address this issue? log4j:WARN No appenders could be found for logger (org.apache.fop.util.ContentHandlerFactoryRegistry). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Thanks, Jayant - The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify First Data immediately by replying to this message and deleting it from your computer. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Error (Exception in thread Root Thread java.lang.StackOverflowError) while transforming XML data using .xsl file using Oracle 11g R1
Hello, I am getting following error while transforming XML data file to PDF using .XSL file. I have loaded FOP 0.95 in Oracle 11g R1 database. I am calling FOP using Java Stored Procedure. The same code executes without any errors in stand-alone mode (Windows XP with JDK 1.5) Exception in thread Root Thread java.lang.StackOverflowError at java.lang.String.valueOf(String.java) at java.lang.StringBuffer.append(StringBuffer.java) at org.apache.fop.fo.properties.PercentLength.toString (PercentLength.java) at java.lang.String.valueOf(String.java) at java.lang.StringBuffer.append(StringBuffer.java) at org.apache.fop.fo.flow.table.TableColumn.toString (TableColumn.java) at java.lang.String.valueOf(String.java) at java.util.AbstractCollection.toString(AbstractCollection.java) at org.apache.fop.layoutmgr.table.ColumnSetup.toString (ColumnSetup.java:125) at java.lang.String.valueOf(String.java) at java.lang.StringBuffer.append(StringBuffer.java) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements (TableContentLayoutManager.java:132) at org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements (TableLayoutManager.java:247) at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements (BlockStackingLayoutManager.java) at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements (BlockLayoutManager.java:116) at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements (FlowLayoutManager.java:107) at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements (PageBreaker.java:145) at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList (AbstractBreaker.java:552) at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList (PageBreaker.java:137) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout (AbstractBreaker.java:302) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout (AbstractBreaker.java:264) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout (PageSequenceLayoutManager.java:106) at org.apache.fop.area.AreaTreeHandler.endPageSequence (AreaTreeHandler.java:234) at org.apache.fop.fo.pagination.PageSequence.endOfNode (PageSequence.java:123) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement (FOTreeBuilder.java) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java) at org.apache.xml.serializer.ToXMLSAXHandler.endElement (ToXMLSAXHandler.java) at org.apache.xalan.templates.ElemLiteralResult.execute (ElemLiteralResult.java) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates (TransformerImpl.java) at org.apache.xalan.templates.ElemLiteralResult.execute (ElemLiteralResult.java) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes (ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute (ElemApplyTemplates.java:177) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates (TransformerImpl.java) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode (TransformerImpl.java:2202) at org.apache.xalan.transformer.TransformerImpl.transformNode (TransformerImpl.java:1276) at org.apache.xalan.transformer.TransformerImpl.transform (TransformerImpl.java:673) at org.apache.xalan.transformer.TransformerImpl.transform (TransformerImpl.java:1192) at org.apache.xalan.transformer.TransformerImpl.transform (TransformerImpl.java:1170) Thanks, Jayant - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Font.Cache folder
Hello, How can I specify font cache folder using configuration file? baseDriveName:\FolderName/base The above configuration works for stand-alone version but fails in Oracle 11g. Error: \.fop\fop-fonts.cache is not an acceptable relative path when user.dir is E:\APP\ORACLE\PRODUCT\11.1.0\DB_1\ Thanks for your help. Regards, Jayant - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
How to initialize Log4j logging in Oracle 11g
Hello, I am getting following warning message when I execute FOP 0.95 in Oracle 11g using Java Stored procedure. How can I address this issue? log4j:WARN No appenders could be found for logger (org.apache.fop.util.ContentHandlerFactoryRegistry). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Thanks, Jayant - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: FOP trunk error message when run from ant
Eric, In our case, we get data from database as XML, apply the reports specific xsl-fo template (.xsl file) and generate a PDF report. That's our requirement and the solution I mentioned works very well for us. All we need is create FOP Factory instance, specify the configuration file location, specify transformer (XSLT), provide source XML file and we have what we need a PDF report. Also we keep our application related fonts in a separate folder than windows folder. Regards, Jayant | | From: | | --| |Eric Douglas edoug...@blockhouse.com | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |07/01/2010 04:12 PM | --| | | Subject: | | --| |RE: FOP trunk error message when run from ant | --| That doesn't seem right at all. You explain how to get the fonts into the xconf reference path then show an embedded example. If you're using the classes and embedding the code you don't need that. I pull in fonts like this: 1) Create a TTFFontLoader using the font file name with URI path and a DefaultFontResolver 2) If it's one font per file just use getFont() to create a CustomFont, if you need to query any font details from the file 3) Build a new FontTriplet and add it into a Java ArrayList 4) Create a new EmbedFontInfo object using the FOP generated metrics file (URI), the KerningEnabled value (can be queried from CustomFont), the font triplet array, the font file (URI), and the sub font name (may be null) 5) Create another Java ArrayList and add in the EmbedFontInfo 6) Generate a Renderer and pass the font ArrayList to setFontList() 7) Put the Renderer into the UserAgent (setRendererOverride) Then you shouldn't even need the xconf file. I suggest never referring to fonts as files which should be installed on the client OS. We had a program years ago running on Windows 98 referencing a Courier font that didn't come out right because somehow the same font file had a different looking font in it on different clients. I avoid that problem now pulling the font from the server. -Original Message- From: Jayant Ghagre [mailto:jayant.gha...@ambest.com] Sent: Thursday, July 01, 2010 2:40 PM To: fop-users@xmlgraphics.apache.org Subject: RE: FOP trunk error message when run from ant Mario, Here's how I am using custom fonts. In my application folder I have created a folder MyAppFonts and copied all custom fonts in that folder. You can either refer to operating systems folder such as c:\windows\fonts. Copy fop.xconf file to your application folder and then rename to YourAppNameConfig.xml Open the YourAppNameConfig.xml in any editor and add you MyAppFonts folder as shown below fonts !-- embedded fonts -- !-- register all the fonts found in a directory -- directory.\MyAppFonts/directory !-- register all the fonts found in a directory and all of its sub directories (use with care) -- directory recursive=true.\MyAppFonts/directory !-- automatically detect operating system installed fonts auto-detect/ -- /fonts Sample java code // configure fopFactory as desired FopFactory
RE: FOP trunk error message when run from ant
Mario, Here's how I am using custom fonts. In my application folder I have created a folder MyAppFonts and copied all custom fonts in that folder. You can either refer to operating systems folder such as c:\windows\fonts. Copy fop.xconf file to your application folder and then rename to YourAppNameConfig.xml Open the YourAppNameConfig.xml in any editor and add you MyAppFonts folder as shown below fonts !-- embedded fonts -- !-- register all the fonts found in a directory -- directory.\MyAppFonts/directory !-- register all the fonts found in a directory and all of its sub directories (use with care) -- directory recursive=true.\MyAppFonts/directory !-- automatically detect operating system installed fonts auto-detect/ -- /fonts Sample java code // configure fopFactory as desired FopFactory fopFactory = FopFactory.newInstance(); fopFactory.setUserConfig(new File( YourAppNameConfig.xml )); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); I am using custom font in this manner. I hope this information helps. Regards, Jayant | | From: | | --| |Mario Madunic mario_madu...@newflyer.com | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |07/01/2010 02:19 PM | --| | | Subject: | | --| |RE: FOP trunk error message when run from ant | --| Thanks Eric, I removed the following jar from my ant181/lib xmlgraphics-commons-1.3.1 and copied over the 1.4 version. The graphic error msg is gone but now have an id reference error. Will work on this one before posting if I make no head way. I'll start a new message on how to get Helvetica recognized. I was unable to create an XML metric file for it with the method for 0.94. Once again thanks Eric for your quick and knowledgeable reply. Marijan (Mario) Madunic Publishing Specialist New Flyer Industries -Original Message- From: Eric Douglas [mailto:edoug...@blockhouse.com] Sent: Thursday, July 01, 2010 1:07 PM To: fop-users@xmlgraphics.apache.org Subject: RE: FOP trunk error message when run from ant Do you have the xmlgraphics-commons-1.4svn.jar in your trunk lib path? New method for calling fonts? Is this on embedding code or just on running from a command line? I'm using the FOP classes with embedded code and my custom fonts are working nicely. -Original Message- From: Mario Madunic [mailto:mario_madu...@newflyer.com] Sent: Thursday, July 01, 2010 10:13 AM To: fop-users@xmlgraphics.apache.org Subject: FOP trunk error message when run from ant While running the trunk via ANT the build fails. The error message is at the bottom. Pieces I'm using Java 1.6.0_16 ANT 1.8.1 (just started using it today, was using 1.7 and received same error) Windows XP SP3 I executed the build by just typing ant in a cmd prompt. In the config file I added the font metrics for the time being from my 0.94 config file, as it still seems to be valid. Example below font metrics-url=fontsForFOP/arial.xml kerning=yes embed-url=file:///c:/Windows/fonts/ARIAL.TTF font-triplet name=Arial
FOP 0.95 as Database Resident Objects in Oracle 11g Release 1
Hello fellow FOP-users, I am trying to load FOP 0.95 (binary download) into Oracle database as database resident object using following command line utility provided by Oracle. loadjava -user User/passw...@mydatabase -verbose -force -order -resolve -recursivejars -jarsasdbobjects -prependjarnames .\lib \avalon-framework-4.2.0.jar .\lib\batik-all-1.7.jar .\lib \commons-io-1.3.1.jar .\lib\commons-logging-1.0.4.jar .\lib \serializer-2.7.0.jar .\lib\servlet-2.2.jar .\lib\xalan-2.7.0.jar .\lib \xercesImpl-2.7.1.jar .\lib\xml-apis-1.3.04.jar .\lib \xml-apis-ext-1.3.04.jar .\lib\xmlgraphics-commons-1.3.1.jar .\lib \fop-hyph.jar .\lib\jai_codec.jar .\lib\jai_core.jar .\lib \jai_imageio.jar .\lib\jimi-1.0.jar .\lib\xmlunit1.0.jar .\build\fop.jar -fileout loaderrors.txt The loadjava utility does load 9000 plus classes into USER_OBJECTS table but it's not able to resolve more than 3000 classes and marks them as INVALID. I am getting two types of errors as shown below. errors : class org/apache/avalon/framework/logger/Loggable ORA-29521: referenced name org/apache/log/Logger could not be found errors : class org/apache/batik/anim/AbstractAnimation ORA-29534: referenced object ../lib/batik-all-1.7.jar///org/apache/batik/anim/timing/TimedElement could not be resolved Has anyone tried to load FOP as database resident object in Oracle? Am I missing any dependant jar files? As per Oracle documentation, Oracle JVM resolves the references using -resolver option if the referenced objects reside in other schema. In my case I am loading all the FOP related classes in my schema. Thanks in advance for your help. Regards, Jayant - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: FOP 0.95 as Database Resident Objects in Oracle 11g Release 1
Eric, Thanks for the reply. I did check the manifest file in FOP.jar and it matches with the list of files, I have specified in the loadjava option. I'll download the commons-logging-1.1.1 and try again. But in such case, do I need to compile FOP because FOP.jar would refer to commons-logging-1.0.4.jar, isn't it? Oracle documentation recommends loading classes/jars from bottom of the hierarchy. How can I get the complete dependency tree for FOP.Jar and it's dependencies? Manifest in each jar is my only option? Thanks for your help. Regards, Jayant | | From: | | --| |Eric Douglas edoug...@blockhouse.com | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |06/29/2010 09:16 AM | --| | | Subject: | | --| |RE: FOP 0.95 as Database Resident Objects in Oracle 11g Release 1 | --| Yes, you're probably missing dependant jars. Did you verify that all the jars in that statement exist? Did you open the fop.jar and check the classpath statement in the manifest.mf file? You can open a jar as an archive to view it's contents with an archive program such as 7-zip which is a free download. I had to download a few of the jars fop referenced separately from their own project websites to get it working properly. I also had issues with the logger. Fop came packaged with commons-logging-1.0.4. It actually fixed the errors when I downloaded and replaced that with commons-logging-1.1.1. -Original Message- From: Jayant Ghagre [mailto:jayant.gha...@ambest.com] Sent: Tuesday, June 29, 2010 8:20 AM To: fop-users@xmlgraphics.apache.org Subject: FOP 0.95 as Database Resident Objects in Oracle 11g Release 1 Hello fellow FOP-users, I am trying to load FOP 0.95 (binary download) into Oracle database as database resident object using following command line utility provided by Oracle. loadjava -user User/passw...@mydatabase -verbose -force -order -resolve -recursivejars -jarsasdbobjects -prependjarnames .\lib \avalon-framework-4.2.0.jar .\lib\batik-all-1.7.jar .\lib \commons-io-1.3.1.jar .\lib\commons-logging-1.0.4.jar .\lib \serializer-2.7.0.jar .\lib\servlet-2.2.jar .\lib\xalan-2.7.0.jar .\lib \xercesImpl-2.7.1.jar .\lib\xml-apis-1.3.04.jar .\lib \xml-apis-ext-1.3.04.jar .\lib\xmlgraphics-commons-1.3.1.jar .\lib \fop-hyph.jar .\lib\jai_codec.jar .\lib\jai_core.jar .\lib \jai_imageio.jar .\lib\jimi-1.0.jar .\lib\xmlunit1.0.jar .\build\fop.jar -fileout loaderrors.txt The loadjava utility does load 9000 plus classes into USER_OBJECTS table but it's not able to resolve more than 3000 classes and marks them as INVALID. I am getting two types of errors as shown below. errors : class org/apache/avalon/framework/logger/Loggable ORA-29521: referenced name org/apache/log/Logger could not be found errors : class org/apache/batik/anim/AbstractAnimation ORA-29534: referenced object ../lib/batik-all-1.7.jar///org/apache/batik/anim/timing/TimedElement could not be resolved Has anyone tried to load FOP as database resident object in Oracle? Am I missing any dependant jar files? As per Oracle documentation, Oracle JVM resolves the references using -resolver option if the referenced objects reside in other schema. In my case I am loading all the FOP related classes in my schema. Thanks