Some seemingly simple Formatting Questions
I'm relatively new to using FOP. I've got a document working fairly well, but am having a difficult time doing a few things that I would have thought to be simple. 1. Cannot set the TOP MARGIN of a xsl-region-before. Setting it to anything is ignored and the data is always printed at the very top of the page. fo:static-content flow-name=xsl-region-before margin-top=2cm margin-left=2cm margin-right=2cm 2. Cannot set the FONT of a fo:retrieve-marker used in a xsl-region-before. It seems to ignore my font setting and always print the same size. fo:block keep-together=auto font-size=8pt fo:retrieve-marker retrieve-class-name=mrkState retrieve-boundary=page retrieve-position=first-starting-within-page/ /fo:block 3. Cannot set the height of a fo:leader to a small amount. The output is always preceeded by more white space than is desired. fo:block fo:leader leader-pattern=rule space-after.optimum=4pt space-before=0pt line-height=1pt/ /fo:block 4. Problem using keep-with-next across page and column breaks of multi-column pages. Thanks to Chuck Paussa, I made great headway on better controlling KEEPS in a multi-column document by putting the data in TABLE CELLS. The KEEP-TOGETHER seems to work fine within TABLE cells; however, the KEEP-WITH NEXT does not appear to work. Any insights on this would be greatly appreciated. Thanks, Paul Thibodeaux
RE: Some seemingly simple Formatting Questions
1. Cannot set the TOP MARGIN of a xsl-region-before. Setting it to anything is ignored and the data is always printed at the very top of the page. fo:static-content flow-name=xsl-region-before margin-top=2cm margin-left=2cm margin-right=2cm I think margin is a property of the page-master (correct me if I'm wrong), but you are right in that it doesn't seem to work on the region-before, even in the examples provided with FOP. Probably a bug. 2. Cannot set the FONT of a fo:retrieve-marker used in a xsl-region-before. It seems to ignore my font setting and always print the same size. fo:block keep-together=auto font-size=8pt fo:retrieve-marker retrieve-class-name=mrkState retrieve-boundary=page retrieve-position=first-starting-within-page/ /fo:block Set this property on the block around fo:marker instead. 3. Cannot set the height of a fo:leader to a small amount. The output is always preceeded by more white space than is desired. fo:block fo:leader leader-pattern=rule space-after.optimum=4pt space-before=0pt line-height=1pt/ /fo:block Can't comment on the height but haven't noticed the leading whitespace. The properties on preceding block perhaps? What else is on this line? 4. Problem using keep-with-next across page and column breaks of multi-column pages. Thanks to Chuck Paussa, I made great headway on better controlling KEEPS in a multi-column document by putting the data in TABLE CELLS. The KEEP-TOGETHER seems to work fine within TABLE cells; however, the KEEP-WITH NEXT does not appear to work. Odd, keep-together only worked for me on table-rows, not cells. Haven't used keep-with-next. Regards, Roland
RE: Embedded FOP question.
Thanks for your help! I needed to change it to use a ByteArray so that I could set the content length for IE. Other than that it worked great. Thanks again. Mike -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 25, 2002 4:51 PM To: [EMAIL PROTECTED] Subject: Re: Embedded FOP question. [EMAIL PROTECTED] wrote: I've been using the FopServlet as the basis for my servlet app which takes a DOM document, stores it to an xml file, then uses XSLTInputHandler to convert to fo and output the pdf. Now I'm getting to the point where I want to eliminate the xml file and convert using the DOM object or a serialized string of the xml. It looks to me like it can't be done with the XSLTInputHandler class because it requires java.io.File parameters. I'm looking at XSLTransform to transform the DOM document input to a DOM document containing FO output using the xsl file. Just wondering if this is the best approach and then how to best use the FO DOM document to output the pdf. If anyone knows where I can find some good sample code (or if you have a sample yourself), I would appreciate the tips. There is sample code in the archive at http://marc.theaimsgroup.com/?l=fop-userr=1w=2# http://marc.theaimsgroup.com/?l=fop-devr=1w=2# For producing and rendering a DOM, look up javax.xml.transform.dom.DOMResult in the JAXP documentation coming with your XSLT processor and look for render(Document) in src/org/apache/fop/apps/Driver.java Unless you need to manipulate the intermediate DOM, it is usually more effective to use SAX to tie the XSLT processor to the FOP driver, for example http://marc.theaimsgroup.com/?l=fop-userm=102400770318682w=2 J.Pietschmann
Re: Some seemingly simple Formatting Questions
Hi Paul, 1. Try putting your margin-top in your fo:simple-page-master 2. afaik markers aren't supported yet. 3. try using something like: fo:block line-height=3pt fo:leader leader-pattern=rule leader-length=150mm rule-thickness=1pt color=#99/ /fo:block 4. I had to fiddle a lot with preventing page-breaks, you will have to use the workarounds (using table-cells/ keep-together=always) or wait for the major redesign, I reckon. Please correct, if I'm wrong. markus -Ursprüngliche Nachricht- Von: Thibodeaux, Paul [EMAIL PROTECTED] An: [EMAIL PROTECTED] [EMAIL PROTECTED] Datum: Mittwoch, 26. Juni 2002 02:25 Betreff: Some seemingly simple Formatting Questions I'm relatively new to using FOP. I've got a document working fairly well, but am having a difficult time doing a few things that I would have thought to be simple. 1. Cannot set the TOP MARGIN of a xsl-region-before. Setting it to anything is ignored and the data is always printed at the very top of the page. fo:static-content flow-name=xsl-region-before margin-top=2cm margin-left=2cm margin-right=2cm 2. Cannot set the FONT of a fo:retrieve-marker used in a xsl-region-before. It seems to ignore my font setting and always print the same size. fo:block keep-together=auto font-size=8pt fo:retrieve-marker retrieve-class-name=mrkState retrieve-boundary=page retrieve-position=first-starting-within-page/ /fo:block 3. Cannot set the height of a fo:leader to a small amount. The output is always preceeded by more white space than is desired. fo:block fo:leader leader-pattern=rule space-after.optimum=4pt space-before=0pt line-height=1pt/ /fo:block 4. Problem using keep-with-next across page and column breaks of multi-column pages. Thanks to Chuck Paussa, I made great headway on better controlling KEEPS in a multi-column document by putting the data in TABLE CELLS. The KEEP-TOGETHER seems to work fine within TABLE cells; however, the KEEP-WITH NEXT does not appear to work. Any insights on this would be greatly appreciated. Thanks, Paul Thibodeaux
Re: Problem with javax.xml.transform.Transformer
J.Pietschmann wrote: I belive the Tomcat site itself mentions it. Other than that, read the installation instructions for Cocoon regarding Tomcat 4.0.3 and the Cocoon FAQ. The generally recommended workaround is to move everything into the Tomcat lib. You are right, that's particular bug 6374, http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6374. -- Oleg Tkachenko Multiconn International Ltd
RE: Some seemingly simple Formatting Questions
I'm actually having the same problems with the keep-with-next property, it just doesn't seem to have ANY effect at all (I tried using it on table rows). There have been some discussions here about this topic, and I think that some people stated that it works, but I still couldn't figure out how they did it... One workaround is to use table-headers, depending on your document structure, you might wanna use this. Kurt -Message d'origine- De : Markus Wiese [mailto:[EMAIL PROTECTED] Envoyé : mercredi, 26. juin 2002 10:40 À : [EMAIL PROTECTED] Objet : Re: Some seemingly simple Formatting Questions Hi Paul, 1. Try putting your margin-top in your fo:simple-page-master 2. afaik markers aren't supported yet. 3. try using something like: fo:block line-height=3pt fo:leader leader-pattern=rule leader-length=150mm rule-thickness=1pt color=#99/ /fo:block 4. I had to fiddle a lot with preventing page-breaks, you will have to use the workarounds (using table-cells/ keep-together=always) or wait for the major redesign, I reckon. Please correct, if I'm wrong. markus -Ursprüngliche Nachricht- Von: Thibodeaux, Paul [EMAIL PROTECTED] An: [EMAIL PROTECTED] [EMAIL PROTECTED] Datum: Mittwoch, 26. Juni 2002 02:25 Betreff: Some seemingly simple Formatting Questions I'm relatively new to using FOP. I've got a document working fairly well, but am having a difficult time doing a few things that I would have thought to be simple. 1. Cannot set the TOP MARGIN of a xsl-region-before. Setting it to anything is ignored and the data is always printed at the very top of the page. fo:static-content flow-name=xsl-region-before margin-top=2cm margin-left=2cm margin-right=2cm 2. Cannot set the FONT of a fo:retrieve-marker used in a xsl-region-before. It seems to ignore my font setting and always print the same size. fo:block keep-together=auto font-size=8pt fo:retrieve-marker retrieve-class-name=mrkState retrieve-boundary=page retrieve-position=first-starting-within-page/ /fo:block 3. Cannot set the height of a fo:leader to a small amount. The output is always preceeded by more white space than is desired. fo:block fo:leader leader-pattern=rule space-after.optimum=4pt space-before=0pt line-height=1pt/ /fo:block 4. Problem using keep-with-next across page and column breaks of multi-column pages. Thanks to Chuck Paussa, I made great headway on better controlling KEEPS in a multi-column document by putting the data in TABLE CELLS. The KEEP-TOGETHER seems to work fine within TABLE cells; however, the KEEP-WITH NEXT does not appear to work. Any insights on this would be greatly appreciated. Thanks, Paul Thibodeaux
Using FOP in Tomcat server
Hi, I am using tomcat server and i have some problem using fop i get the following error in the catalina.out file java.lang.ClassNotFoundException: javax.xml.transform.Transformer at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1394) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1243) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.fop.apps.XSLTInputHandler.getParser(Unknown Source) at poolinfo.PDFGenerator.getPDFReport(PDFGenerator.java:92) Note : In the log file the relevant jar files (fop,batik, avalon-framework,xalan-2.3.1)are deployed successfully can anyone help me on this Thanks Sunil
Re: Using FOP in Tomcat server
I had the same problem, and it solved it self by reputting the xalan jar in the lib dir (inside the web-inf of the application)... and restarting the tomcat... You might wanna try to extract the class files and set them in the classes dir of your web-inf, if this solves the problem, then try to rebuild the jar and put that jar in the lib dir... hope this helps... Hi, I am using tomcat server and i have some problem using fop i get the following error in the catalina.out file java.lang.ClassNotFoundException: javax.xml.transform.Transformer at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1394) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1243) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.fop.apps.XSLTInputHandler.getParser(Unknown Source) at poolinfo.PDFGenerator.getPDFReport(PDFGenerator.java:92) Note : In the log file the relevant jar files (fop,batik, avalon-framework,xalan-2.3.1)are deployed successfully can anyone help me on this Thanks Sunil Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information.
Re: Using FOP in Tomcat server
Chances are you are using tomcat4.02 or 4.03 which have classloader bug, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6374. I so, upgrade to tomcat 4.04 or move your jars to tomcat/common/lib. Kumar, Sunil wrote: Hi, I am using tomcat server and i have some problem using fop i get the following error in the catalina.out file java.lang.ClassNotFoundException: javax.xml.transform.Transformer at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1394) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1243) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.fop.apps.XSLTInputHandler.getParser(Unknown Source) at poolinfo.PDFGenerator.getPDFReport(PDFGenerator.java:92) Note : In the log file the relevant jar files (fop,batik, avalon-framework,xalan-2.3.1)are deployed successfully can anyone help me on this Thanks Sunil -- Oleg Tkachenko Multiconn International Ltd, Israel
RE: Using FOP in Tomcat server
trey mcclendon -Original Message- From: Oleg Tkachenko [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 26, 2002 8:53 AM To: [EMAIL PROTECTED] Subject: Re: Using FOP in Tomcat server Chances are you are using tomcat4.02 or 4.03 which have classloader bug, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6374. I so, upgrade to tomcat 4.04 or move your jars to tomcat/common/lib. Kumar, Sunil wrote: Hi, I am using tomcat server and i have some problem using fop i get the following error in the catalina.out file java.lang.ClassNotFoundException: javax.xml.transform.Transformer at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1394) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1243) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.fop.apps.XSLTInputHandler.getParser(Unknown Source) at poolinfo.PDFGenerator.getPDFReport(PDFGenerator.java:92) Note : In the log file the relevant jar files (fop,batik, avalon-framework,xalan-2.3.1)are deployed successfully can anyone help me on this Thanks Sunil -- Oleg Tkachenko Multiconn International Ltd, Israel
RE: Using FOP in Tomcat server
please ignore my prev message thanks -Original Message- From: Kumar, Sunil Sent: Wednesday, June 26, 2002 7:53 AM To: [EMAIL PROTECTED] Subject: RE: Using FOP in Tomcat server trey mcclendon -Original Message- From: Oleg Tkachenko [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 26, 2002 8:53 AM To: [EMAIL PROTECTED] Subject: Re: Using FOP in Tomcat server Chances are you are using tomcat4.02 or 4.03 which have classloader bug, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6374. I so, upgrade to tomcat 4.04 or move your jars to tomcat/common/lib. Kumar, Sunil wrote: Hi, I am using tomcat server and i have some problem using fop i get the following error in the catalina.out file java.lang.ClassNotFoundException: javax.xml.transform.Transformer at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1394) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1243) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.apache.fop.apps.XSLTInputHandler.getParser(Unknown Source) at poolinfo.PDFGenerator.getPDFReport(PDFGenerator.java:92) Note : In the log file the relevant jar files (fop,batik, avalon-framework,xalan-2.3.1)are deployed successfully can anyone help me on this Thanks Sunil -- Oleg Tkachenko Multiconn International Ltd, Israel
Re: AW: Problem with servlet
Thanks for your help. I got the following from my websphere administrator. We've tried to do the changes as mentioned at the end of your e-mail (changing jars and updating admin.config), but the IBM admin server can't restart. If we remove xml4j.jar and the others and replace them by the ones specified, the IBM admin server can't restart because of the lack of ibm xml classes only found in xml4j.jar, and not available in Xerces-1.2.3.jar or Xalan-2.0.0. We've tried to use xml4j.jar with Xerces123 and Xalan200, but problems appears in the running of the server. ANy suggestions? Thanks again for your help. -Neeru J.Pietschman n To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: oo.de Subject: Re: AW: Problem with servlet 06/21/2002 05:23 PM Please respond to fop-user [EMAIL PROTECTED] wrote: I made the changes but still getting the same error. It's driving me crazy. ANy help will be greatly appreciated. Usually, WebSphere 3.5 comes with an ancient XML tool set. You have to put Xerces-1.2.3.jar and Xalan-2.0.0.jar into the classpath before the old tools. If you have admin access, remove xml4j.jar, a perhaps existing old xerces.jar, lotusxsl.jar from the WebSphere lib and edit the startup scripts so that the newer Xerces and Xalan jars are used. If you have user rights only, start the admin client, go to your application server entry, open the environment windoe and add a CLASSPATH environment variable with the newer Xerces and Xalan jars . Better yet, upgrade to 4.0. J.Pietschmann
Re: AW: Problem with servlet
I got fop successfully running on websphere 3.5 just by adding saxon.jar at the first place in the com.ibm.ejs.sm.adminserver.classpath record of admin.config file (beware about strange syntax \:/), here is my line (websphere 3.5.6, NT4): com.ibm.ejs.sm.adminserver.classpath=d\:/WebSphere/AppServer/lib/saxon.jar;d\:/WebSphere/AppServer/lib/ibmwebas.jar;d\:/WebSphere/AppServer/properties;d\:/WebSphere/AppServer/lib/servlet.jar;d\:/WebSphere/AppServer/lib/webtlsrn.jar;d\:/WebSphere/AppServer/lib/lotusxsl.jar;d\:/WebSphere/AppServer/lib/compat.jar;d\:/WebSphere/AppServer/lib/xalan.jar;d\:/WebSphere/AppServer/lib/ns.jar;d\:/WebSphere/AppServer/lib/ejs.jar;d\:/WebSphere/AppServer/lib/ujc.jar;D\:/PROGRA~1/SQLLIB/java/db2java.zip;d\:/WebSphere/AppServer/lib/repository.jar;d\:/WebSphere/AppServer/lib/admin.jar;d\:/WebSphere/AppServer/lib/swingall.jar;d\:/WebSphere/AppServer/lib/console.jar;d\:/WebSphere/AppServer/lib/was20cm.jar;d\:/WebSphere/AppServer/lib/tasks.jar;d\:/WebSphere/AppServer/lib/xml4j.jar;d\:/WebSphere/AppServer/lib/vaprt.jar;d\:/WebSphere/AppServer/lib/sslight.jar;d\:/WebSphere/AppServer/lib/ibmjndi.jar;d\:/WebSphere/AppServer/lib/deployTool.jar;d\:/WebSphere/AppServer/lib/databeans.jar;d\:/WebSphere/ AppServer/classes;d\:/WebSphere/AppServer/jdk/lib/tools.jar;d\:/WebSphere/AppServer/lib/bsf.jar;d\:/WebSphere/AppServer/lib/dertrjrt.jar;d\:/WebSphere/AppServer/lib/derdbpw.jar;d\:/WebSphere/AppServer/lib/ivjejb35.jar;d:/WebSphere/AppServer/lib/js.jar;d\:/WebSphere/AppServer/lib/js.jar This way saxon's SAX implementation classes override those in old libraries. [EMAIL PROTECTED] wrote: Thanks for your help. I got the following from my websphere administrator. We've tried to do the changes as mentioned at the end of your e-mail (changing jars and updating admin.config), but the IBM admin server can't restart. If we remove xml4j.jar and the others and replace them by the ones specified, the IBM admin server can't restart because of the lack of ibm xml classes only found in xml4j.jar, and not available in Xerces-1.2.3.jar or Xalan-2.0.0. We've tried to use xml4j.jar with Xerces123 and Xalan200, but problems appears in the running of the server. ANy suggestions? Thanks again for your help. -Neeru J.Pietschman n To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: oo.de Subject: Re: AW: Problem with servlet 06/21/2002 05:23 PM Please respond to fop-user [EMAIL PROTECTED] wrote: I made the changes but still getting the same error. It's driving me crazy. ANy help will be greatly appreciated. Usually, WebSphere 3.5 comes with an ancient XML tool set. You have to put Xerces-1.2.3.jar and Xalan-2.0.0.jar into the classpath before the old tools. If you have admin access, remove xml4j.jar, a perhaps existing old xerces.jar, lotusxsl.jar from the WebSphere lib and edit the startup scripts so that the newer Xerces and Xalan jars are used. If you have user rights only, start the admin client, go to your application server entry, open the environment windoe and add a CLASSPATH environment variable with the newer Xerces and Xalan jars . Better yet, upgrade to 4.0. J.Pietschmann -- Oleg Tkachenko Multiconn International Ltd, Israel
Re: AW: Problem with servlet
[EMAIL PROTECTED] wrote: Thanks for your help. I got the following from my websphere administrator. We've tried to do the changes as mentioned at the end of your e-mail (changing jars and updating admin.config), but the IBM admin server can't restart. If we remove xml4j.jar and the others and replace them by the ones specified, the IBM admin server can't restart because of the lack of ibm xml classes only found in xml4j.jar, and not available in Xerces-1.2.3.jar or Xalan-2.0.0. We've tried to use xml4j.jar with Xerces123 and Xalan200, but problems appears in the running of the server. I managed it even without admin rightes. Goto http://marc.theaimsgroup.com/?l=fop-devm=101552169109119w=2 and search for websphere. J.Pietschmann
Re: What kind of TIFF does FOP support
J.Pietschmann wrote: Well, obsolete or not, it works, is available, platform neutral, easy to install and provides support for a wide range of graphics formats, some of them rather obscure. Do you know of a JAI implementation, preferably OSS and/or freely available, which supports all common subformats of TIFF, PNG, BMP and perhaps a few more? Well, that's right and what is more JAI strongly requires at least jdk1.3 :( -- Oleg Tkachenko Multiconn International Ltd