format-number rounding error
Hi, I am trying to generate PDF using FOP. But I got a rounding error when using the following fo script fo:block xsl:value-of select=format-number(0.5,'0')/ /fo:block The result from fop is 0 instead of 1 Is this a bug? How do we get around of it? Thanks LZ __ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Executing FOP example
Thanks. I 've got the idea but still does not work. The cuestion is where the example dir should be? My context is the following: Fop install in C:\fop-0.20.5 Tomcat install in C:\jakarta-tomcat-3.3.2 Inside of Tomcat directory I have a C:\jakarta-tomcat-3.3.2\webapps\fop which was generated after I deploy the .war file inside Tomcat directory. Inside C:\jakarta-tomcat-3.3.2\webapps\fop I have two folders META-INF ad WEB-INF. Please if someone realize that something is missing, please let me know. Thanks, Juan --- Andreas L. Delmelle [EMAIL PROTECTED] wrote: -Original Message- From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED] From: Juan Manuel Bellina [mailto:[EMAIL PROTECTED] snip / The URL is http://localhost:8080/fop/fop?fo=/home/path/to/fofile.fo; and I Imagine the problem is the home/path/to. My question is which value I should type? You could try the real location of your FO file (as opposed to literally copying the uri from the site). Or, if you don't have one, try: http://localhost:8080/fop/fop?fo=examples/fo/basic/simple.fo Greetz, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sometimes FOP truncates text
Eduardo Muñoz wrote: I have a web application that generates PDF report documents using FOP. A very strange thing happens from time to time. Sometimes I generate the report and the first word of some texts truncate. This happens for text inside tables. It is realy weird because it only happens sometimes, without making any change to the code. I hope you can help me figure out what the problem is. In addition to Andreas request for sample FO, it would be very useful to know what version of FOP you are running? The OS and JDK you are using would also be helpful. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Executing FOP example
Juan Manuel Bellina wrote: Thanks. I 've got the idea but still does not work. The cuestion is where the example dir should be? My context is the following: Fop install in C:\fop-0.20.5 In this case, the path to some sample FO would be: C:\fop-0.20.5\examples\fo\basic\simple.fo and so the URL would be http://localhost:8080/fop/fop?fo=c:/fop-0.20.5/examples/fo/basic/simple.fo; snip/ Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: format-number rounding error
lijun zou wrote: Hi, I am trying to generate PDF using FOP. But I got a rounding error when using the following fo script fo:block xsl:value-of select=format-number(0.5,'0')/ /fo:block This is not a rounding error You have specified your format to be 0, so the string 0 is always output. I think what you need is: xsl:value-of select=format-number(0.5,'#,##0.0')/ snip/ Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Differences in output from writePDF and print in FOP when content has special characters
Hi, I'm trying to make FOP print some reports in Danish with special characters. When I use the writePDF method to generate a PDF file on the harddrive, the layout is just as I want it and all words are on the same line. This is what I have been using while developing (so I did not block the printer at the office all the time). But I am not interested in getting a PDF file - I need to be able to print to the printer directly, so I switched from calling writePDF to calling print instead. This unfortunately causes problems with special characters :-/ If I use print the words containing the special characters are printed approximately 1mm below the line all other words are printed on, this is not acceptable behavior to us, so I need to find a fix for it. I can recreate this behavior on both FOP 0.20.4 and 0.20.5. But is there a patch somewhere that causes writePDF and print to generate identical output in either of these versions? Or is there anyone in this group that has successfully managed to use print with special characters and gotten all words printed on a straight line? If so, I would really like to see an example to check if I have missed a step somewhere. Thank you in advance. Regards, Flemming -- Flemming Jønsson Systems Engineer, M.Sc. C.S. Systematic Software Engineering A/S - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Differences in output from writePDF and print in FOP when content has special characters
Flemming Jønsson wrote: Hi, I'm trying to make FOP print some reports in Danish with special characters. When I use the writePDF method to generate a PDF file on the harddrive, the layout is just as I want it and all words are on the same line. This is what I have been using while developing (so I did not block the printer at the office all the time). But I am not interested in getting a PDF file - I need to be able to print to the printer directly, so I switched from calling writePDF to calling print instead. This unfortunately causes problems with special characters :-/ If I use print the words containing the special characters are printed approximately 1mm below the line all other words are printed on, this is not acceptable behavior to us, so I need to find a fix for it. When using FOP's Print option, FOP uses Java AWT to render the document. When a PDF is rendered FOP uses its own classes when working with Font metrics and laying out the Text. The AWT/Print output is very JDK dependent and there are more differences to the PDF output than just the special characters you have observed. The best approach when you need to print the output is to render to Postscript which uses similar code to the PDF Renderer. Then postscript can then be directed to the Printer using LPR command or similar. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I specify the value of the tabulation add after the end of fo:list-item-label by body-start() function?
thanks a lot It works jf - Original Message - From: Andreas L. Delmelle [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 8:36 PM Subject: RE: How can I specify the value of the tabulation add after the end of fo:list-item-label by body-start() function? -Original Message- From: Selber Jean-François [mailto:[EMAIL PROTECTED] I try it It doesn't work with fop 0.20.5 Hi, Provisional-label-separation is, well, 'provisional' and as such, by itself, it will not suffice to achieve the effect you're after. From the spec 7.28.3: Specifies the provisional distance between the end of the list-item-label and the start of the list-item-body. The value is not directly used during formatting, but is used in the computation of the value of the label-end function. label-end() = width of the content-rectangle of the reference-area into which the list-block is placed - (the value of the provisional-distance-between-starts + the value of the start-indent + start-intrusion-adjustment - the value of the provisional-label-separation) of the closest ancestor fo:list-block. So, say the area enclosing the list-block in question is 160mm wide, and you leave all the others (except provisional-label-separation) at their defaults, the calculation would become: label-end() = 160mm - (8.5mm + 0mm + 0mm(?) - 3mm) ^ Yes, the initial value for provisional-distance-between-starts is 24pt (0.33inch or roughly 8.5mm) Would this happen to be the size of the space you currently get? The body-start() function also uses provisional-distance-between-starts: body-start() = the value of the start-indent + start-intrusion-adjustment + the value of the provisional-distance-between-starts of the closest ancestor fo:list-block. HTH! Greetz, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
fop and jimi
Hi, I get the error: [ERROR] Error while creating area : Error creating FopImage object (file:images/logo_bmAG_footer.tif) : Jimi image library not available although I got it the http://java.sun.com/products/jimi/ and put jimi1_0\Jimi\JimiProClasses.zip in the CLASSPATH ... tia Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: infinite loop [INFO] area contents overflows area in line
Chris Bowditch schrieb: Thomas Richter wrote: Hi, I hope that this ist not a FAQ but with fop 0.20.5 I get an infinite loop with: [INFO] area contents overflows area in line [ERROR] Couldn't find hyphenation pattern de [ERROR] Error building hyphenation tree for language de Only a handful of hypenation files are distributed with FOP now because of licensing issues, de is not available. Try turning off hypenation, or changing the language property to en This should clear the error shown if you still get an infinite loop then post back. xsl:param name=hyphenate select='false'/ works for me tnx Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: format-number rounding error
lijun zou wrote: No, It is an error. '0' is a pattern, meaning round to integer. Perhaps you are right. But this is really the wrong forum for this question as its a pure xslt question. You will get better answers on the xsl-list: http://lists.mulberrytech.com/xsl-list/ I use other formatter, the result is ok. Its the XSLT processor that is responsible for the format-number() function, FOP uses Xalan by default. What XSLT processor is this other formatter using? snip/ Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fop and jimi
Thomas Richter wrote: Hi, I get the error: [ERROR] Error while creating area : Error creating FopImage object (file:images/logo_bmAG_footer.tif) : Jimi image library not available although I got it the http://java.sun.com/products/jimi/ and put jimi1_0\Jimi\JimiProClasses.zip in the CLASSPATH ... Ah, FOP only finds Jimi if you rename the JAR to jimi-1.0.jar. See the following for full details: http://xml.apache.org/fop/graphics.html#jimi Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Executing FOP example
Thanks Cris, but still does not work. Any order sugestion? --- Chris Bowditch [EMAIL PROTECTED] wrote: Juan Manuel Bellina wrote: Thanks. I 've got the idea but still does not work. The cuestion is where the example dir should be? My context is the following: Fop install in C:\fop-0.20.5 In this case, the path to some sample FO would be: C:\fop-0.20.5\examples\fo\basic\simple.fo and so the URL would be http://localhost:8080/fop/fop?fo=c:/fop-0.20.5/examples/fo/basic/simple.fo; snip/ Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Differences in output from writePDF and print in FOP when content has special characters
Chris Bowditch wrote: Flemming Jønsson wrote: Hi, I'm trying to make FOP print some reports in Danish with special characters. When I use the writePDF method to generate a PDF file on the harddrive, the layout is just as I want it and all words are on the same line. This is what I have been using while developing (so I did not block the printer at the office all the time). But I am not interested in getting a PDF file - I need to be able to print to the printer directly, so I switched from calling writePDF to calling print instead. This unfortunately causes problems with special characters :-/ If I use print the words containing the special characters are printed approximately 1mm below the line all other words are printed on, this is not acceptable behavior to us, so I need to find a fix for it. When using FOP's Print option, FOP uses Java AWT to render the document. When a PDF is rendered FOP uses its own classes when working with Font metrics and laying out the Text. The AWT/Print output is very JDK dependent and there are more differences to the PDF output than just the special characters you have observed. The best approach when you need to print the output is to render to Postscript which uses similar code to the PDF Renderer. Then postscript can then be directed to the Printer using LPR command or similar. Chris Nice explanation, Chris. The suggestion to output to -ps (PostScript) is a good one, and (BTW) one that works well on a 'headless' system ;-). MORE BACKGROUND INFO To continue a bit further, in my experience, I've noticed significant font kerning problems using the AWT renderer (-awt or -print) for Sun JRE pre 1.4.0_b09 (I think). IBM's JRE 1.3+ appears not to have these problems. In addition, as you've noticed, there appears to be ~10-20% difference in line-height between AWT and PDF. My solution is to have two .fo files (xml_default.fo xml_default_pdf.fo). The difference is that xml_default_pdf.fo sets up smaller region-before region-after extent margins, and then use xsl:include to 'include' the xml_default.fo template. That way, I reap the benefits of only needing to make changes to one template. Hope this info is useful! Web Maestro Clay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: format-number rounding error
-Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] lijun zou wrote: No, It is an error. '0' is a pattern, meaning round to integer. Perhaps you are right. But this is really the wrong forum for this question as its a pure xslt question. You will get better answers on the xsl-list: Hi, A pure XSLT question indeed, but I'm wondering why the OP doesn't simply use the round() function (which does *exactly* what he needs) Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hello and PDF 2 FOP
Hello List, I am glad to say that i've tried FOP a while and it seems quite a good work. Now I want to incorporate in my work. The client gave us a pdf file, in which we should be adding database data (I mean fill the form :). We thought something about regenerating the .fo file from the given .pdf, change the .fo, and generate a new pdf with the filled data. Is this possible? If so can someone point me out a direction to follow? Any alternatives are always welcome. Thank You Diogo Quintela - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Merging two xml files to one.
Hi there, i would like to do following thing: xmlfile1.xml xmlfile2.xml - xmlfile12.xml fop -xml xmlfile12.xml -xsl xmlfile12.xsl -pdf output.pdf Has someone an idea how i could do this? Greetings, Johannes Franz.
RE: Hello and PDF 2 FOP
-Original Message- From: Diogo Quintela (EF) [mailto:[EMAIL PROTECTED] Hi, The client gave us a pdf file, in which we should be adding database data (I mean fill the form :). We thought something about regenerating the .fo file from the given .pdf, What you could do is - either manually rewrite the entire PDF form in XSL-FO code (which can become quite time-consuming if you have a lot of 'ornaments' and need 100% identity; OTOH this could be quite a good exercise in FO :) ) - or make an image out of the blank form, create an XSL-FO that uses this as a background and puts the form data on top at the right coordinates. HTH! Greetz, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Merging two xml files to one.
-Original Message- From: Johannes Franz [mailto:[EMAIL PROTECTED] Hi there, i would like to do following thing: xmlfile1.xml xmlfile2.xml - xmlfile12.xml fop -xml xmlfile12.xml -xsl xmlfile12.xsl -pdf output.pdf Has someone an idea how i could do this? Hi, You definitely need to take a close look at XSLT. It takes only one XML as (primary) input, but other ones can be loaded in effortlessly, so it's *the* way to go here... http://xml.apache.org/fop/resources.html#documents-xslt HTH! Greetz, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Merging two xml files to one.
-Original Message- From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED] -Original Message- From: Johannes Franz [mailto:[EMAIL PROTECTED] Hi there, i would like to do following thing: xmlfile1.xml xmlfile2.xml - xmlfile12.xml fop -xml xmlfile12.xml -xsl xmlfile12.xsl -pdf output.pdf Has someone an idea how i could do this? Hi, You definitely need to take a close look at XSLT. It takes only one Sorry, obviously you're already using XSLT... Anyway, you can make a slight modification to your XSL code, so that it does not only apply-templates to the primary XML, but also to another source tree that is created with the document() function. HTH! Cheers, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hello and PDF 2 FOP
I think, iText is particularly suited for this kind of job. Converting PDF to XSL-FO and back to PDF is not a realistic way to do what you need to accomplish. Maybe sometime in the future FOP might me powerful enough to use an existing PDF as background. On 13.05.2004 19:49:13 Diogo Quintela \(EF\) wrote: Hello List, I am glad to say that i've tried FOP a while and it seems quite a good work. Now I want to incorporate in my work. The client gave us a pdf file, in which we should be adding database data (I mean fill the form :). We thought something about regenerating the .fo file from the given .pdf, change the .fo, and generate a new pdf with the filled data. Is this possible? If so can someone point me out a direction to follow? Any alternatives are always welcome. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hello and PDF 2 FOP
You may also want to look into iText (http://www.lowagie.com/iText). I believe it can handle PDF Forms. (*Chris*) -Original Message- From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED] Sent: Thursday, May 13, 2004 12:12 pm To: [EMAIL PROTECTED] Subject: RE: Hello and PDF 2 FOP -Original Message- From: Diogo Quintela (EF) [mailto:[EMAIL PROTECTED] Hi, The client gave us a pdf file, in which we should be adding database data (I mean fill the form :). We thought something about regenerating the .fo file from the given .pdf, What you could do is - either manually rewrite the entire PDF form in XSL-FO code (which can become quite time-consuming if you have a lot of 'ornaments' and need 100% identity; OTOH this could be quite a good exercise in FO :) ) - or make an image out of the blank form, create an XSL-FO that uses this as a background and puts the form data on top at the right coordinates. HTH! Greetz, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Merging two xml files to one.
Thanks very much, i'll try this way since it seems to be the easiest to me. - Original Message - From: Andreas L. Delmelle [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 13, 2004 9:43 PM Subject: RE: Merging two xml files to one. -Original Message- From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED] Anyway, you can make a slight modification to your XSL code, so that it does not only apply-templates to the primary XML, but also to another source tree that is created with the document() function. Oh, before you painfully have to find out for yourself: while the URI used with the document function can be passed in as an xsl:param, there is currently no possibility of feeding this param in via the command line (No problem if you use FOP embedded, see the XML+XSL2PDF example on the site. http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ ExampleXML2PDF.java?rev=HEAD) If you insist on doing it via the command line, there's still the option of using something like this as primary XML: root file href=xml11.xml / file href=xml12.xml / ... /root - and in XSLT do xsl:variable name=merged select=document(/root/file/@href) / ... xsl:apply-templates select=$merged/* xsl:sort select=... / /xsl:apply-templates Greetz, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Invoking the servlet
I am trying to invoke the servlet in the FOP distribution with Tomcat 3.3.2 The error is - simple.fo (The system cannot find the file specified). The URL is - http://localhost:8080/fop/fop?fo=simple.fo; I put the simple.fo file in the following diretory - c:\jakarta-tomcat-3.3.2\webapps\fop\simple.fo. As you can see the system is looking another directory. Does anybody know which is this directory? __ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]