RE: inconsistent table/t.cell border widths with DocBook to PDF
Yes , while viewing it this kind of problem might occur , also i was getting the same problem. but try to take a print out . U will not find this problem . It will come properly. Regards Sanjib Ku. Das (080) 5597600 -3868 **it's impossible to judge your talent until and unless you exercise it. **Believe in attitude, not in talent. -Original Message- From: Norbert Schoepke [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 05, 2002 1:28 AM To: [EMAIL PROTECTED] Subject: inconsistent table/t.cell border widths with DocBook to PDF Hi FOPpers ! While using FOP to build some docbooks of mine works quite nicely, one rather visual problem occured when I used tables. The linewidth of the table/cell borders is not the same for all cells. Some borders appear to be double as wide as others. Yet there seems to be no pattern either, thus I came to think it could be a bug. I experimented with different borderwidths by setting the corresponding parameter in the DocBook stylesheets (Norman Walsh's XSL 1.51.1). But that didn't help. It looks...well...unprofessional so I wanted to ask if this is a known problem, if it's a stylesheet or FOP problem and if there is a fix/workaround to it. I would be glad to hear any hint about this Norbert Schoepke Developer PS : At work I have problems reading the user-digest (I can only read the first post of the list in Lotus Notes)...please post to my email address too, which is: [EMAIL PROTECTED] Thanks Critical Reach AG - optimizing the manufacturing aftermarket - Garmischer Straße 19/21 81377 München Fon: +49 (89) / 54 26 21 - 54 Fax: +49 (89) / 54 26 21 - 15 mailto:[EMAIL PROTECTED] http://www.criticalreach.com This message contains privileged and confidential information and is intended only for the individual named. If you are not the intended recepient you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and immediately delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. --
Re: Problem with FOP outline extension
First, I don't used disable-output-escaping. At this end of this mail, you will find: - an extract of an XML file, - an extract of the XSLT file, - an sample servlet. DESCRIPTION OF THE SAMPLE - The goal of the sample is to create a PDF file containing book's description (a title and a description). Books are classified using book's type (such as Jave, Perl). In the generated PDF: - I force a page break foe each book's type, - I want bookmarks both for the book's types and the books To used the sample servlet, you first have to adapt pathname and then call: yourserver/servlet/tstBookmark?mode=direct to generate PDF directly from xml and xsl files. yourserver/servlet/tstBookmark?mode=fo to create a fo file from xml and xsl files and then generate the PDF from fo File. THE XML FILE (tstBookmark.xml) -Begin ?xml version=1.0 encoding=ISO-8859-1? page content booktypes booktype id=1 labelJava/label books book id=4 titleJava and SOAP/title abstract Java and SOAP provides Java developers with an in-depth look at SOAP (the Simple Object Access Protocol). Of course, it covers the basics: what SOAP is, why it's soared to a spot on the Buzzwords' Top Ten list, and what its features and capabilities are. And it shows you how to work with some of the more common Java APIs in the SOAP world: Apache SOAP and GLUE. Java and SOAP also discusses interoperability between the major SOAP platforms, including Microsoft's .NET, SOAP messaging, SOAP attachments, message routing, and a preview of the forthcoming AXIS APIs and server. If you're a Java developer who would like to start working with SOAP, this is the book you need to get going. /abstract /book book id=2 titleJava and XML/title abstract New chapters on Advanced SAX, Advanced DOM, SOAP, and data binding, as well as new examples throughout, bring the second edition of Java amp; XML thoroughly up to date. Except for a concise introduction to XML basics, the book focuses entirely on using XML from Java applications. It's a worthy companion for Java developers working with XML or involved in messaging, web services, or the new peer-to-peer movement. /abstract /book book id=1 titleJava and XSLT/title abstract Learn how to use XSL transformations in Java programs ranging from stand-alone applications to servlets. Java and XSLT introduces XSLT and then shows you how to apply transformations in real-world situations, such as developing a discussion forum, transforming documents from one form to another, and generating content for wireless devices. /abstract /book /books /booktype booktype id=4 labelPerl/label books book id=5 titleCGI Programming with Perl/title abstract The Common Gateway Interface (CGI) is one of the most powerful methods of providing dynamic content on the Web. CGI is a generic interface for calling external programs to crunch numbers, query databases, generate customized graphics, or perform any other server-side task. Based on the best-selling CGI Programming on the World Wide Web, this edition has been completely rewritten to demonstrate current techniques available with the CGI.pm module and the latest versions of Perl. Topics include incorporating JavaScript for form validation, controlling browser caching, making CGI scripts secure in Perl, working with databases, creating simple search engines, maintaining state between multiple sessions, generating graphics dynamically, and improving performance of CGI scripts. /abstract /book /books /booktype /booktypes /content /page -End THE XSL FILE (tstBookmark.xslfo) -Begin ?xml version=1.0 encoding=ISO-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:output method=xml/ !-- Document definition -- xsl:template match=/ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:fox=http://xml.apache.org/fop/extensions; fo:layout-master-set fo:simple-page-master master-name=A4 page-height=297mm page-width=210mm margin-right=75pt margin-left=75pt margin-bottom=25pt margin-top=25pt fo:region-before extent=25pt/ fo:region-body margin-top=50pt margin-bottom=50pt/ fo:region-after extent=25pt/ /fo:simple-page-master /fo:layout-master-set xsl:apply-templates select=page/content/booktypes/booktype mode=toc/ xsl:apply-templates select=page/content/booktypes/booktype mode=content/ /fo:root /xsl:template !-- Bookmark: book's type -- xsl:template match=booktype mode=toc fox:outline internal-destination=[EMAIL PROTECTED] fox:labelxsl:value-of select=label//fox:label xsl:if test=descendant::books/book
Re: Again out of Memory Error -2
My xsl snippet. xsl:template match=/ fo:root fo:layout-master-set ... /fo:layout-master-set fo:page-sequence master-reference=... fo:static-content ... fo:static-content fo:flow !-- Table start -- !-- Table header -- xsl:for-each select=codetest/detail !-- Table rows -- xsl:value-of select=group/ ... .. /xsl:for-each !-- Table end -- /fo:flow /fo:page-sequence /fo:root /xsl:template my Xml snippet: codetest detail group/ id/ sector/ quantity/ level/ . . ANSI/ /detail /codetest Please give me some tips on going for multiple page sequence.I'm having 1488 rows. --- Cyril Rognon [EMAIL PROTECTED] wrote: I suppose you are using FOP 0.20.3... Do you use as many page sequences as you can ? Long tables and long page sequences are known to increase the memory requierments of FOP. error has nothing to do with xml. Xsl could be used to create additionnal page sequences. List Archive shows you how. http://www.sold.com.au - The Sold.com.au Big Brand Sale - New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12
Re: executing fop with ant
This question really belongs on the ant-user mailing list. Byt anyways, what you want is the uptodate task, this link http://jakarta.apache.org/ant/manual/CoreTasks/uptodate.html contains an example that should fit your needs. hth /// Magnus Sjöberg [EMAIL PROTECTED] wrote: Hi, I have in my application a set of FO file, that i have to convert in PDF. I would like to do this with ant. so i wrote those lines: apply executable=fop os=Linux dest=${build.src} srcfiles/ targetfiles/ fileset dir=${src.dir} patternset include name=**/*.fo/ /patternset /fileset mapper type=glob from=*.fo to=*.pdf/ /apply that runs pretty well. My problem is that when i execute this, it re-create all the pdf each time, even if the .fo had not been update! I would like to notify to my apply tag that: if the .fo didn't change, don't create the .pdf. In fact, I just want to do the same as javac, that doesn't compile the .java if it still the same. Do you follow me ? Is there anyone having the same problem? thanks for helping, Ludo. Webmail Saros: http://webmail.saros.fr
Re: Again out of Memory Error -2
Ok I'll try to answer both part 1 and 2 here : as for the JVM memory parameter with servlet engines : Your servlet engine is executed in a JVM that must allow you to set memory parameters. I don't know about every ServletEngine or ApplicationServers but you can do this with Tomcat or Websphere so I guess it exists everywhere. As for multiple page sequences, it is simply a fact that the current FOP implementation seems to keep a whole page sequence in memory before it writes it down. So the biggest bage sequence you have, the more heap size you need. Therefore it can be helpfull to create separate page sequence anytime you can. In your case, it is the worst situation : one long table. You have to start and stop the table each time you want to change page-sequence. Some guy on the list had the same situation to deal with. He manage to have an average number of x row per pages. Then he twisted his XSLT stylesheet to take x rowData (detail element in your case) to build one page sequence containing one table with the x rows and so on. He has ended with a 97 page-sequence document. This may be a little extreme but it works. The archive pointer I gave you does this trick. In many case, you have to deal with many tables wich are not always 100 pages long then you can place page-sequences every time you know you can have a page break. I hope this helps. Cyril
FO to PCL interrupts at SVG
Hello, When I convert my FO file to PCL with FOP 0.20.3 I get the error message: !!! TODO: getWidth() There is no problem, when I convert the same FO file to PDF. The FO file include 3 SVG parts. When I remove those SVG parts, FO to PCL works too. How shall I understand the error message? FO to PCL do not work when there is SVG in the FO file? So, what to do when there is need for SVG images in a printout? Any hints are very welcome. regards, Darya __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com
Re: external-graphic width height
Thanks ... Actually I noticed that my fo works (using absolute measure as you pointed) on one machine but not on the other. It sounds as if I had a config problem with fop on my machine ... Both are Win2000 Pro with JRE 1.3.1.02 and fop0.20.2 ... - Original Message - From: J.Pietschmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 9:41 PM Subject: Re: external-graphic width height Florence Deforge wrote: Hi I need to resize some gif images which are to be displayed in a pdf doc. I tried to insert the following code inside a block or a table-cell : fo:external-graphic width=75% height=75% text-align=center xsl:attribute name=src xsl:textfile:/xsl:text xsl:value-of select=image/ /xsl:attribute /fo:external-graphic Whatever percentage or absolute size is set, the graphic is displayed with same size (which is not the original size as well). Could anyone advice please ? It seems that a percental width does not work on fo:external-graphic. Use an absolute measure like width=5cm. Note that 75% won't scale the image to 75% of the original width, even if it worked, it would scale the image to 75% of the width of the enclosing reference area. Note further that when it comes to rendering of bitmapped images to physical devices your definition of original size may be quite different from anyone's else, but still everyone is right. J.Pietschmann
Re: Again out of Memory Error -2
Hi Cyril, Thanks a lot for replying. I'm using Tomcat 3.2,so I think there shd be someway to imporve JVM heap size. Now I understood the multiple page sequence advantage.I tried to change my to have XSLT to print 20 rows at a time,still coding/re-coding my XSLT to get a good result and not yet completed. Since this is a one-off job,I converted my large XML data to HTML,then I converted HTML to PDF using Adobe distiller.So the task is done,but I'm half baked now with my XSLT code. Thanks a lot for replying me at right time. Regards Balaji --- Cyril Rognon [EMAIL PROTECTED] wrote: Ok I'll try to answer both part 1 and 2 here : as for the JVM memory parameter with servlet engines : Your servlet engine is executed in a JVM that must allow you to set memory parameters. I don't know about every ServletEngine or ApplicationServers but you can do this with Tomcat or Websphere so I guess it exists everywhere. As for multiple page sequences, it is simply a fact that the current FOP implementation seems to keep a whole page sequence in memory before it writes it down. So the biggest bage sequence you have, the more heap size you need. Therefore it can be helpfull to create separate page sequence anytime you can. In your case, it is the worst situation : one long table. You have to start and stop the table each time you want to change page-sequence. Some guy on the list had the same situation to deal with. He manage to have an average number of x row per pages. Then he twisted his XSLT stylesheet to take x rowData (detail element in your case) to build one page sequence containing one table with the x rows and so on. He has ended with a 97 page-sequence document. This may be a little extreme but it works. The archive pointer I gave you does this trick. In many case, you have to deal with many tables wich are not always 100 pages long then you can place page-sequences every time you know you can have a page break. I hope this helps. Cyril http://www.sold.com.au - The Sold.com.au Big Brand Sale - New PCs, notebooks, digital cameras, phones and more ... Sale ends June 12
SVGContext Exception
I have been producing reports successfully by embedding fop in my java classes. These worked fine as standalone applications but when I tried to incorporate them into the front end GUI I got this error. I have the latest version of batik.jar and cannot see what might be wrong. Has anybody had this problem Thanks in advance. Exception occurred during event dispatching: java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SVGContext at org.apache.fop.svg.SVGElementMapping.addToBuilder(SVGElementMapping ava:21) at org.apache.fop.apps.Driver.addElementMapping(Driver.java:373) at org.apache.fop.apps.Driver.addElementMapping(Driver.java:384) at org.apache.fop.apps.Driver.setupDefaultMappings(Driver.java:253) at org.apache.fop.apps.Driver.init(Driver.java:189) at com.inatos.homelet.block.reports.BlockDocument.writePDF(BlockDocume .java:64) at com.inatos.homelet.block.reports.Cash_IncomeReport.writePDF(Cash_In meReport.java:228) at CashIncomeDateReport.ReportBuuton_mousePressed(CashIncomeDateReport ava:413) at CashIncomeDateReport$SymMouse.mousePressed(CashIncomeDateReport.jav 231) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java: 1) at java.awt.Component.processMouseEvent(Component.java:3712) at java.awt.Component.processEvent(Component.java:3544) at java.awt.Container.processEvent(Container.java:1164) at java.awt.Component.dispatchEventImpl(Component.java:2593) at java.awt.Container.dispatchEventImpl(Container.java:1213) at java.awt.Component.dispatchEvent(Component.java:2497) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:24 ) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:221 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125) at java.awt.Container.dispatchEventImpl(Container.java:1200) at java.awt.Window.dispatchEventImpl(Window.java:926) at java.awt.Component.dispatchEvent(Component.java:2497) at java.awt.EventQueue.dispatchEvent(EventQueue.java:339) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatch read.java:131) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchTh ad.java:98) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93 at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
Re: Problem with FOP outline extension
Bruno Rondepierre wrote: THE XSL FILE (tstBookmark.xslfo) Problem solved. You hit a Xalan bug. If you've looked into the log (hopefully, there *is* a log), you'd have seen FOP error messages containing: ...unknown...null^outline... -Begin ?xml version=1.0 encoding=ISO-8859-1? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; ... xsl:template match=/ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:fox=http://xml.apache.org/fop/extensions; ... /fo:root /xsl:template !-- Bookmark: book's type -- xsl:template match=booktype mode=toc fox:outline internal-destination=[EMAIL PROTECTED] fox:labelxsl:value-of select=label//fox:label At this point, the fox: namespace prefix is undeclared. The declaration above in the fo:root element has gone out of scope. The processor should have complained about this. Move the declaration for the fox: prefix to the xsl:stylesheet element. BTW the fo: declaration on fo:root is redundant. J.Pietschmann