fo:external-graphic problem
Hi All, I am having problem to use image in my web-application fop file. I am using XSLT and XML to generate fo file. But when I am deploying app on my app server. It could not find image file unless I hard code image path. Please help me how to set up path so that fo file dynamically finds image file Thanks in advance -V __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fo:external-graphic problem
On Aug 24, 2004, at 6:08 PM, vivek gupta wrote: Hi All, I am having problem to use image in my web-application fop file. I am using XSLT and XML to generate fo file. But when I am deploying app on my app server. It could not find image file unless I hard code image path. Please help me how to set up path so that fo file dynamically finds image file Thanks in advance -V We're happy to spend time giving a helping hand, but before we spend much time on this, can you tell us: if you've already confirmed you can access it directly (e.g., from a web browser?); you've tried everything graphics image related in the FAQ including[1], and also that the image conforms to the 'pseudo' requirements listed on the FOP Graphics page[2]. If you've done all of this and you're still having problems, please provide important details including Operating System, Java Version and FOP version. Thanks! Web Maestro Clay [1] My graphical images do not work properly. http://xml.apache.org/fop/faq.html#png-fails [2] FOP Graphics Page http://xml.apache.org/fop/graphics.html Clay Leeds - [EMAIL PROTECTED] -- Web Developer - Medata, Inc. - http://www.medata.com/ PGP Public Key: https://mail.medata.com/pgp/cleeds.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Enhancing FOP command line speed
Markus mailto:[EMAIL PROTECTED] wrote on Friday, August 13, 2004 6:19 PM: today i played around with tomcat and fop embedded in a servlet. looks promising. when i solve some small probs it could be a good way to go. the time to generate pdfs is much smaller than with fop on command line. Oh yeah great, i am very interested in your results. -- Mit freundlichem Gru? Sonke Ruempler Technik top concepts Internetmarketing GmbH Am Steinkamp 7 - D-21684 Stade - Germany http://www.topconcepts.deTel. +49 1805 9977 501* mail: [EMAIL PROTECTED]Fax. +49 1805 9977 502* SMS Versand ab 9.9 Cent: http://sms-gw.topconcepts.de Handelsregister: AG Stade HRB 5811 - UstId: DE 213645563 *) EUR 0,12/Min. (CNS24) -- http://www.topconcepts.de/kundenservice/faq/1/ -- http://learn.to/quote - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Different Pages with different content
Hi, i've got a first page, several pages and a last page. First page should have certain data, several pages other data and the last page completely other data. Where/How can i insert a statement like xsl:apply-templates select=last/ in my fo:page-sequence master-reference ... It's hard to explain. Short: I need for every page another content. Thanks Sven - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: external-graphic problem
Title: RE: external-graphic problem I had the same problem before, I passed in image root as a parameter to XSLT page, and add that to the path of images. The limitation is: you have to assume all images are using same root path. Tiffany -Original Message- From: vivek gupta [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 24, 2004 9:08 PM To: [EMAIL PROTECTED] Subject: fo:external-graphic problem Hi All, I am having problem to use image in my web-application fop file. I am using XSLT and XML to generate fo file. But when I am deploying app on my app server. It could not find image file unless I hard code image path. Please help me how to set up path so that fo file dynamically finds image file Thanks in advance -V __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about fo:leader
Getting rid of the white-space before and after the leader did not change the result...the PDF still generates with This is a test department to test wrapping... on the first line and then the phone number on the second line. I've also tried surrounding the dept name and phone number with fo:inline and using keep-with-next.within-line=always and keep-with-previous.within-line=always but could not get that to work. Any more ideas? :) Thanks again for everyone's help! -Robby -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 2:26 PM To: [EMAIL PROTECTED] Subject: Re: Question about fo:leader [repost] Abney, Robby wrote: fo:block text-align-last=justify This is a test department to test wrapping fo:leader leader-pattern=dots/ (123) 457-2342 Ext. 123 /fo:block Ideally...I would like the PDF to display something like the following: This is a test department to test wrapping..(123) 457-2342 Ext. 123 I have attached a PDF document to show how it currently is displayed. Is the attached format a result of FOP's implementation of leader, or is there something I'm missing from the FO snippet? You must get rid of the spaces before and after the leader if you want to avoid line breaks there. Use non-breaking spaces if necessary. fo:block text-align-last=justify This is a test department to test wrappingfo:leader leader-pattern=dots/(123) 457-2342 Ext. 123 /fo:block J.Pietschmann - 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: Different Pages with different content
Thanks a lot! That's it. Sven Chris Bowditch wrote: Sven Waibel wrote: Hi, i've got a first page, several pages and a last page. First page should have certain data, several pages other data and the last page completely other data. Where/How can i insert a statement like xsl:apply-templates select=last/ in my fo:page-sequence master-reference ... The way to achieve this in XSL-FO is to define a page-sequence-master, e.g. fo:page-sequence-master master-name=all fo:repeatable-page-master-alternatives fo:conditional-page-master-reference master-reference=firstmaster page-position=first fo:conditional-page-master-reference master-reference=middlemaster page-position=rest fo:conditional-page-master-reference master-reference=lastmaster page-position=last /fo:repeatable-page-master-alternatives /fo:page-sequence-master then reference the page-sequence-master from the page-sequence, e.g. fo:page-sequence master-reference=all !-- content -- /fo:page-sequence snip/ The only problem is that in FOP, page-position=last has not been implemented! Depending on what differences you need, you can work around this to a limited extent using fo:marker. Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- ** * Sven Waibel imbus AG * * Tel: 09131/7518-36Kleinseebacher Str.9 * * Fax: 09131/7518-5091096 Möhrendorf * * EMail: [EMAIL PROTECTED]WWW: http://www.imbus.de * ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Different Pages with different content
I'm running FOP as an embedded service. What kind of statistics can I get back from FOP after it has completed formatting? For example, can I get: -- page count -- line count -- byte count -- total formatting time -- if an error occurred, can I get how many pages successfully formatted before the error? -- estimated percentage complete while it is in the middle of a large formatting job? -- any other data? Is there a result structure that gets populated and returned when formatting occurs, such that I can get statistics back through that structure? I've found a lot of examples setting up FOP and running it, but I haven't seen anything that captures statistics after the formatting is complete. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about fo:leader
Hi, so it works, but i don't know if it is what you want. fo:block This is a test department to test /fo:block fo:block text-align-last=justify wrapping fo:leader leader-pattern=dots/ (123) 457-2342 Ext. 123 /fo:block Sven Abney, Robby wrote: Getting rid of the white-space before and after the leader did not change the result...the PDF still generates with This is a test department to test wrapping... on the first line and then the phone number on the second line. I've also tried surrounding the dept name and phone number with fo:inline and using keep-with-next.within-line=always and keep-with-previous.within-line=always but could not get that to work. Any more ideas? :) Thanks again for everyone's help! -Robby -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 2:26 PM To: [EMAIL PROTECTED] Subject: Re: Question about fo:leader [repost] Abney, Robby wrote: fo:block text-align-last=justify This is a test department to test wrapping fo:leader leader-pattern=dots/ (123) 457-2342 Ext. 123 /fo:block Ideally...I would like the PDF to display something like the following: This is a test department to test wrapping..(123) 457-2342 Ext. 123 I have attached a PDF document to show how it currently is displayed. Is the attached format a result of FOP's implementation of leader, or is there something I'm missing from the FO snippet? You must get rid of the spaces before and after the leader if you want to avoid line breaks there. Use non-breaking spaces if necessary. fo:block text-align-last=justify This is a test department to test wrappingfo:leader leader-pattern=dots/(123) 457-2342 Ext. 123 /fo:block J.Pietschmann - 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] -- ** * Sven Waibel imbus AG * * Tel: 09131/7518-36Kleinseebacher Str.9 * * Fax: 09131/7518-5091096 Möhrendorf * * EMail: [EMAIL PROTECTED]WWW: http://www.imbus.de * ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about fo:leader
Hey. Unfortunately, I'm not able to determine the length of the department names, so I'm not sure how to use multiple blocks as in the fo block below. I need a way to handle cases such as the following: Short dept..(111) 111- Ext. 111 Short Phone..(111) 111- A very long department name that could require Wrapping(111) 111- Ext. 111 Dept name requiring wrapping(111) 111- Ext. 111 Note that in the Dept name requiring wrapping case, wrapping would have to go to the next line so that the dots would show instead of the following: Dept name requiring wrapping(111) 111- Ext. 111 Does this make sense? The FO document is being generated using an XSL Transform, so I'm pulling the dept name and phone number data from an XML document. I left this out to begin with since I just wanted to get the simplest example that I could out there, but the above is what I truly need. Thanks for all help! -Robby -Original Message- From: Sven Waibel [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 8:26 AM To: [EMAIL PROTECTED] Subject: Re: Question about fo:leader Hi, so it works, but i don't know if it is what you want. fo:block This is a test department to test /fo:block fo:block text-align-last=justify wrapping fo:leader leader-pattern=dots/ (123) 457-2342 Ext. 123 /fo:block Sven Abney, Robby wrote: Getting rid of the white-space before and after the leader did not change the result...the PDF still generates with This is a test department to test wrapping... on the first line and then the phone number on the second line. I've also tried surrounding the dept name and phone number with fo:inline and using keep-with-next.within-line=always and keep-with-previous.within-line=always but could not get that to work. Any more ideas? :) Thanks again for everyone's help! -Robby - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP Output Statistics (was Re: Different Pages with different content)
Douglas, NOTE: I've changed the Subject. On Aug 25, 2004, at 6:25 AM, Oosterbaan, Douglas S. (LNG-DAY) wrote: I'm running FOP as an embedded service. What kind of statistics can I get back from FOP after it has completed formatting? For example, can I get: -- page count -- line count -- byte count -- total formatting time -- if an error occurred, can I get how many pages successfully formatted before the error? -- estimated percentage complete while it is in the middle of a large formatting job? -- any other data? Is there a result structure that gets populated and returned when formatting occurs, such that I can get statistics back through that structure? There is not one that I am aware of (I don't do embedded work ATM, although some in my company are doing some of that). I would suspect, that the logging tools being used may output some of this information. Barring that, I do know that FOP outputs some of this information by default (e.g., [INFO] [1], [INFO] [2], which indicate pages output). When DEBUG mode is used (-d from Command Line Interface) the number of pages in the last sequence (e.g., [DEBUG] Last page-sequence produced 2 pages.). You could enable logging, and then have your program go through the log and parse this information. Here's some sample output for generating a PDF ffile, which has one 'flowing' page-master, and a second page-master which shows up at the end (last): [INFO] setting up fonts [INFO] [1] [WARNING] Sum of fixed column widths 513070 greater than maximum specified IPD 510236 [INFO] [2] [DEBUG] Last page-sequence produced 2 pages. [INFO] [3] [DEBUG] Last page-sequence produced 1 pages. [INFO] Parsing of document complete, stopping renderer [DEBUG] Initial heap size: 4496Kb [DEBUG] Current heap size: 8874Kb [DEBUG] Total memory used: 4377Kb [DEBUG] Memory use is indicative; no GC was performed [DEBUG] These figures should not be used comparatively [DEBUG] Total time used: 10110ms [DEBUG] Pages rendered: 3 [DEBUG] Avg render time: 3370ms/page I've found a lot of examples setting up FOP and running it, but I haven't seen anything that captures statistics after the formatting is complete. Thanks. If you do come up with something, please post it back to the list so others may benefit. Web Maestro Clay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP Output Statistics (was Re: Different Pages with different content)
On 25.08.2004 16:56:08 Clay Leeds wrote: There is not one that I am aware of Well, there is one little mechanism to fetch the number of pages and page-sequences and the number of pages per page-sequence. See here: http://xml.apache.org/fop/embedding.html#render-info On Aug 25, 2004, at 6:25 AM, Oosterbaan, Douglas S. (LNG-DAY) wrote: I'm running FOP as an embedded service. What kind of statistics can I get back from FOP after it has completed formatting? For example, can I get: -- page count See above -- line count Difficult, no. -- byte count You can do that yourself: http://jakarta.apache.org/commons/io/apidocs/org/apache/commons/io/output/CountingOutputStream.html Or do you mean character count? -- total formatting time You can also measure that yourself easily. -- if an error occurred, can I get how many pages successfully formatted before the error? By observing the logger. -- estimated percentage complete while it is in the middle of a large formatting job? Difficult. There are several factors that prohibit a reliable indication. -- any other data? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP Output Statistics (was Re: Different Pages with different content)
Thanks. You're right that some of this can be obtained outside of FOP, I just wanted to make sure I wasn't regenerating statistics that were already available. Thanks, again. -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 25, 2004 2:11 PM To: [EMAIL PROTECTED] Subject: Re: FOP Output Statistics (was Re: Different Pages with different content) On 25.08.2004 16:56:08 Clay Leeds wrote: There is not one that I am aware of Well, there is one little mechanism to fetch the number of pages and page-sequences and the number of pages per page-sequence. See here: http://xml.apache.org/fop/embedding.html#render-info On Aug 25, 2004, at 6:25 AM, Oosterbaan, Douglas S. (LNG-DAY) wrote: I'm running FOP as an embedded service. What kind of statistics can I get back from FOP after it has completed formatting? For example, can I get: -- page count See above -- line count Difficult, no. -- byte count You can do that yourself: http://jakarta.apache.org/commons/io/apidocs/org/apache/commons/io/output/Co untingOutputStream.html Or do you mean character count? -- total formatting time You can also measure that yourself easily. -- if an error occurred, can I get how many pages successfully formatted before the error? By observing the logger. -- estimated percentage complete while it is in the middle of a large formatting job? Difficult. There are several factors that prohibit a reliable indication. -- any other data? Jeremias Maerki - 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: problem with Image loading with Servlet
hi thanks for your reply. url is perfect. and i m able to download the image from this url.also this servlet works fine with html. bcoz i m using the same url in xsl to get the html. and i can get the image in html. server is not showing any message. even i cant see any error in log file. heli. --- J.Pietschmann [EMAIL PROTECTED] wrote: heli desai wrote: Can anyone help me? I m trying to load the image (jpeg) in pdf using dynamic url of servlet.But somehow FOP ignores the URL. It doesn't show any url. I m using fo:external-graphics src=http://localhost:7001/crisp/servlet/BinaryServlet/QueryId=55100amp;SequenceNo=1amp;MimeType=jpeg There can be any number of reasons for this, the most likely ones involve problems retrieving the content due to spelling errors in the URL, access restrictions or server misconfigurations. 1. If you point a browser to the URL, is the expected image shown? 2. If you download content from the URL into a file using a command line utility like wget, does the file contain the expected image? Wget will also show you the MIME type it got from the server, which should be image/jpeg. 3. Have a look into the server logs. Are there any problems mentioned for the access to the URL? 4. Does your servlet container expect the user agent to set a cookie? 5. Did you set up any access restrictions? 6. Is the servlet sensitive to the user agent or other HTTP headers? J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about fo:leader
Abney, Robby wrote: Getting rid of the white-space before and after the leader did not change the result...the PDF still generates with This is a test department to test wrapping... on the first line and then the phone number on the second line. Hm, the problem is that FOP assumes it can break the line after the leader, and that keeps are not implemented for inline FOs. You can try varying the minimal leader length, but I suspect FOP will also break the line before the leader. The most robust solution appears to insert a line break by yourself if the department name length sans the last word exceeds a certain length. There are numerous examples for how to do this in XSLT available in the XSLT FAQ. I've also tried surrounding the dept name and phone number with fo:inline and using keep-with-next.within-line=always and keep-with-previous.within-line=always but could not get that to work. No surprise here. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Graphics in fo:region-end
BACKGROUND I am creating a medical form and have 3 sections in my document. On the right side of each section, there is a string of text, rotated 90-degrees explaining what that section contains. This would be a nice excuse to use SVG if not for two reasons: 1) SVG text is rendering poorly in my FOP output (Jaggies, which could be font-related, though--I haven't had much need for SVG text yet); 2) more importantly, Batik doesn't play nicely headless system, and this project has the potential to run on a headless server. Since SVG isn't working out, I decided to use Graphics, and herein lies the problem. PROBLEM I have 3 graphics (each 35px wide w/ rotated red text w/ white margins) in an fo:region-end and I have a strange problem: the TOP graphic renders at slightly larger than the correct size; the MIDDLE graphic renders correctly; the BOTTOM graphic renders smaller than the correct size. I've tried using every combination imaginable of width/height, content-width/content-height, both ON, OFF, width + content-width, etc. and nothing works. There isn't a problem with HEIGHT, because there is ample space on either side of each image. I was finally able to work around the problem by futzing with the width of each image so the TOP is now 53x260 wide, MIDDLE is 36x1181, BOTTOM is 32x1360. ENVIRONMENT - fop-0.20.5 - Java 1.4.2 - WinXP I am actually satisfied with the workaround, but I wanted to report it and wondered if anyone has an idea about why this is occurring? Clay Leeds - [EMAIL PROTECTED] -- Web Developer - Medata, Inc. - http://www.medata.com/ PGP Public Key: https://mail.medata.com/pgp/cleeds.asc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]