Re: A SVG image to appear on every page in fo:region-body area
Many thanks, it's fun now regards, Debasish On 8/29/07, Pascal Sancho <[EMAIL PROTECTED]> wrote: > > Well, try this and you can replace texts like "background in region xxx" > with any image. > > You just need to tune left, top, width, and height properties of the > fo:block-container. > > Enjoy! > > Pascal > > > > http://www.w3.org/1999/XSL/Format"; xmlns:set=" > http://exslt.org/sets"; xmlns:xdt=" http://www.w3.org/2005/xpath-datatypes"; > xmlns:fn="http://www.w3.org/2005/02/xpath-functions"; > xmlns:xs="http://www.w3.org/2001/XMLSchema > "> > > master-name="document"> > > > > > > > > > > > left="10mm" top="40mm" width="100mm" height="100mm" >border="solid #ff 1pt"> >background in region before > > region-before > > > > left="20mm" top="-217mm" width="100mm" height="100mm" >border="solid #00ff00 1pt"> >background in region after > > region-after > > > > > left="60mm" top="60mm" width="100mm" height="100mm" >border="solid #ff 1pt"> >background in region start > > region-start > > > > left="-110mm" top="70mm" width="100mm" height="100mm" >border="solid #ff00ff 1pt"> >background in region end > > region-end > > > > height="100%" >color="#00"> >region-body > > height="100%" >color="#00" display-align="after"> >region-body > > height="100%" >color="#00" text-align="end"> >region-body > > height="100%" >color="#00" text-align="end" display-align="after"> >region-body > > > > > > > > -Message d'origine- > > De : Debasish Jana [mailto:[EMAIL PROTECTED] > > Envoyé : mercredi 29 août 2007 11:03 > > > > Hi Pascal: > > > > Many thanks. I tried to add a block-container with > > fo:instream-forein-object to take up the SVG directly > > embedded inside the body. However, in order to have the image > > appear on every page, I need to define it within a static > > content. But, xsl-region-body is appearing within fo:flow and > > I cannot put xsl-region-body both as a static content as well > > as fo:flow within fo:page-sequence. My requirement is to > > embed the image that appears on every page of the body span. > > Please throw some more light. Thanks again in advance, > > > > warm regards, > > > > Debasish Jana > > > > On 8/29/07, Pascal Sancho <[EMAIL PROTECTED]> wrote: > > > > Hi DJ, > > > > In order to use any image as page background (either > > with fo:external-graphic or fo:instream-foreign-object), you > > can insert it directly in a static region, using a > > block-container in absolute position. > > > > With FOP 0.9x, the body region is drawn at the top > > level, therefore static-regions can be used as background for > > body region. > > > > By setting your background in the start-region, the > > (0,0) is the top left corner of your sheet, minus > > fo:simple-page-master margins. > > > > In other regions, you can use negative coordinates to > > put your image else where, depending on extent properties. > > > > HTH, > > > > Pascal > > > > > -Message d'origine- > > > De : Debasish Jana [mailto: [EMAIL PROTECTED] ] > > > Envoyé : mercredi 29 août 2007 10:03 > > > > > > Hi: > > > > > > I need to put a SVG image to appear on every page in > > > region-body. I would like to create the SVG in the same xsl > > > file and use it as background image within region-body so as > > > to appear on every page. Placing the SVG as an external file > > > works. However, putting the SVG as embedded content does not > > > work. The XSL code us
Re: A SVG image to appear on every page in fo:region-body area
Hi Pascal: Many thanks. I tried to add a block-container with fo:instream-forein-object to take up the SVG directly embedded inside the body. However, in order to have the image appear on every page, I need to define it within a static content. But, xsl-region-body is appearing within fo:flow and I cannot put xsl-region-body both as a static content as well as fo:flow within fo:page-sequence. My requirement is to embed the image that appears on every page of the body span. Please throw some more light. Thanks again in advance, warm regards, Debasish Jana On 8/29/07, Pascal Sancho <[EMAIL PROTECTED]> wrote: > > Hi DJ, > > In order to use any image as page background (either with > fo:external-graphic or fo:instream-foreign-object), you can insert it > directly in a static region, using a block-container in absolute position. > > With FOP 0.9x, the body region is drawn at the top level, therefore > static-regions can be used as background for body region. > > By setting your background in the start-region, the (0,0) is the top left > corner of your sheet, minus fo:simple-page-master margins. > > In other regions, you can use negative coordinates to put your image else > where, depending on extent properties. > > HTH, > > Pascal > > > -Message d'origine- > > De : Debasish Jana [mailto:[EMAIL PROTECTED] > > Envoyé : mercredi 29 août 2007 10:03 > > > > Hi: > > > > I need to put a SVG image to appear on every page in > > region-body. I would like to create the SVG in the same xsl > > file and use it as background image within region-body so as > > to appear on every page. Placing the SVG as an external file > > works. However, putting the SVG as embedded content does not > > work. The XSL code used is given below > > > > Please help. > > > > warm regards, > > > > Debasish Jana > > - > > > > Case I (When SVG file is used as external file, this works) > > > > > version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform "> > > > > > > url(E:\DJANA\Test\PageBG.svg) > > > > > > http://www.w3.org/1999/XSL/Format";> > > > > > page-height="11in" page-width="8.5in" > > margin-top="0in" margin-left="0.0in" > > margin-right="0.0in" margin-bottom="0.0in" > > white-space-collapse="false" > > white-space-treatment="preserve" > > linefeed-treatment="preserve" line-height="82%" > > > > > > background-color="#dd" > > > > name="background-image"> > name="PageBG"/> > > > > . > > > > Case II (When SVG content is directly embeded in the xsl > > file, this does not work, says background iamge not available) > > > > > > > version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform "> > > > > > > http://www.w3.org/2000/svg"; id="PageBGSVG" > > width="7.7in" height="10.2in" viewBox="0 0 0 0"> . > > > > > > > > http://www.w3.org/1999/XSL/Format";> > > > > > page-height="11in" page-width="8.5in" > > margin-top="0in" margin-left="0.0in" > > margin-right="0.0in" margin-bottom="0.0in" > > white-space-collapse="false" > > white-space-treatment="preserve" > > linefeed-treatment="preserve" line-height="82%" > > > > > > background-color="#dd" > > > > name="background-image"> > name="PageBG"/> > > > > . > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
A SVG image to appear on every page in fo:region-body area
Hi: I need to put a SVG image to appear on every page in region-body. I would like to create the SVG in the same xsl file and use it as background image within region-body so as to appear on every page. Placing the SVG as an external file works. However, putting the SVG as embedded content does not work. The XSL code used is given below Please help. warm regards, Debasish Jana - Case I (When SVG file is used as external file, this works) http://www.w3.org/1999/XSL/Transform";> url(E:\DJANA\Test\PageBG.svg) http://www.w3.org/1999/XSL/Format";> . Case II (When SVG content is directly embeded in the xsl file, this does not work, says background iamge not available) http://www.w3.org/1999/XSL/Transform";> http://www.w3.org/2000/svg"; id="PageBGSVG" width="7.7in" height="10.2in" viewBox="0 0 0 0"> . http://www.w3.org/1999/XSL/Format";> .
FOP Transformation generating PermGen error [OutOfMemory] on Oracle 10G server
Hi: While issuing a PDF generation from a XSL and XML pair on Oracle 10G server, we are getting PermGen error [OutOfMemory]. Same code works Ok on Tomcat as well as Sun App server. Can anybody throw some light what could be the workaround? Need help. Our XSL transformation code (writeReport method that takes three parameters: names for xml data file, XSL file and PDF file) is as given below. warm regards, Debasish Jana - public boolean writeReport (String xmlFile, String xsltFile, String pdfFile) { try { OutputStream out = new FileOutputStream (pdfFile); out = new java.io.BufferedOutputStream (out); try { FopFactory fopFactory = FopFactory.newInstance (); FOUserAgent foUserAgent = fopFactory.newFOUserAgent (); // Construct fop with desired output format Fop fop = fopFactory.newFop (MimeConstants.MIME_PDF, foUserAgent, out); // Setup XSLT System.setProperty ("javax.xml.transform.TransformerFactory", "org.apache.xalan.processor.TransformerFactoryImpl") ; TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer (new StreamSource (new File (xsltFile))) ; // Set the value of a in the stylesheet transformer.setParameter ("versionParam", "2.0"); // Setup input for XSLT transformation Source src = new StreamSource (new File (xmlFile)) ; // Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult (fop.getDefaultHandler ()); // Start XSLT transformation and FOP processing transformer.transform (src, res); } catch (Exception e) { return (false) ; } catch (Error e) { return (false) ; } finally { out.close (); } } catch (Exception e) { return (false) ; } return (true) ; }
SVG Gradient in FO
Hi: I am trying to use liner gradient effect in fo:body area as the following code. The problem is that the linear gradient efefct with two colors is not filling the entire body area within the page. Am I doing anything wrong? Any clue? Can you refer to some samples using linear gradient with multiple colors that fills up the entire page (including header, footer, left, right, body) as background? I would like to embed the svg as a instream-foreign-object and do not want to use an external svg file. Appreciate your help. warm regards, Debasish Jana http://www.w3.org/2000/svg"; viewBox="0 0 0 0"> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Watermark is not coming on all pages
Hi: Need some help related to watermark to appear on all pages, currently, I'm able to make it appear only on the first page. The relevant xsl:fo tags follow. I have used a for forced page break, but after the forced page break, the watermark does not appear on page2, it appears on page 1 though. Appreciation in advance. warm regards, Debasish -- http://www.w3.org/2000/svg"; width="210mm" height="297mm" viewBox="0 0 200 200" preserveAspectRatio="none"> WaterMark . . . . . . . . . and then I have other fo tags like fo:table
HTML Rendering
Hi: Is it possible to render to HTML from XSL:fo documents? I guess, the current supported rendering formats are PDF, RTF, TXT, and several image variants. Please throw some light. Regards, Debasish Jana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP Rendering Output Support for PPT
Hello: Is MS-Powerpoint (PPT) as an output rendering option available? I guess not, in that case, is there any plan to support such an output format in near future? Would you pleas highlight your thoughts? Regards, Debasish Jana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP 0.92 : OutOfMemoryError
Hi: Many thanks, Andreas. Some further questions. Possibly that's why, I see that memory is not being released to the same level since when the rendering was started. Is there any API that can force memory cleanup after the rendering is done - success or failure? I removed all forward references, and my page-sequence handles very few pages now, even then I face OutOfMemoryError, wondering what needs to be done to get it through with high volume of data. Now, I have no forward page-citations, no image, just a flat table with huge number of rows, but I split that to multiple page-sequences Here's the fo sample (I have cut it short to let you feel the usage, in case I am doing wrong)... Also, where from I can get the latest FOP jar (binary) replacing my fop-0.92b.jar which I use now. Regards, Debasish Jana - http://www.w3.org/1999/XSL/Format"; xmlns:repro="http://www.anshinsoft.com/fop/extensions";> 1559 Repeat of to for a number of times, say 50 15797 Repeat of to for a number of times, say 50 ... and so on ... and finally - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.92 : OutOfMemoryError
Hi: I know it's a old issue and there are many postings in this regard. Still, some more light is required, that led to this question. We are using FOP 0.92 for converting a XSL:FO document to PDF/RTF etc. Since there is a table with many rows with data coming from a huge db table, it is causing OutOfMemoryError. We split up the document with single fo:root but multiple page-sequences with each page-sequence having a finite number of fo components, still we come up with OutOfMemoryError, and also, after the OutOfMemoryError comes, the amount of free memory does not move up to the level where the transformation is started. Our approach is in line of the documented standards: i.e. import org.apache.fop.apps.FopFactory; import org.apache.fop.apps.Fop; import org.apache.fop.apps.MimeConstants; /*..*/ // Step 1: Construct a FopFactory // (reuse if you plan to render multiple documents!) FopFactory fopFactory = FopFactory.newInstance(); // Step 2: Set up output stream. // Note: Using BufferedOutputStream for performance reasons (helpful with FileOutputStreams). OutputStream out = new BufferedOutputStream(new FileOutputStream(new File("C:/Temp/myfile.pdf"))); try { // Step 3: Construct fop with desired output format Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out); // Step 4: Setup JAXP using identity transformer TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(); // identity transformer // Step 5: Setup input and output for XSLT transformation // Setup input stream Source src = new StreamSource(new File("C:/Temp/myfile.fo")); // Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); // Step 6: Start XSLT transformation and FOP processing transformer.transform(src, res); } finally { //Clean-up out.close(); } After we hit out.close, does it cleanup all used up resources or should we do something extra to cleanup? Also, is there any guideline that how many page-sequences a document can have and also within one page-sequence how much (how do we know how much) so as to handle large volume? I know it depends on the amount of free memory at the time of spawning this transform request, but still, a guildeline would help so that I can split into page-sequences accordingly. Also, is it always true that a new page-sequence starts with a new page break as well? Or can we continue in the same page just like a logical page break kind of. Please help. Regards, Debasish Jana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help required for margin in simple-page-master and padding in Start
Hi Jeremias: Also, when I put the following as the header FOP complains with the following : SEVERE: javax.xml.transform.TransformerException: Border and padding for region "Header" must be '0' (See 6.4.13 in XSL 1.0). javax.xml.transform.TransformerException: org.apache.fop.fo.expr.PropertyException: Border and padding for region "Header" must be '0' (See 6.4.13 in XSL 1.0). at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:167) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:114) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:119) What is exactly meant by " Border and padding for region "Header" must be '0'"? Can you please help? Regards, Debasish -Original Message- From: Debasish Jana [mailto:[EMAIL PROTECTED] Sent: Friday, August 18, 2006 10:49 AM To: fop-users@xmlgraphics.apache.org Subject: RE: Help required for margin in simple-page-master and padding in Start Many thanks, Jeremias. If we don't use block-container, how can we supply the padding parameters? Can we supply that in the region too? Regards, Debasish -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Friday, August 18, 2006 1:58 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Help required for margin in simple-page-master and padding in Start Two problems: - You don't specify the extent property for Header and LeftSide. - You use fixed positioned block-containers which actually makes FOP ignore the whole region setup, because fixed positions block-containers are absolutely positioned relatively to the upper left corner of the page. So, remove the block-containers. If you need a background-color I'd first try to set it on fo:region-start before playing with block-containers. On 17.08.2006 12:01:30 Debasish Jana wrote: > Hi: > > I am facing a problem with margin and padding. > > The associated xsl-fo file is enclosed below. > > I have a section (simple-page-master) that has margins on all four sides as > 10.0pt. The section's start (flow name = LeftSide) has left-padding as 10.0 > pt and top-padding as 10.0 pt. The start part has a child component as a > text showing HELLO. With the padding on for start, the text is appearing ok, > but the section is not showing the margin gap in generated PDF. > > I am using FOP 0.92 > > Please help. > > Regards, > > Debasish Jana Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: border-collapse="collapse"
Thanks, Chris. Is there any workaround to solve the problem? One solution could be to distribute the border-width parameters in adjacent cells, where adjacency is with column margin or row margin? Any other workaround? Regards, Debasish -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] Sent: Thursday, August 17, 2006 6:21 PM To: fop-users@xmlgraphics.apache.org Subject: Re: border-collapse="collapse" Debasish Jana wrote: > Quick question: > > Does FOP 0.92 support border-collapse="collapse" for fo:table? > I need to collapse adjacent cell borders to one Quick Answer: No, sorry! Chris - 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: Help required for margin in simple-page-master and padding in Start
Many thanks, Jeremias. If we don't use block-container, how can we supply the padding parameters? Can we supply that in the region too? Regards, Debasish -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Friday, August 18, 2006 1:58 AM To: fop-users@xmlgraphics.apache.org Subject: Re: Help required for margin in simple-page-master and padding in Start Two problems: - You don't specify the extent property for Header and LeftSide. - You use fixed positioned block-containers which actually makes FOP ignore the whole region setup, because fixed positions block-containers are absolutely positioned relatively to the upper left corner of the page. So, remove the block-containers. If you need a background-color I'd first try to set it on fo:region-start before playing with block-containers. On 17.08.2006 12:01:30 Debasish Jana wrote: > Hi: > > I am facing a problem with margin and padding. > > The associated xsl-fo file is enclosed below. > > I have a section (simple-page-master) that has margins on all four sides as > 10.0pt. The section's start (flow name = LeftSide) has left-padding as 10.0 > pt and top-padding as 10.0 pt. The start part has a child component as a > text showing HELLO. With the padding on for start, the text is appearing ok, > but the section is not showing the margin gap in generated PDF. > > I am using FOP 0.92 > > Please help. > > Regards, > > Debasish Jana Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
border-collapse="collapse"
Quick question: Does FOP 0.92 support border-collapse="collapse" for fo:table? I need to collapse adjacent cell borders to one Regards, Debasish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help required for margin in simple-page-master and padding in Start
Hi: I am facing a problem with margin and padding. The associated xsl-fo file is enclosed below. I have a section (simple-page-master) that has margins on all four sides as 10.0pt. The section's start (flow name = LeftSide) has left-padding as 10.0 pt and top-padding as 10.0 pt. The start part has a child component as a text showing HELLO. With the padding on for start, the text is appearing ok, but the section is not showing the margin gap in generated PDF. I am using FOP 0.92 Please help. Regards, Debasish Jana --- http://www.w3.org/1999/XSL/Format"; xmlns:repro="http://www.anshinsoft.com/fop/extensions";> HELLO -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
a page layout sample needed
Hi: I was trying to design a document having a simple page layout having Header, footer, start, end, and body. The fo:simple-page-master (i.e. the section) has margin on all four sides as 10pt (no border, no padding). Each of the header, footer, start and end has all four margins as 10pt, all four border width as 8pt, and all four padding as 15pt. Body has no margin, border as well as padding. We specify the following for the Header block I am confused about the computation of the top and left for the footer, start (left section) and end (right section). >From FOP 0.92 point of view, for header, footer, start and end, a (0,0) co-odinates means which point? Suppose, we have margin, border, padding as specified above? Also, I presume, the width and height need to be the net one, without considering the padding. Am I assuming correct? If possible, could you please let me know the some reading material that explains the geometry, and also a sample Xsl:fo as well as PDF. Please guide. Regards, Debasish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
a page layout sample needed
Hi: I was trying to design a document having a simple page layout having Header, footer, start, end, and body. The fo:simple-page-master (i.e. the section) has margin on all four sides as 10pt (no border, no padding). Each of the header, footer, start and end has all four margins as 10pt, all four border width as 8pt, and all four padding as 15pt. Body has no margin, border as well as padding. We specify the following for the Header block I am confused about the computation of the top and left for the footer, start (left section) and end (right section). >From FOP 0.92 point of view, for header, footer, start and end, a (0,0) co-odinates means which point? Suppose, we have margin, border, padding as specified above? Also, I presume, the width and height need to be the net one, without considering the padding. Am I assuming correct? If possible, could you please let me know the some reading material that explains the geometry, and also a sample Xsl:fo as well as PDF. Please guide. Regards, Debasish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
simple-page-maseter
Hi: I was trying to design a document having three different fo:simple-page-master, one for the cover, one for the left side page, and one for the right side page. The cover simple-page-master should have a margin as well as border surrounding the header, footer etc., i.e. I want a section border kind of, or you can say, a page border of some thickness (uniform on all four sides or may be non-uniform). Can I have top-border-width, top-border-color etc. set up within the ? Please guide. Regards, Debasish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP 0.92 Beta : fo:table under fo:table-cell
Hi Jeremias: Many thanks. We had explore the situation, however, still facing some problem when column span is present in a table cell. Without column span, the situation looks ok. But when we put column span in a cell, we see overlapping borders. Are we doing any mistake somewhere? Please help. The sample fo file is given below. Regards, Debasish - http://www.w3.org/1999/XSL/Format"; xmlns:repro="http://www.anshinsoft.com/fop/extensions";> text11 text12 text13 text14 text21 -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 12:54 PM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP 0.92 Beta : fo:table under fo:table-cell Well, you just have to use consistent widths. You use different widths all over the place so it's no surprise the line don't end up in the right place. Once you use 3*184pt (=552pt) but then you use 550pt and 548pt in other places. You need to be aware that the borders on the start and end sides (left/right in lr-tb writing mode) are defined to lie outside the content rectangle [1] and that width properties usually specify the width of the content rectangle, not the allocation rectangle. Furthermore, there's no point in specifying width on a table-cell when the column widths are already specified through table-column elements. Finally, I'd have a closer eye to FOP's log output, i.e. add width properties to fo:table elements and fix those height properties all over the place. I'd work less with nested tables and more with cell spanning. That will also make your FO much more readable and it will be easier to deal with the borders. [1] http://www.w3.org/TR/xsl11/#area-geo On 18.07.2006 07:51:29 Debasish Jana wrote: > Hi: > > Many thanks for your prompt reply. > A sample xsl-fo file is given below. > > The problem we see is as follows: > > If we render this fo to PDF, the output shows, the tables with borders > unaligned on the right side. Ideally, we would love to have the borders of > the nested table falling on one another so that it looks nice. > > Any clue, please? > > Thanking you in anticipation, Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP 0.92 Beta : fo:table under fo:table-cell
Hi: Many thanks for your prompt reply. A sample xsl-fo file is given below. The problem we see is as follows: If we render this fo to PDF, the output shows, the tables with borders unaligned on the right side. Ideally, we would love to have the borders of the nested table falling on one another so that it looks nice. Any clue, please? Thanking you in anticipation, Warm regards, Debasish Jana --- http://www.w3.org/1999/XSL/Format"; xmlns:repro="http://www.anshinsoft.com/fop/extensions";> IN MA KIMA 1 100 KIMA 16 5 MUMBAI 14 84 MUMBAI 44 44 ST C1 10 54 C1 26 57 C2 61 82 C3 68 22 WB DUMDUM 1 2 DUMDUM 14 47 KOLKATA 1 2 KOLKATA 11 22 --- -Original Message- From: Manuel Mall [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 7:43 PM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP 0.92 Beta : fo:table under fo:table-cell On Monday 17 July 2006 21:57, Debasish Jana wrote: > Hi: > > I am creating a fo:table under a fo:block which is under a > fo:table-cell. The first table has one column, one row, of width > 200pt, having table borders of width 2pt on all four sides. The > second table (child) is supposed to fill up or take up the entire > area available, i.e. width 196pt and starting at relative-position of > (2,2) from top-left corner of first table. > > I am getting it, but the alignment of the tables are not coming > correct. The border of second and first tables are getting aligned > together resulting in a feeling of double line border on the right. > > Any clue? > Can you post a short sample fo file demonstrating the behaviour you describe please. > Regards, > > Debasish > Manuel = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.92 Beta : fo:table under fo:table-cell
Hi: I am creating a fo:table under a fo:block which is under a fo:table-cell. The first table has one column, one row, of width 200pt, having table borders of width 2pt on all four sides. The second table (child) is supposed to fill up or take up the entire area available, i.e. width 196pt and starting at relative-position of (2,2) from top-left corner of first table. I am getting it, but the alignment of the tables are not coming correct. The border of second and first tables are getting aligned together resulting in a feeling of double line border on the right. Any clue? Regards, Debasish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.92 : Table-header repeat across pages with a clue
Hi: I have a fo:table spanning across multiple pages. The fo:table-header is by default repeatable, so it appears in every page where the table is spanning through. However, I want the first table header (appearing on the first page) as normal header text, and with subsequent pages, where the table header is being repeated because of a logical page break, can I add a word, say "Continued.." with the header text. Basically, I am looking for a mechanism where the fo:table-header will show "Continued.." for second, third page for the table spanning through multiple pages, but not on the first page. Any clue? Thanking you in advance, Regards, Debasish Jana - 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 0.92 : PDFTextPainter disabling
Hi: We want to disable the PDFTextPainter. To do that, we have used http://www.w3.org/2000/svg";> true ...as a direct child of the "renderer" element for the PDF renderer in the configuration file. But, it seems to be not working. Any clue? Thanking you in advance, Regards, Debasish Jana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TTF and OTF fonts in FOP 0.92
Hi: Many thanks for your prompt reply. We have another observation. If we embed a TTF font while rendering PDF through FOP, and if don't embed the TTF font, there is a difference noticed. If the PDF reader takes up font from installed fonts (in case desired font is not embedded), the font looks better (and different) than the case when the font is embedded. Our question is whether during rendering embedding is causing this difference. What could be a workaround in case we want embedding of the desired font looking like exactly same when picked up from installed fonts (unembedded case). Thanking you in advance, Regards, Debasish Jana -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2006 3:36 AM To: fop-users@xmlgraphics.apache.org Subject: Re: TTF and OTF fonts in FOP 0.92 Debasish Jana wrote: > While rendering fonts (TTF) from XSl-fo to PDF, the fonts are not shown as > smooth as it should be. ... > After seeing it in Acrobat Reader, by making smooth text option off, the > texts look much better. Is this "smooth text" option an option in Acrobat Reader? If so, that's not a problem with FOP but rather with the combination of the font, your display and/or the graphics driver, and perhaps Acrobat Reader itself. > It seems somehow the smoothening of the characters in the specified font is > not happening properly. Well, I used to associate "smoothing" for fonts with "anti-aliasing". This is known to give bad results under for some fonts on mainstream computer displays and certain other circumstances. A font with "Condensed" in its name is a candidate for such a situation, for reasons given further down. The print-out should be ok, because printers generally have a much higher resolution than computer displays. > What could be the reason? Are we missing something in setting up the > configurations? I don't think there is anything FOP can do in this situation. If you want good results on a computer display, use a font which has a stroke width of at least one display pixel for mainstream displays (a 19" at 1280x1024 has ~84dpi) for common font sizes (12pt). The letters should mainly use exactly horizontal and vertical strokes. Thin, slightly slanted lines fare horrible if anti-aliasing is enabled. > Another question, is FOP 0.92 using SVG to render fonts in PDF? That's a strange question. Why do you ask this? And no, FOP doesn't render fonts in regular FO content at all; rather, the glyph definitions are embedded (for user fonts) into the PDF. Rendering is done by the PDF viewer, which usually delegates the job to the graphics system on the host machine. > Also, how do I incorporate OTF? OTF is an enhancement of the TTF format. You can try to handle it exactly like a TTF, i.e. generating a metrics file using TTFFile etc. If you get an error (likely), the answer is "no chance, pal". Note that not getting an error while generating a metrics file doesn't necessarily mean all is well. Some font editors are said to be able to downgrade OTF fonts to TTF automatically with reasonably good results, you might want to ask on an appropriate forum. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TTF and OTF fonts in FOP 0.92
Hi: While rendering fonts (TTF) from XSl-fo to PDF, the fonts are not shown as smooth as it should be. The font I am using is a TTF font named "Univers LT 57 Condensed". The corresponding entry in the FOP configuration file is as follows: After seeing it in Acrobat Reader, by making smooth text option off, the texts look much better. It seems somehow the smoothening of the characters in the specified font is not happening properly. What could be the reason? Are we missing something in setting up the configurations? Another question, is FOP 0.92 using SVG to render fonts in PDF? Also, how do I incorporate OTF? Thanking you in advance, Regards, Debasish Jana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xsl-fo tag for character spacing and line spacing
Hi: XSL-FO supports an attribute for text as line-height, we can set to 100%, 200% or a fixed point size, is there any such tag for character-spacing for narrower spacing, wider spacing etc.? Also, when we set line-height to say 100%, does it have any impact on the inter-character spacing? Thanking you in advance, Regards, Debasish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP 0.92 Beta : Performance related question
Yes, I removed all page-number-citations. I understand that XSL-FO maynot be tight approach. However, we are somewhat stuck in this. We need to support high volume reports. Can you please provide a skeleton XSL-FO sample file for showing large volume of data populated in a table? We will do the split accordingly. Please help. Thanks and regards, Debasish -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 06, 2006 12:39 PM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP 0.92 Beta : Performance related question Did you remove all page-number-citations? Without getting my hands on your documents I don't have any further ideas for you. You may need to accept that XSL-FO may not be the right approach for what you're doing as I have told you before. On 06.06.2006 08:51:45 Debasish Jana wrote: > Hi: > > We managed to prepare a XSL-FO document with physical breaking into multiple > page-sequences, roughly 1,00,000 records to be shown in a table. While doing > so, we split one page-sequence to hold approx. 200 records, but FOP 0.92 is > failing with OutOfMemory. Increasing the heap size it performs better, but > not through. > > Please help by providing us some tips. > > Regards, > > Debasish > > -Original Message- > From: Jeremias Maerki [mailto:[EMAIL PROTECTED] > Sent: Friday, May 12, 2006 12:15 PM > To: fop-users@xmlgraphics.apache.org > Subject: Re: FOP 0.92 Beta : Performance related question > > > On 11.05.2006 10:17:36 Debasish Jana wrote: > > Hi: > > > > I have a question related to performance issues. How large an xsl-fo file > > can be? How large volume it can support? > > Depends on how much memory you can provide. But that's the wrong > question in my opinion. The question should be: Is XSL-FO the right > approach to generate huge but simple tabular reports? My answer is no in > many cases as has been discussed on this list before. > > > I have an application that fetched approx. 60,000 records fetched from > > database an populates in a fo:table-cell as text. Basically, it uses the > > following block of fo-tags repeatedly to populate a huge chunk of data. > > > > -- > > > > > > > > > > > > Some data > > > > > > > > > > -- > > > > My specific questions are: > > > > - Can you suggest a shortcut so that fo-tags can pull data from the > database > > directly? > > That's not how XSL-FO works. Not an option. > > > - What is the best suggested approach to handle large volume of data > passed > > embedded inside fo-tags? > > Get rid of everything unneccessary, like the nested blocks and the > inline that you're showing above. Every nesting level eats memory. > > > We can think of the following: > > > > - Have a streaming fo input to the FOP renderer to generate PDF. Can you > > provide a sample code to handle FOP rendering to PDF from a FO file > through > > streaming? > > Depends on what you mean by streaming. FOP is built to accept a SAX > stream, so if you're building a DOM for the FO document and then pass > that to FOP you're giving away memory. Rework your system to create SAX > directly as demonstrated here: > http://xmlgraphics.apache.org/fop/latest/embedding.html#examples > > While FOP processes a document internal trees are built which > essentially cancels the effect of streaming for large page-sequences > especially > since FOP is not optimized for large page-sequences, yet. > > > - We were reading a link in FOP documents, it says "To minimize the amount > > of memory used by FOP, we wish to recycle FO Tree memory as much as > > possible. There are at least three possible places that FO Tree fragments > > could be passed to the Layout process, so that their memory can be reused: > > > > fo:block , fo:root and fo:page-sequence > > > > Could you please clarify with some supporting examples or some link that > we > > can read to get the guideline? > > There may be something in the mailing list archive but essentially this > means you have to do most of the page breaking process yourself in XSLT > by predicting when a page is full and then use page-sequences to divide > the document. FOP can currently only free memory after a page-sequence > is complete and that's why you need to create multiple smaller > page-sequences. > > > My last question: Is FOP designed to handle large volumes like this? > > At the moment, FOP is not optimized to handle large volumes. The recent > focus has been on functionality. The archite
RE: FOP 0.92 Beta : Performance related question
Hi: We managed to prepare a XSL-FO document with physical breaking into multiple page-sequences, roughly 1,00,000 records to be shown in a table. While doing so, we split one page-sequence to hold approx. 200 records, but FOP 0.92 is failing with OutOfMemory. Increasing the heap size it performs better, but not through. Please help by providing us some tips. Regards, Debasish -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Friday, May 12, 2006 12:15 PM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP 0.92 Beta : Performance related question On 11.05.2006 10:17:36 Debasish Jana wrote: > Hi: > > I have a question related to performance issues. How large an xsl-fo file > can be? How large volume it can support? Depends on how much memory you can provide. But that's the wrong question in my opinion. The question should be: Is XSL-FO the right approach to generate huge but simple tabular reports? My answer is no in many cases as has been discussed on this list before. > I have an application that fetched approx. 60,000 records fetched from > database an populates in a fo:table-cell as text. Basically, it uses the > following block of fo-tags repeatedly to populate a huge chunk of data. > > -- > > > > > > Some data > > > > > -- > > My specific questions are: > > - Can you suggest a shortcut so that fo-tags can pull data from the database > directly? That's not how XSL-FO works. Not an option. > - What is the best suggested approach to handle large volume of data passed > embedded inside fo-tags? Get rid of everything unneccessary, like the nested blocks and the inline that you're showing above. Every nesting level eats memory. > We can think of the following: > > - Have a streaming fo input to the FOP renderer to generate PDF. Can you > provide a sample code to handle FOP rendering to PDF from a FO file through > streaming? Depends on what you mean by streaming. FOP is built to accept a SAX stream, so if you're building a DOM for the FO document and then pass that to FOP you're giving away memory. Rework your system to create SAX directly as demonstrated here: http://xmlgraphics.apache.org/fop/latest/embedding.html#examples While FOP processes a document internal trees are built which essentially cancels the effect of streaming for large page-sequences especially since FOP is not optimized for large page-sequences, yet. > - We were reading a link in FOP documents, it says "To minimize the amount > of memory used by FOP, we wish to recycle FO Tree memory as much as > possible. There are at least three possible places that FO Tree fragments > could be passed to the Layout process, so that their memory can be reused: > > fo:block , fo:root and fo:page-sequence > > Could you please clarify with some supporting examples or some link that we > can read to get the guideline? There may be something in the mailing list archive but essentially this means you have to do most of the page breaking process yourself in XSLT by predicting when a page is full and then use page-sequences to divide the document. FOP can currently only free memory after a page-sequence is complete and that's why you need to create multiple smaller page-sequences. > My last question: Is FOP designed to handle large volumes like this? At the moment, FOP is not optimized to handle large volumes. The recent focus has been on functionality. The architecture is prepared to handle large volumes but to really cope with them additional work is needed. > Please reply soon. We are standing of major decision based on your answer. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Different first page for header/footer
Hi: Does FOP support anything to have different first page in a section for header/footer? Thanking you in advance, Regards, Debasish Jana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP 0.92 Beta : Performance related question
Hi: We managed to prepare a XSL-FO document with physical breaking into multiple page-sequences, roughly 1,00,000 records to be shown in a table. While doing so, we split one page-sequence to hold approx. 200 records, but FOP 0.92 is failing with OutOfMemory. Increasing the heap size it performs better, but not through. Please help by providing us some tips. Regards, Debasish -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Friday, May 12, 2006 12:15 PM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP 0.92 Beta : Performance related question On 11.05.2006 10:17:36 Debasish Jana wrote: > Hi: > > I have a question related to performance issues. How large an xsl-fo file > can be? How large volume it can support? Depends on how much memory you can provide. But that's the wrong question in my opinion. The question should be: Is XSL-FO the right approach to generate huge but simple tabular reports? My answer is no in many cases as has been discussed on this list before. > I have an application that fetched approx. 60,000 records fetched from > database an populates in a fo:table-cell as text. Basically, it uses the > following block of fo-tags repeatedly to populate a huge chunk of data. > > -- > > > > > > Some data > > > > > -- > > My specific questions are: > > - Can you suggest a shortcut so that fo-tags can pull data from the database > directly? That's not how XSL-FO works. Not an option. > - What is the best suggested approach to handle large volume of data passed > embedded inside fo-tags? Get rid of everything unneccessary, like the nested blocks and the inline that you're showing above. Every nesting level eats memory. > We can think of the following: > > - Have a streaming fo input to the FOP renderer to generate PDF. Can you > provide a sample code to handle FOP rendering to PDF from a FO file through > streaming? Depends on what you mean by streaming. FOP is built to accept a SAX stream, so if you're building a DOM for the FO document and then pass that to FOP you're giving away memory. Rework your system to create SAX directly as demonstrated here: http://xmlgraphics.apache.org/fop/latest/embedding.html#examples While FOP processes a document internal trees are built which essentially cancels the effect of streaming for large page-sequences especially since FOP is not optimized for large page-sequences, yet. > - We were reading a link in FOP documents, it says "To minimize the amount > of memory used by FOP, we wish to recycle FO Tree memory as much as > possible. There are at least three possible places that FO Tree fragments > could be passed to the Layout process, so that their memory can be reused: > > fo:block , fo:root and fo:page-sequence > > Could you please clarify with some supporting examples or some link that we > can read to get the guideline? There may be something in the mailing list archive but essentially this means you have to do most of the page breaking process yourself in XSLT by predicting when a page is full and then use page-sequences to divide the document. FOP can currently only free memory after a page-sequence is complete and that's why you need to create multiple smaller page-sequences. > My last question: Is FOP designed to handle large volumes like this? At the moment, FOP is not optimized to handle large volumes. The recent focus has been on functionality. The architecture is prepared to handle large volumes but to really cope with them additional work is needed. > Please reply soon. We are standing of major decision based on your answer. Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.92: Font related problem
Hi, There seems to be a problem in FOP 0.92 for some fonts having spaces in font family names in the fop.xconf file. For e.g., if I have "Monotype Corsiva" in the fop.xconf file and my fontest.fo file, FOP tries to search with "Corsiva", cannot find any such name and replaces with the default font. I am attaching my fonttest.fo file and the fop.xconf file. Thanks in advance. Regards, Debasish Jana - fonttest.fo - http://www.w3.org/1999/XSL/Format"; xmlns:repro="http://www.anshinsoft.com/fop/extensions";> This is a test for font. - fop.xconf - . 72 72 flate - 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 0.92: Font related problem
Hi, There seems to be a problem in FOP 0.92 for some fonts having spaces in font family names in the fop.xconf file. For e.g., if I have "Monotype Corsiva" in the fop.xconf file and my fontest.fo file, FOP tries to search with "Corsiva", cannot find any such name and replaces with the default font. I am attaching my fonttest.fo file and the fop.xconf file. Thanks in advance. Regards, Debasish Jana - fonttest.fo - http://www.w3.org/1999/XSL/Format"; xmlns:repro="http://www.anshinsoft.com/fop/extensions";> This is a test for font. - fop.xconf - . 72 72 flate - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP 0.92: SVG Rendering problem to PDF
Many thanks, it worked, fantastic Regards, Debasish Jana -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 2:18 AM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP 0.92: SVG Rendering problem to PDF Debasish Jana wrote: > I am having a problem in rendering a SVG, We used SVGGraphics2D for the ... FOP has difficulties rendering SVGs which don't specify heigth and width on the SVG root. You should get something if you specify a height/width (in cm or pt) and a proper viewport on the SVG and a matching content-height and content-width on the fo:external-graphic. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.92: SVG Rendering problem to PDF
Hi: I am having a problem in rendering a SVG, We used SVGGraphics2D for the following SVG (within -- block), marked below. While trying to render using FOP0.92 Beta, it is not showing up the pie chart in the rendered PDF. The SVG is however being opened by any other SVG viewer e.g. a web browser. We tried with alternate simplified SVG to render to PDF. That worked. Can you please suggest any workaround? Many thanks in advance, Regards, Debasish Jana Title Series1 = 5 Series2 = 7 Series3 = 8 Series3 Series1 Series2 -
FOP : Query on user defined tags
Hi: Does FOP have any support for user-defined tag or attribute for fo:table so that this extra tag is not to be interpreted by FOP engine but can be used by the user for keeping some information for future use. The information needs to be embedded within xsl-fo document. Regards, Debasish
FOP 0.92 : Text Rendering problem
Hi: While trying to render a XSL-FO document to PLAIN_TEXT, the text rendering output shows lots of extra line breaks and spaces. For example, the following FO snippet…. - a a a a - Shows the TEXT output as: a a a Repeating the fo:table-row block as above for multiple times show multiple text lines, when rendered as PLAIN_TEXT, shows ‘a’ in different lines, sometimes with double spacing and sometimes with single spacing Any clue? Many thanks in anticipation, Regards, Debasish
FOP 0.92 Beta : Performance related question
Hi: I have a question related to performance issues. How large an xsl-fo file can be? How large volume it can support? I have an application that fetched approx. 60,000 records fetched from database an populates in a fo:table-cell as text. Basically, it uses the following block of fo-tags repeatedly to populate a huge chunk of data. -- Some data -- My specific questions are: - Can you suggest a shortcut so that fo-tags can pull data from the database directly? - What is the best suggested approach to handle large volume of data passed embedded inside fo-tags? We can think of the following: - Have a streaming fo input to the FOP renderer to generate PDF. Can you provide a sample code to handle FOP rendering to PDF from a FO file through streaming? - We were reading a link in FOP documents, it says "To minimize the amount of memory used by FOP, we wish to recycle FO Tree memory as much as possible. There are at least three possible places that FO Tree fragments could be passed to the Layout process, so that their memory can be reused: fo:block , fo:root and fo:page-sequence Could you please clarify with some supporting examples or some link that we can read to get the guideline? My last question: Is FOP designed to handle large volumes like this? Please reply soon. We are standing of major decision based on your answer. Thanks in advance, Regards, Debasish Jana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP 0.92 Beta : Performance related question
Hi: I have a question related to performance issues. How large an xsl-fo file can be? How large volume it can support? I have an application that fetched approx. 60,000 records fetched from database an populates in a fo:table-cell as text. Basically, it uses the following block of fo-tags repeatedly to populate a huge chunk of data. -- Some data -- My specific questions are: - Can you suggest a shortcut so that fo-tags can pull data from the database directly? - What is the best suggested approach to handle large volume of data passed embedded inside fo-tags? We can think of the following: - Have a streaming fo input to the FOP renderer to generate PDF. Can you provide a sample code to handle FOP rendering to PDF from a FO file through streaming? - We were reading a link in FOP documents, it says "To minimize the amount of memory used by FOP, we wish to recycle FO Tree memory as much as possible. There are at least three possible places that FO Tree fragments could be passed to the Layout process, so that their memory can be reused: fo:block , fo:root and fo:page-sequence Could you please clarify with some supporting examples or some link that we can read to get the guideline? My last question: Is FOP designed to handle large volumes like this? Please reply soon. We are standing of major decision based on your answer. Regards, Debasish Jana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP0.91 - Page X of Y in footer
Hi: How can I have “Page X of Y” appear in the footer of the generated PDF? I used the following fo tags to do so: Page of But, the rendered PDF shows : Page 3 of It does not show the total page no. Am I missing any tag? Pls help. Regards, Debasish Jana
FOP0.91 beta - how to support UTF-16 encoded characters
Hi: While trying to use FOP0.91 beta for showing some Unicode characters in 16-bit format, the PDF generation fails. For example, the begin quote character can be having Unicode 022 (hex) or 093 (hex). Using the former character i.e. 022 is no problem, but with 093, the renderer fails. Is there any workaround to specify 16-bit character format before passing it to renderer? Is there any way to configure that in FOUserAgent ? Regards, Debasish
RE: FOP 0.91 Beta - Previewer problem
Can you please pass on how to use the AWTRenderer with some sample code to hook in? I would like to use it in as-is form, i.e. to call proper API to preview using AWTRenderer and show it in a suitable JFrame or JPanel. Regards, Debasish -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 7:58 PM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP 0.91 Beta - Previewer problem There is something to consider: Previewing the FO document in FOP's AWT Preview is not the same as previewing the PDF. The AWTRenderer (based on the Java2DRenderer) uses different font metrics than the PDFRenderer which can cause the document to look different depending on which renderer the document was generated with. There are Java-based packages around with implement a PDF viewer that you should be able to integrate into your Java application. Just enter "Java PDF Viewer" in Google and you find plenty of hits. All commercial, I think. PDFBox is an open source package which can preview PDFs but it's not mature enough for the job, yet. On 11.04.2006 13:06:52 Debasish Jana wrote: > Hi: > > Thanks for your prompt answer. Can you please pass me a sample code to > invoke the renderer in an AWT window (JPanel or JFrame). Suppose I have a > XSL-FO document which I would like to render to say PDF using FOP renderer > and like to preview it? How can I do it? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FOP - help in alternate color setting in table
I mean to say, using fo:table Tag of XSL-FO, do we have some attribute to achieve alternate color for table rows ? Regards, Debasish -Original Message- From: Cinzia [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 5:38 PM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP - help in alternate color setting in table Debasish wrote: > Many thanks, but is there any direct way using some fo tag as attribute to > fo:table suc as say, > > > > > > > > > > I don't understand what you're trying to say, sorry. Cinzia - 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: FOP 0.91 Beta - Previewer problem
But I am using Java on Linux. Can I not use a Preview Panel to preview the rendered document using the FOP Previewer or something like that sort? Regards, Debasish -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 4:58 PM To: 'fop-users@xmlgraphics.apache.org' Subject: AW: FOP 0.91 Beta - Previewer problem My suggestion is to use InternetExplorer within a OLE container. If your using windows :) -Ursprüngliche Nachricht- Von: Debasish Jana [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 11. April 2006 13:07 An: fop-users@xmlgraphics.apache.org Betreff: RE: FOP 0.91 Beta - Previewer problem Hi: Thanks for your prompt answer. Can you please pass me a sample code to invoke the renderer in an AWT window (JPanel or JFrame). Suppose I have a XSL-FO document which I would like to render to say PDF using FOP renderer and like to preview it? How can I do it? Pls help. Regards, Debasish -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 10:46 PM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP 0.91 Beta - Previewer problem (comments inline...) On 10.04.2006 14:11:08 Debasish Jana wrote: > Hi: > > We are using FOP 0.91 Beta for rendering XSL-FO documents toPDF or RTF > or other supported formats. To use the previewer, we are using > the following code snippet: > -- > // file is the output file created earlier, and fo is theinput stream having XSL-FO source > FOP fop = new Fop(MimeConstants.MIME_FOP_AWT_PREVIEW); > BufferedOutputStream out = new BufferedOutputStream(newFileOutputStream(file)); > fop.setOutputStream(out); > fop.getUserAgent().setOutputFile(file); Why do you set an OutputStream if the file is displayed on screen? > // Setup JAXP using identity transformer > TransformerFactory factory = TransformerFactory.newInstance(); > Transformer transformer = factory.newTransformer(); //identity transformer > > // Setup input stream > Source src = new StreamSource(fo); > > try { > // Resulting SAX events (the generated FO) must be pipedthrough to FOP > Result res = new SAXResult(fop.getDefaultHandler()); > > // Start XSLT transformation and FOP processing > > transformer.transform(src, res); > } > catch(Exception ex) > { > } > -- > > While hooking up the previewer, we face the following problems. > > (1) Thepreviewer is shown in a separate JFrame window, which shows > the preview, but onclosing the entire application of ours (running in a > separate JFrame) closesand the application comes out. Is it an > acceptable behavior? Or is there anyworkaround? Sorry, but I don't understand what you're trying to say. > (2) In case wewould like to fit the previewer window inside a > JPanel, how can we do that, sothat we can control stopping or terminating the > preview window wheneverrequired. I'd look at the source code of PreviewDialog. It should contains everything you need to use the preview panel in your own windows, because that's just what this class does. http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/src/java/org/apache/fo p/render/awt/viewer/PreviewDialog.java Since this is not the first time this question pops up, it would be good if someone would write a short Wiki page on how to do that. Or maybe even an example class we could include in our embedding examples. > (3) Is there anyother way of using the AWT previewer or are we > doing any mistake to use thepreviewer elegantly? One thing would probably be to instantiate the AWTRenderer yourself and to pass it to FOP using FOUserAgent.setRendererOverride(). I'm sorry I can't help more. I'm not so much into GUI programming lately so that I'm not a big help without wasting many hours first. > An early reply would be sincerely appreciated. 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] - 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: FOP 0.91 Beta - Previewer problem
Hi: Thanks for your prompt answer. Can you please pass me a sample code to invoke the renderer in an AWT window (JPanel or JFrame). Suppose I have a XSL-FO document which I would like to render to say PDF using FOP renderer and like to preview it? How can I do it? Pls help. Regards, Debasish -Original Message- From: Jeremias Maerki [mailto:[EMAIL PROTECTED] Sent: Monday, April 10, 2006 10:46 PM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP 0.91 Beta - Previewer problem (comments inline...) On 10.04.2006 14:11:08 Debasish Jana wrote: > Hi: > > We are using FOP 0.91 Beta for rendering XSL-FO documents toPDF or RTF > or other supported formats. To use the previewer, we are using > the following code snippet: > -- > // file is the output file created earlier, and fo is theinput stream having XSL-FO source > FOP fop = new Fop(MimeConstants.MIME_FOP_AWT_PREVIEW); > BufferedOutputStream out = new BufferedOutputStream(newFileOutputStream(file)); > fop.setOutputStream(out); > fop.getUserAgent().setOutputFile(file); Why do you set an OutputStream if the file is displayed on screen? > // Setup JAXP using identity transformer > TransformerFactory factory = TransformerFactory.newInstance(); > Transformer transformer = factory.newTransformer(); //identity transformer > > // Setup input stream > Source src = new StreamSource(fo); > > try { > // Resulting SAX events (the generated FO) must be pipedthrough to FOP > Result res = new SAXResult(fop.getDefaultHandler()); > > // Start XSLT transformation and FOP processing > > transformer.transform(src, res); > } > catch(Exception ex) > { > } > -- > > While hooking up the previewer, we face the following problems. > > (1) Thepreviewer is shown in a separate JFrame window, which shows > the preview, but onclosing the entire application of ours (running in a > separate JFrame) closesand the application comes out. Is it an > acceptable behavior? Or is there anyworkaround? Sorry, but I don't understand what you're trying to say. > (2) In case wewould like to fit the previewer window inside a > JPanel, how can we do that, sothat we can control stopping or terminating the > preview window wheneverrequired. I'd look at the source code of PreviewDialog. It should contains everything you need to use the preview panel in your own windows, because that's just what this class does. http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/src/java/org/apache/fo p/render/awt/viewer/PreviewDialog.java Since this is not the first time this question pops up, it would be good if someone would write a short Wiki page on how to do that. Or maybe even an example class we could include in our embedding examples. > (3) Is there anyother way of using the AWT previewer or are we > doing any mistake to use thepreviewer elegantly? One thing would probably be to instantiate the AWTRenderer yourself and to pass it to FOP using FOUserAgent.setRendererOverride(). I'm sorry I can't help more. I'm not so much into GUI programming lately so that I'm not a big help without wasting many hours first. > An early reply would be sincerely appreciated. 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: FOP - help in alternate color setting in table
Many thanks, but is there any direct way using some fo tag as attribute to fo:table suc as say, Regards, Debasish From: Cinzia [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 4:01 PM To: fop-users@xmlgraphics.apache.org Subject: Re: FOP - help in alternate color setting in table One way is to create the row in one xsl:template and cells in another xsl:template. If this is the type of table you have in mind, read colour(row,column): R(1,1) B(1,2) R(1,3) B(1,4) B(2,1) R(2,2) B(2,3) R(2,4) R(3,1) B(3,2) R(3,3) B(3,4) B(4,1) R(4,2) B(4,3) R(4,4) then: 1) first cell of row: R if odd row B if even row store colour in v1 2) second and subsequent cells of row choose B when v1=R and R when v1=B store colour in v1 use xsl:param and xs:with-param setting and passing v1 for the two templates. Cinzia - Original Message - From: Debasish Jana To: fop-users@xmlgraphics.apache.org Sent: Tuesday, April 11, 2006 10:41 AM Subject: FOP - help in alternate color setting in table Hi: Is there any way to set alternate colors for rows and columns for a fo:table? For example, I would like to set the first row as red, second as blue, third as red and so on. If there is no such attribute to do so, is there any workaround to accomplish this? Pls help. Regards, Debasish Jana
FOP - help in alternate color setting in table
Hi: Is there any way to set alternate colors for rows and columns for a fo:table? For example, I would like to set the first row as red, second as blue, third as red and so on. If there is no such attribute to do so, is there any workaround to accomplish this? Pls help. Regards, Debasish Jana
FOP 0.91 Beta - Previewer problem
Hi: We are using FOP 0.91 Beta for rendering XSL-FO documents to PDF or RTF or other supported formats. To use the previewer, we are using the following code snippet: -- // file is the output file created earlier, and fo is the input stream having XSL-FO source FOP fop = new Fop(MimeConstants.MIME_FOP_AWT_PREVIEW); BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file)); fop.setOutputStream(out); fop.getUserAgent().setOutputFile(file); // Setup JAXP using identity transformer TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(); // identity transformer // Setup input stream Source src = "" StreamSource(fo); try { // Resulting SAX events (the generated FO) must be piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); // Start XSLT transformation and FOP processing transformer.transform(src, res); } catch(Exception ex) { } -- While hooking up the previewer, we face the following problems. (1) The previewer is shown in a separate JFrame window, which shows the preview, but on closing the entire application of ours (running in a separate JFrame) closes and the application comes out. Is it an acceptable behavior? Or is there any workaround? (2) In case we would like to fit the previewer window inside a JPanel, how can we do that, so that we can control stopping or terminating the preview window whenever required. (3) Is there any other way of using the AWT previewer or are we doing any mistake to use the previewer elegantly? An early reply would be sincerely appreciated. Warm regards, Debasish Jana
FOP 0.90 help for fo:instream-foreign-object
Hi: I was trying to use fop 0.90 alpha for PDF rendering from a XSL:FO document. But, I don't have any clue how to render fo:instream-foreign-object. Suppose, I would like to render a chart using own chart drawing algorithm and want to Hook up with the fop renderer as an extension to fo. Can you pass some pointer ro link with some code examples to do that? An early reply in this regard would be greatly appreciated. Warm regards, Debasish Jana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]