RE: HTML to FO
big blue has a stylesheet that does a ok job at it. It's probably a good starting point if you have clean xhtml conversion guide http://www-106.ibm.com/developerworks/library/x-xslfo2app/ stylesheet http://www-106.ibm.com/developerworks/library/x-xslfo2app/xhtml-to-xslfo.xsl JohnPT "Ken Masters" <[EMAIL PROTECTED]> 02/27/2003 03:44 PM Please respond to fop-dev To: [EMAIL PROTECTED] cc: Subject: RE: HTML to FO Hi, Could you give some more information on where I can get hold of this tool. I did a search for "htmlfo" on Google and found a stylesheet that is in some other langauage to do with DSSSL. Ken >there is a tool called htmlfo which does that.. > > > >-Original Message- >From: Swapan Golla [mailto:[EMAIL PROTECTED] >Sent: Thursday, February 27, 2003 1:04 PM >To: [EMAIL PROTECTED] >Subject: HTML to FO > > >I am having a need to convert html ( or xhtml ) to fo >documents and then to pdf. Any suggestions on the best >ways to achieve this ? I should be able to use/call >this from my java program. > >Thanks in advance, >Swapan. _ Express yourself with cool emoticons http://messenger.msn.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
producing OMR marks (Optical Mark Reading)
I'm writing a DB reporting class that extends org.apache.fop.apps.Driver and fires SAX events to the Drivers ContentHandler (FOTreeBuilder). I have a method that produces the correct OMR mark with SAX events when the page number is passed in as a parameter. The problem with this is that I need the current page number passed into this method as the page is processed? (callbacks?) What I need is a tag that performs a lot like . The OMR mark is just the page number in binary (well 85% of it is). The last page has an extra mark to say it's the last page, etc. I need some help getting stared on creating this tag. It requires access to the page number and has to know when it gets to the last page. The mark is a 1 cell by 10 row table (picture a real simple verticle barcode) so I need help with using the Table Area too. Thanks, JohnPT More info: I'm generating PDF's ( you probably guessed that one :) OMR is just a vertical table with one column and 10 rows. The table is placed 1/4 inch from either edge of the page. Mininum mark sizes are 0.01 inch high and 0.1 inch long. The first cell is the GRV (Gate Read Verify, ie:it's always marked). The second cell is not used. The third cell is marked when the last page is reached. The remaining cells count the page number in binary. These marks are used when printing in bulk to keep documents grouped. They can also be used to print the first page with perforated paper and the rest on plain paper, tell the operator a page is missing, etc. Picture keeping a run of 70,000 1-5 page reports organized. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: producing OMR marks (Optical Mark Reading)
For the last page I'm planning on putting in a block with a id attribute then use the page-number-citation with ref-id attribute. put a block like this on last page (I have a summary record that goes on the end of the document so I'll tack it on there) Then for the page number on top of the page I could put of (1 of 3) I'm guessing I could try to traverse the tree and try to find id "endofdoc" and compare that page number with the current page number. Will that element exist in the tree if I have 3 pages and I'm on page 1? I know the "endofdoc" tag is not the cleanest way, any thoughts? I agree the sax events are not the right way. It worked for proof of concept, but the extension tag is needed. I took at look at your counter example, thats a lot better starting place than reverse engineering Table right off the bat. Thanks, JohnPT fop-dev-return-10157-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 09/07/01 05:07 AM Subject: Re: producing OMR marks (Optical Mark Reading) Please respond to fop-dev Hi John, I think that for this type of thing using sax events is at the wrong end of the processing. For your situation it still may be a complementary part of the process to insert the necessary information. A while back I posted a simple example of how you can include custom tags in a separate namespace in order to create things on the output or do other things. http://marc.theaimsgroup.com/?l=fop-dev&m=99648766508793&w=2 If you want to contribute to this approach you can look at the example (attached to the message). I'm sure others will also want to know how to do this sort of thing, ie. probably needs better code and documentation. Currently can can add any sort of area to the passed in area, for example you could make svg and/or tables. This approach could be improved to include a better way to handle putting "things" in the area tree, such as how the bookmark extension works. The only problem I think you may have is the last page, unless you know exactly how many pages are in your documents. On Thu, 06 Sep 2001 17:38:28 [EMAIL PROTECTED] wrote: > I'm writing a DB reporting class that extends org.apache.fop.apps.Driver > and fires SAX events to the Drivers ContentHandler (FOTreeBuilder). > > I have a method that produces the correct OMR mark with SAX events when > the > page number is passed in as a parameter. The problem with this is that I > need the current page number passed into this method as the page is > processed? (callbacks?) > > What I need is a tag that performs a lot like . The OMR > mark > is just the page number in binary (well 85% of it is). The last page has > an extra mark to say it's the last page, etc. I need some help getting > stared on creating this tag. It requires access to the page number and > has > to know when it gets to the last page. The mark is a 1 cell by 10 row > table (picture a real simple verticle barcode) so I need help with using > the Table Area too. > > Thanks, > > JohnPT > > > More info: > > I'm generating PDF's ( you probably guessed that one :) > > OMR is just a vertical table with one column and 10 rows. The table is > placed 1/4 inch from either edge of the page. Mininum mark sizes are > 0.01 > inch high and 0.1 inch long. > > The first cell is the GRV (Gate Read Verify, ie:it's always marked). The > second cell is not used. The third cell is marked when the last page is > reached. The remaining cells count the page number in binary. > > These marks are used when printing in bulk to keep documents grouped. > They > can also be used to print the first page with perforated paper and the > rest > on plain paper, tell the operator a page is missing, etc. Picture >
Re: Adding Properties to the FOP driver
I'm also using .18 in VAJ and the org.apache.fop.fo.properties package did not import for me. I got similar errors to what you are describing. Try exporting these class files from fop.jar and importing them into VAJ. There were a few other class files that were not in the source, I used the same deal. JohnPT fop-dev-return-10181-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 09/07/01 04:49 PM Subject: Adding Properties to the FOP driver Please respond to fop-dev Hello, In my code to render a PCL/PDF from XML, I set the following properties: driver.addElementMapping("org.apache.fop.fo.StandardElementMapping"); driver.addElementMapping("org.apache.fop.svg.SVGElementMapping"); driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping"); driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping"); These seem to work fine except now that I have the FOP .18 in VAJ, I get class non defined errors in the .fo.* package. I also got errors in the driver=new driver() statement, which seem to stem from these same lines of code in the constructor of that class. Is there a reason why this is happening? The NonDefClass errors seem to be on subclasses of other classes - not sure why this isn't working. Thanks for any insight. Tony - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP on IBM AS400
I'm also having some image problems on the AS400. I'm using FOP version 0.18 and Java 1.2. I'm getting the following output when I try to write out the pdf. Pages without images turn out great. Any help or suggestions on this would be greatly appreciated. building formatting object tree setting up fonts formatting FOs into areas [1] [2] [3] rendering areas to PDF writing out PDF Error in XObject : Error while loading image file:/home/directory/img/filename.gif : class java.lang.Exception - Image error Also, I can't figure out how to get FOP to run in Quiet mode when called in java. I'm extending org.apache.fop.apps.Driver and fireing sax events on DefaultHandler (FOTreeBuilder). Can org.apache.fop.apps.Driver say quiet to the backseat chatter? Thanks, JohnPT PS: got the OMR marks "working". fop-dev-return-10324-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 09/17/01 03:23 AM Subject: Re: FOP on IBM AS400 Please respond to fop-dev On Fri, 14 Sep 2001 12:30:09 Stephen Fry wrote: > Hi > > We are attempting to port our application which uses fop 0.20.1 to the > AS400. We seems to have some issues with FOP's use of AWT classes. Has > anyone any experience of this environment ? Is it possible to configure > FOP > not to use AWT or is it fundemental ? > > We have bmp files as external-graphic's, and we are rendering to PDF,PS > and > PCL. The AWT classes are used by batik and currently batik is tied into fop. If someone implements the user agent properly then it will be possible to separate the use of batik and handle problems better. I don't know what your problem with the AWT classes is but if it is due to the display then the real problem is with java, this is fixed in version jdk1.4. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP on IBM AS400
We had problems with gif files. However BMP's work fine on AS/400, as suggested below. We are using FOP v 0.18 to render PDF's. JohnPT fop-dev-return-10469-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 09/22/01 04:42 AM Subject: Re: FOP on IBM AS400 Please respond to fop-dev > Stephen Fry wrote: > > Hi > > We are attempting to port our application which uses fop 0.20.1 to the AS400. > We seems to have some issues with FOP's use of AWT classes. Has anyone any > experience of this environment ? Is it possible to configure FOP not to use > AWT or is it fundemental ? > > We have bmp files as external-graphic's, and we are rendering to PDF,PS and > PCL. I've successfully run FOP on a AS/400 with PDF, PS and PCL output but without images. I *think* BMP images should work as they don't need AWT. > > Stephen Fry > CODA Plc Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP on IBM AS400
Make sure your using BMP's. We're using V4R5 and JDK 1.2 with FOP .18. Gif's and the like don't work, but BMP's work. JohnPT fop-dev-return-10514-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> cc: 09/25/01 05:55 AM Subject: RE: FOP on IBM AS400 Please respond to fop-dev Hi Thanks to all who have responded to my initial question. We have now, with the help of IBM managed to render to PCL OK. However all attempts to render to PDF and PS fail due to problems with the RAWT. We are using V4R5 and JDK 1.3. Is anyone using this combination ? Is there any way to stop it thinking it needs a Remote Terminal ? Thanks Stephen Fry CODA Plc -Original Message- From: David Morris [mailto:[EMAIL PROTECTED]] Sent: 22 September 2001 14:02 To: [EMAIL PROTECTED] Subject: Re: FOP on IBM AS400 Stephen, I have also used FOP quite a bit on an iSeries AS/400. Ideally you should be on V4R5 or V5R1 with the latest group and cum. On earlier groups, I experienced problems loading some classes. I have been using the .19 version distributed with Cocoon2. David Morris >>> [EMAIL PROTECTED] 09/22/01 03:43 AM >>> > Stephen Fry wrote: > > Hi > > We are attempting to port our application which uses fop 0.20.1 to the AS400. > We seems to have some issues with FOP's use of AWT classes. Has anyone any > experience of this environment ? Is it possible to configure FOP not to use > AWT or is it fundemental ? > > We have bmp files as external-graphic's, and we are rendering to PDF,PS and > PCL. I've successfully run FOP on a AS/400 with PDF, PS and PCL output but without images. I *think* BMP images should work as they don't need AWT. > > Stephen Fry > CODA Plc Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Line feed in FOP
It's not the most graceful, but you can just put them in separate blocks. The blocks start on a new line. JohnPT fop-dev-return-10521-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> cc: 09/25/01 09:58 AM Subject: Line feed in FOP Please respond to fop-dev I am trying to insert a line feed after an element value is displayed in a fo:table-cell. I have tried inserting but that translates into just a space in the pdf output. The line feed must come after the "SHIP_UNIT_COUNT" Is there some way to do this? Thanks so much, in advance! Linda - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: image on every pdf page
You need to set up the static content areas (you probably already have region-before and region-after in your simple-page-master). You'll want to put in one of the following in your page-sequence depending on where you want it to show up. (for English TOP area) (for English BOTTOM area) (for English LEFT area) (for English RIGHT area) JohnPT fop-dev-return-10563-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 09/26/01 01:05 PM Subject: image on every pdf page Please respond to fop-dev I have images working .. http://localhost:8100/somepic.gif content-height="3cm" content-width="8cm"/> Is there a way so that this image is always on a page when a page break occurs in the pdf file.(kindda like page numbers..) thanks Amit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: image on every pdf page
I think you want "height' and "width" NOT "content-height" and "content-width" on your external-graphic. Make your static-content region-before real big for testing (extent="2in"), then trim it down. If the image doesn't fit in the static region it will be blank. I bet the static region is working when it's not showing, you just need to make the region larger because your graphic height and width are not sizeing correctly. I found I had to leave a buffer zone. Other Thoughts: make sure your using a repeatable-page-master of some type (not a single-page-master-reference) in your page-sequence-master. fop-dev-return-10566-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 09/26/01 02:50 PM Subject: Re: image on every pdf page Please respond to fop-dev My code is listed below...the image does not show up in the pdf http://localhost:8100/somepic.gif"; content-height="3cm" content-width="8cm"/> If i take out the static -content tag the picture shows up one page [EMAIL PROTECTED] wrote: > You need to set up the static content areas (you probably already have > region-before and region-after in your simple-page-master). You'll want to > put in one of the following in your page-sequence depending on where you > want it to show up. > > (for English TOP area) > (for English BOTTOM > area) > (for English LEFT area) >(for English RIGHT area) > > JohnPT > > > fop-dev-return-10563-jthaemlitz=oreillyauto.com@XML. > APACHE.ORG To: [EMAIL PROTECTED] > cc: > 09/26/01 01:05 PM Subject: image on every pdf page > Please respond to fop-dev > > > > I have images working .. > > >http://localhost:8100/somepic.gif > content-height="3cm" > content-width="8cm"/> > > > Is there a way so that this image is always on a page when a page break > occurs in the pdf file.(kindda like page numbers..) > > thanks > Amit > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
how do I remove the index page
I'm trying to create subsection of a report that does not contain a index page. I'm missing something pretty simple I think. The first page shows the region before and region after but nothing in the region body. Then the region body (a table) shows up correctly on page two and on down the line. I've tried it without a page-sequence-master in my layout-master-set. I tried to do the following in my layout-master-set. I've tried silly combinations like the following too. Any ideas how I set this up to skip the index page for the first page? Thanks, JohnPT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
how do I remove the index page (Never Mind)
found a break-before="page" in my code I had forgotten about. JohnPT - Forwarded by John Thaemlitz/OReilly on 10/05/01 01:54 PM - John Thaemlitz To: [EMAIL PROTECTED] 10/05/01 11:47 cc: AM Subject: how do I remove the index page I'm trying to create subsection of a report that does not contain a index page. I'm missing something pretty simple I think. The first page shows the region before and region after but nothing in the region body. Then the region body (a table) shows up correctly on page two and on down the line. I've tried it without a page-sequence-master in my layout-master-set. I tried to do the following in my layout-master-set. I've tried silly combinations like the following too. Any ideas how I set this up to skip the index page for the first page? Thanks, JohnPT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Table Layout with Page Breaks (re-visited)
I'm understanding your problem a little better now. This probably won't solve all your problems, but be sure you have a margin-bottom attribute on your region-body tag. If you make the margin-bottom the same as the extent on your region-after it should keep it from printing over your page number. This is assuming your page number is in the region-after area used by ''. Same with the region-before tag and margin-top attribute to keep it out of your header. Hope that helps/works. JohnPT fop-dev-return-10926-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> 10/17/01 01:12 PM cc: Please respond to fop-dev Subject: Table Layout with Page Breaks (re-visited) I previously made a posting regarding this topic and received some helpful responses. However, I'm still having the problem. This time, I'll describe the problem in greater detail. I use FOP to dynamically create a table from database data. The resulting table can range from just a few rows to many rows, requiring multiple pages to display the table. The problem I'm having is that a multi-page table doesn't gracefully traverse the page boundaries. The table can continue past the page number to the very bottom of the page, with sometimes only half of the last row appearing on the first page, with the remaining table being displayed on the next page. I've tried "keep-with-next", plus other attributes, but haven't had any success at resolving this issue. I've made sure that all table tags are nested under the "xsl-region-body" tag, as suggested by John T. Perhaps part of my problem is that the text in one of the columns is wrapped onto three lines, as the column width is not sufficient for all of the text to fit on one line. I'm thinking that perhaps FOP can't set up the page breaks properly as a result (which is simply a guess). I'm added some logic in my XSL file to end the table and start a new table every x number of rows (by using the mod() method). However, I need to be able to set the cell height for this to consistently work (as the number of rows in a cell could vary). I tried setting height from the row tag as well as from the cell tag, but the requested height is being ignored. I've been using version 0.19.0. Today, I'm going to try 0.20.1 to see if there is a difference. Any help or suggestion would be greatly appreciated Chris W. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Question on XSLTInputHandler
You can use org.apache.fop.apps.Driver to get the org.xml.sax.helpers.DefaultHandler and fire sax events on that. The initialization code is highly order dependent. // THIS IS JUST SOME SET UP CODE // set up Logger Hierarchy hierarchy = Hierarchy.getDefaultHierarchy(); PatternFormatter formatter = new PatternFormatter( " [%{priority}]:%{message}\n%{throwable}" ); LogTarget target = new StreamTarget(System.out, formatter); hierarchy.setDefaultLogTarget(target); Logger log = hierarchy.getLoggerFor("fop"); // get output stream one way or FileOutputStream out = new FileOutputStream( "filename.pdf" ); // HERE's THE CODE YOU NEED Driver driver = new Driver(); driver.setOutputStream(out); driver.setLogger( log ); driver.setRenderer( driver.RENDER_PDF ); DefaultHandler handler = (DefaultHandler) driver.getContentHandler() ); handler.startDocument(); ... handler.endDocument(); out.close(); After seeing Yuri's implementation I'd go with his. The above avoids having to create a XML data file but you wind up with quite a bit of wrapper code and loose the XSL template cache. However it is another direct way, it also gives you a little more control since you are fireing SAX events from Java rather than XSLT. Then again that kind of stuff should probably be done in an extension. JohnPT fop-dev-return-11456-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 11/12/01 01:39 PM Subject: RE: Question on XSLTInputHandler Please respond to fop-dev Before I go on, let me say I turned my XSLT-transformed document into a string and then handed it to Fop. XML tree -> Xalan transform handler -> serialize -> string -> Fop However, this is silly. It would be more intelligent to be able to send Sax events to Fop. I found a class in the Fop source that handles it, but it seems to care about Jim Clark's XML handlers. I use the Apache XML code and would rather stick with those. I plan on looking into the Fop content handler that claims need of Clark's stuff and see if it really cares, or finding another content handler, or creating a regular Sax content handler that can talk to Fop. Perhaps Cocoon has one since you can have PDF generated at the end of a Cocoon pipeline. Does anyone know of one that already exists? --- Jim Wright <[EMAIL PROTECTED]> wrote: > Thanks a lot! > > jw > > -Original Message- > From: Clute, Andrew [mailto:[EMAIL PROTECTED]] > Sent: Monday, November 12, 2001 1:13 PM > To: '[EMAIL PROTECTED] ' > Subject: RE: Question on XSLTInputHandler > > > Sure... > Attached is a new FOInputHandler.java file. > As you can see all I did was add a new method to set a String > input-source, > and to get an InputSource that was fed from a StringReader. > > Let me know if you have any questions. > > -Original Message- > From: Jim Wright > To: [EMAIL PROTECTED] > Sent: 11/12/2001 2:02 PM > Subject: RE: Question on XSLTInputHandler > Andrew: > > For me, at least, that example would be greatly appreciated. Could > you > send it along? > > Thanks... > > jw > > -Original Message- > From: Clute, Andrew [ mailto:[EMAIL PROTECTED]] > Sent: Monday, November 12, 2001 12:58 PM > To: '[EMAIL PROTECTED] ' > Subject: RE: Question on XSLTInputHandler > > There is no way to do it without modifying the source code. > I added an InputSource that took in a String...took about 10 minutes > and > 5 lines of code (I did it on .20.1). > I can send you the code to make the changes, if you want. > Any reasons why this is not part of the class structure? > -andrew > > -Original Message- > From: Ulrich Mayring > To: [EMAIL PROTECTED] > Sent: 11/12/2001 1:49 PM > Subject: Question on XSLTInputHandler > Hello, > I've looked at the example servlet and found that the > XSLTInputHandler > takes as input a java.io
Re: no visual tool for FOP?
You could try checking out XSLFAST (http://www.xslfast.com/) that Stephan's been working on. JohnPT fop-dev-return-11458-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 11/12/01 02:29 PM Subject: no visual tool for FOP? Please respond to fop-dev I am wondering if there is no way for users to generate WISWIG xsl:fo files? like for HTML, users would use Dreamweaver, rather than writing programs Document doc.addElement(new Table(...)). I think it should be the same for PDF. Is there any program that intakes a parsed XHTML and convert it to PDF? (I doult all PDF is generated using hand written xsl:fo)... thanks a lot! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: horizontal line won't print?
Try using the tag. It's like the tag in HTML. Some of leader's attributes are leader-length, rule-thickness, leader-pattern JohnPT fop-dev-return-11511-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> cc: 11/13/01 08:14 PM Subject: horizontal line won't print? Please respond to fop-dev I've been using this constriction for the occasional horizontal line in my reports: I like it because it's independent of any table structures I insert it into. Problem is, while it looks fine in the PDF viewer, the line doesn't print. Also, no matter what I set the line-height to, it seems to come out 1pt. The only other way I know to get a horizontal line--that does print--is a table (or table-cell) border. Has anyone else seen this phenomenon, and does anyone know of an easy way to insert horizontal lines that show up in print? thanks a lot, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Difficulties embedding FOP by firing SAX events myself
This is the code I use to get the handler. I don't set the input stream at all. The setup order is hightly dependent. This works on 0.20.2. // THIS IS JUST SOME SET UP CODE // set up Logger Hierarchy hierarchy = Hierarchy.getDefaultHierarchy(); PatternFormatter formatter = new PatternFormatter( " [%{priority}]:%{message}\n%{throwable}" ); LogTarget target = new StreamTarget(System.out, formatter); hierarchy.setDefaultLogTarget(target); Logger log = hierarchy.getLoggerFor("fop"); // get output stream one way or FileOutputStream out = new FileOutputStream( "filename.pdf" ); // HERE's THE CODE YOU NEED Driver driver = new Driver(); driver.setOutputStream(out); driver.setLogger( log ); driver.setRenderer( driver.RENDER_PDF ); DefaultHandler handler = (DefaultHandler) driver.getContentHandler() ); handler.startDocument(); ... handler.endDocument(); out.close(); fop-dev-return-11540-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "Fop-Dev (E-mail)" <[EMAIL PROTECTED]> cc: "Smith, Paul" <[EMAIL PROTECTED]> 11/15/01 06:10 AM Subject: Difficulties embedding FOP by firing SAX Please respond to fop-dev events myself Hi, I am trying to embed FOP within my own Java application as described in http://xml.apache.org/fop/embedding.html, specifically the third method: "calling getContentHandler() and firing the SAX events yourself" and I am running into difficulties! I have a class called MyParser which fires the required events (it implements XMLReader). Its parse method that calls SAX events on ContentHandler and ignores the InputStream. If I do: (I have simplifed the code samples so their maybe a few typos) MyParser parser = new MyParser(); XMLSerializer serializer = new XMLSerializer(new FileOutputStream("output.fo"), new OutputFormat(method, encoding, indenting)); ContentHandler handler = serializer.asContentHandler(); parser.setContentHandler(handler); parser.parse(new InputStream()); Then I can produce a well formed XSL-FO file that validates against the DTD provided by N. Grigoriev from RenderX. Running fop on this file eg. "fop output.fo output.pdf", generates output.pdf successfully. HOWEVER, If I try and embed FOP by doing: Driver driver = new Driver(); driver.setOutputStream(new FileOutputStream("output.pdf"); driver.setInputSource(new InputSource()); Logger logger = Hierarchy.getDefaultHierarchy().getLoggerFor("foRender"); logger.setPriority(Priority.INFO); driver.setLogger(logger); MyParser parser = new MyParser(); driver.render(parser, new InputSource()); FOP generates output.pdf but when opened in Acrobat Reader I get "There was an error opening this document. Could not repair file." Closer inspection shows that the PDF has not been correctly generated at all. The first 9 lines look like: %PDF-1.3 %ª«¬ 4 0 obj << /Type /Info /Producer (null) >> endobj 5 0 obj << /Length 235 /Filter /FlateDecode >> where as the first 9 lines of the PDF generated by running FOP from the command line look like: %PDF-1.3 %ª«¬ 4 0 obj << /Type /Info /Producer (FOP 0.20.1) >> endobj 5 0 obj << /Length 296 /Filter [ /ASCII85Decode /FlateDecode ] >> During driver.render the logger prints out: INFO10058 [foRender] (): building formatting object tree DEBUG 10058 [fop ] (): setting up fonts INFO10058 [foRender] (): [1] Any help you can offer is much appreciated. Thanks in advance --- Paul Smith *** DISCLAIMER: The information contained in this email is confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the information in it by any other person is not authorised. - To unsubscrib
printing embedded fonts from Linux
this is a little off topic, if I could get pointed to some documetation that would be great. Othewise if you have a solution or some knowledge to pass on I'd appreciate it. We have 800+ neoware boxes that we're sending FOP generated PDF's too. The PDF's display the embedded font (Aachen) correctly. However when we go to print nothing happens. The printer fires up, says "flushing buffer" then just stops. We can print the same PDF to the printer from NT. The embedded font is a PFM. What do we need to do to get these to print? We've tried selecting the different levels of postscript (thought postscript 1 would do it ) from acrobats print dialog, but no dice. Thanks for any help. JohnPT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: printing embedded fonts from Linux
We're using the standard lpr/lpd on the neoware boxes. In our testing, lpr/lpd is pointing to a instance of Mocha lpd on an NT box. Any of our stores that have a PC use Mocha as the print server for the neoware boxes. In which case they could print from the PC, so we're realy only concerned with neoware boxes with direct connections to Lexmark printers. We can print pdf's with default fonts. I'm thinking it's a problem with the postscript and Linux not having access to the embedded font. JohnPT Ulrich Mayring <[EMAIL PROTECTED]> Sent by: To: [EMAIL PROTECTED] fop-dev-return-11553-jthaemlitz=oreillyauto.com@XML. cc: APACHE.ORG Subject: Re: printing embedded fonts from Linux 11/15/01 10:50 AM Please respond to fop-dev [EMAIL PROTECTED] wrote: > > this is a little off topic, if I could get pointed to some documetation > that would be great. Othewise if you have a solution or some knowledge to > pass on I'd appreciate it. > > We have 800+ neoware boxes that we're sending FOP generated PDF's too. The > PDF's display the embedded font (Aachen) correctly. However when we go to > print nothing happens. The printer fires up, says "flushing buffer" then > just stops. We can print the same PDF to the printer from NT. The > embedded font is a PFM. What do we need to do to get these to print? What printing software do you use? Have you looked at CUPS? Ulrich -- Ulrich Mayring DENIC eG, Systementwicklung - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Font embedding in PostScript?
Any luck printing embeded fonts on Linux via Acrobat PostScript? I believe the font needs to be on the printer. any advice is appreciated. JohnPT fop-dev-return-11702-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 11/23/01 08:24 AM Subject: Re: Font embedding in PostScript? Please respond to fop-dev Hi Ulrich No, sorry. I haven't had the time to do that, yet. I'm still doing it the PDF-way and then converting the PDF to PostScript using Acrobat Reader 4.05. On 23.11.2001 14:04:20 Ulrich Mayring wrote: > Hello, > > is it possible to use font embedding, when rendering to PostScript, or > is this only possible with PDF? > > Ulrich > > -- > Ulrich Mayring > DENIC eG, Systementwicklung > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Embedded Font Encoding (Windows vrs Built-in)
When I embed a font with FOP on my local maching (NT 4.0) Acrobat says the font Encoding is "Windows". If I use the Adobe tool to embed the font the Encoding type is "Built-in". The PDF with Encoding type "Built-in" prints correctly from our Linux boxes without any extra configuration. The PDF generated by FOP with Encoding type "Windows" does not print correctly from our Linux boxes (although you can view the PDF's on screen). Is there any way to change the encoding done by FOP to be "Built-in" instead of "Windows"? Thanks, JohnPT I'm getting the Encoding information by going to the "File" menu and selecting "Document Info" -> "Fonts...". - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Table Layout with Page Breaks
Make sure your table is in the xsl-region-body and not in the xsl-region-before or xsl-region-after. I have tables that go on for many pages without problems. You can then use the xsl-region-before for table headers at the top of each page. If you start your tables with the break-before="page" attribute you will start a new page for each table. So you could have a 100 row table that goes across 3 pages, a 2 row table on 1 page then a 50 row table on 2 pages if that's what your wanting. John fop-dev-return-10770-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> 10/10/01 06:30 PM cc: Please respond to fop-dev Subject: Table Layout with Page Breaks I'm using fop to generate tables that vary in length, so I need to be able set attributes such that the table layout will accommodate page breaks. I've tried using "keep-with-next" applied to fo:table-row and "height" applied to fo:table (plus many others) to setup the table layout so that it isn't truncated by a new page, but haven't had much success. Does FOP support this functionality? Chris W. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: fo:block
I'm not sure what you mean by row either, but you could use inline instead of block. First textSecond text this way you don't start Second text on a new line (if new line is what you meant by row). JohnPT Karen Lease <[EMAIL PROTECTED]> Sent by: To: [EMAIL PROTECTED] fop-dev-return-10875-jthaemlitz=oreillyauto.com@XML. cc: APACHE.ORG Subject: Re: fo:block 10/15/01 03:58 PM Please respond to fop-dev Hi Pablo, I'm not sure what you mean by "row". If you mean a line of text, the answer is no, at least not like that. You can try using a leader between the text, replacing the leader-length value with what you want. First textSecond text Or using a table row with several cells and put each of your blocks in a cell. HTH, Karen Pablo Iaria wrote: > > Hi all, > How can I do to have several blocks in the same row ? > > Example: > Suposse I have: > > First text > Second text > > And I want to get "First text" and "second text" in the same row. > > > Thanks in advance, > Pablo.- > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
fireing SAX events in .20
I'm trying to port my application from using FOP .18 to FOP .20. My application used to get the handler (FOTreeBuilder) from the Driver, then fire SAX events on it. In .20 I get a null pointer exception, I believe this is because the InputStream never gets initialized. Is there a way to make this work in .20.2? What the .18 code looks like Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); DefaultHandler handler = (DefaultHandler) driver.getContentHandler(); ... driver.setOutputStream(out); driver.format(); driver.render(); What I thought the .20 code should look like Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); DefaultHandler handler = (DefaultHandler) driver.getContentHandler(); ... driver.run(); Thanks, JohnPT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: fireing SAX events in .20
It looks like I'm getting a good PDF file now. I've switched my code so it reads Driver driver = new Driver(); driver.setOutputStream(out); driver.setRenderer(Driver.RENDER_PDF); DefaultHandler handler = (DefaultHandler) driver.getContentHandler(); // new details on handler but nothing changed in my code there. handler.startDocument(...); handler.startElement(...); handler.characters(...); handler.endElement(...); handler.endDocument(...); I was getting the null pointer exception when I set the renderer before setting the OutputStream. I no longer call run or render but still get a good pdf file. That must be handled by the SAX events going to the OutputStream. I'm getting an error message about "[ERROR]: Logger not set", which I can fix with the following chunk of code. Is there a better way to set up the logger? I'm not trying to start a logger discussion, just clean up my code a little. Hierarchy hierarchy = Hierarchy.getDefaultHierarchy(); PatternFormatter formatter = new PatternFormatter( "[%{priority}]: %{message}\n%{throwable}" ); LogTarget target = new StreamTarget(System.out, formatter); hierarchy.setDefaultLogTarget(target); Logger log = hierarchy.getLoggerFor("fop"); log.setPriority(Priority.INFO); driver.setLogger( log ); Thanks again, JohnPT fop-dev-return-10924-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 10/17/01 11:49 AM Subject: fireing SAX events in .20 Please respond to fop-dev I'm trying to port my application from using FOP .18 to FOP .20. My application used to get the handler (FOTreeBuilder) from the Driver, then fire SAX events on it. In .20 I get a null pointer exception, I believe this is because the InputStream never gets initialized. Is there a way to make this work in .20.2? What the .18 code looks like Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); DefaultHandler handler = (DefaultHandler) driver.getContentHandler(); ... driver.setOutputStream(out); driver.format(); driver.render(); What I thought the .20 code should look like Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); driver.setOutputStream(out); DefaultHandler handler = (DefaultHandler) driver.getContentHandler(); ... driver.run(); Thanks, JohnPT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: reuse of PDFRenderer
I don't have a solution, but I also would like to reuse or reset the driver. I remember seeing that reset had problems, any fixes or a way to make it work? I'm generating 70,000 pdf's with pretty complex fo markup and would like to speed up the process anyway possible. I have no memory problems (avg pdf is less than 10 pages), I would just like to speed up the rendering by reusing the driver. JohnPT fop-dev-return-12113-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> 12/12/01 09:31 AM cc: Dvorák Zdenek <[EMAIL PROTECTED]> Please respond to fop-dev Subject: reuse of PDFRenderer Hi, this is my first time contacting the mail group. If you received this mail in error, I am sorry. I am building a batch printing application. This application processes huge number of documents. I did some measurements and found out that every document beeing processed (Driver.run()) locks about 6 kB of memory. I invastigated the problem and did a pool of Driver objects to reuse them. This doesn't help since the Driver object by starting the setRenderer() method instantiates a PDFRenderer and this is the object that after beeing finished still keeps allocated memory. If I reset() the driver to perform another transformation it creates a corrupted PDF since the renderer was not reinitialized (my opinion). Does anyone have an idea how to make a pool of Driver, PDFRenderer objects or how to get rid of the memory leak? thanks Zdenek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: RE: reuse of PDFRenderer
I set up logger before I begin generating PDF's //code for setting up logger Hierarchy hierarchy = Hierarchy.getDefaultHierarchy(); PatternFormatter formatter = new PatternFormatter( " [%{priority}]:%{message}\n%{throwable}" ); LogTarget target = new StreamTarget(System.out, formatter); hierarchy.setDefaultLogTarget(target); Logger log = hierarchy.getLoggerFor("fop"); I wound up writing a class that extends Driver, then I fire SAX events instead of using XSLT. This gave me a little more control and avoided having to write an XML file when I get data from the database. If I had it to do all over again, I'd use a stylesheet and feed it a stream of XML data from the database. That how-to should be in the archives somewhere. I added some convenience methods to the class and set up my attribute objects as static variables. However the inline code would look something like the following. Driver driver = new Driver(); FileOutputStream out = new FileOutputStream( "path/to/pdffile.pdf" ); driver.setOutputStream(out); driver.setLogger( log ); driver.setRenderer( billingFop.RENDER_PDF ); DefaultHandler handler = driver.getContentHandler(); handler.startDocument(); handler.startElement( "http://www.w3.org/1999/XSL/Format";, "root", "fo:root", new AttributesImpl() ); ... AttributesImpl blockAttrib = new AttributesImpl(); blockAttrib.addAttribute( FOURI, "font-size", "font-size", "CDATA", "9pt" ); handler.startElement( "http://www.w3.org/1999/XSL/Format";, "block", "fo:block", blockAttrib ); handler.characters( "text stuff in block".toCharArray(), 0, "text stuff in block".length() ); handler.endElement( "http://www.w3.org/1999/XSL/Format";, "block", "fo:block"); ... handler.endElement( "http://www.w3.org/1999/XSL/Format";, "root", "fo:root"); handler.endDocument(); out.close(); Not sure if that helps you at all, but it's one way to do it. It DOES NOT REUSE PDF renderer, but it has no problems with leaking memory. It takes a little over 4 hours to run on a AS/400 with 8 G3 processors and lot's O ram. It's a pretty complex report with alternating colored lines, OMR marks, OCR font markings and different layouts for the first page, second page and then alternating odd/even pages. It's a good alternative for a AS/400. JohnPT fop-dev-return-12127-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> 12/13/01 02:07 AM cc: Please respond to fop-dev Subject: RE: RE: reuse of PDFRenderer Hi John, thanks for reply. Could you give me a hint - what version of fop are you using and the code pattern of the usage. I use very simple approach: ByteArrayOutputStream out = new ByteArrayOutputStream(); Driver driver = new Driver(); driver.setRenderer(RENDER_PDF); driver.setInputSource(foSrc); // defined previously driver.setOutputStream(out); driver.run(); // save FileOutputStream objF = new FileOutputStream(pstrFile); out.writeTo(objF); objF.close(); out.close(); This approach locks some memory even if I call gc() and exit the function. thanks Zdenek -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 8:44 PM To: [EMAIL PROTECTED] Subject: Re: reuse of PDFRenderer I don't have a solution, but I also would like to reuse or reset the driver. I remember seeing that reset had problems, any fixes or a way to make it work? I'm generating 70,000 pdf's with pretty complex fo markup and would like to speed up the process anyway possible. I have no memory problems (avg pdf is less than 10 pages), I would just like to speed up the rendering by reusing the driver. JohnPT fop-dev-return-12113-jtha
Re: Basic aspects
Perhaps it would be useful to set up a "user" mailing list separate from the "dev" list. It seems like 80%+ of the messages are on how to use FOP. Which is realy helpful and great, I try to help out when I can. Separate lists might be more useful for users and developers. I'm more of a user myself, but I can't imagine how the developers weed through all the input. While the Euro languages are probably not the best supported. We are able to generate pdf's of high enough quality for our printer to utilize OMR marks and other institutions to use OCR. Useful stuff when bulk processing. Our images are preprinted and our PDF's are text based so we avoid many high resolution issues. It took research, trail and error, tweaking and posting to the list to get pages we could generate correctly and consistantly. Once it was done, FOP generates our PDF's very consistently. With that experience we're able to create other PDF solutions with FOP rapidly. The documentation on the site has improved over the last several months. Traffic on the development list has been on a steady rise too (see above). So...many many thanks to the dev team. JohnPT fop-dev-return-12148-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: <[EMAIL PROTECTED]> cc: 12/13/01 07:50 AM Subject: Re: Basic aspects Please respond to fop-dev If I can specifically address one point, it is that I am curious about why you think FOP is web-oriented at all. If FOP is invoked from a servlet, which seems to be a popular mechanism, then the output is indeed being delivered to Web browsers. Unless things are different in Cocoon 2, Cocoon itself is nothing but a high-powered servlet that uses FOP just like this. But FOP itself has never been Web-oriented. HTML has never been produced by any of the renderers. Nor WML or HDML or anything else Webbish. The initial paragraphs on the main page (http://xml.apache.org/fop/index.html) do not mention these formats at all. Speaking for myself I have always viewed FOP as a print publishing tool, focused on producing print-quality documents. I would not characterize PDF as web-oriented, not in the sense you mean. It started out as a page description language, and it is stil a page description language. It has design features that promote electronic delivery, and this if anything makes it "web-compatible". Now, I've used PDF since Reader 2.0, I worked for 2 years at a shop where we were intimately familiar with PDF and did lots of early programmatic stuff with PDF (in Perl, mostly) before the explosion of useful tools (including any Perl PDF modules), and the PDF we produced had to be very high-quality for print purposes. We also used extremely large TIFF files as the basis for PDF images in those documents. So PDF may have some limitations, but I agree that if anyone is bottlenecked right now they are probably bottlenecked because of FOP, not because of PDF. That is, performance limitations. I think Keiron and Karen, among others, would agree that the object of the rewrite that they are spearheading is to allow other developers to more usefully contribute. This should go a long ways to letting more people get at the code. When you say "documentation", I take it you mean operating instructions, rather than stuff about XSL per se. Correct? Regards, Arved Sandstrom - Original Message - From: "Matthias Fischer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 13, 2001 5:27 AM Subject: Basic aspects > Hallo developers, > > I think I should give my contribution in backing Keiron's statement. Please > note that this is not some kind of a stuck-up, disengaged spectator's point > of view. I think the FOP developers have done a great job, sacrificing time > and money to achieve what has been achieved, and - as a beneficiary of it - > I'd like to thank you for it cordially. I also would like to express > gratefulness
Re: which graphic formats are supported ?
I think it's actually OS dependent. On NT lots of formats work. However on our AS/400's bitmaps seem to be the only thing that work. JohnPT fop-dev-return-12423-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "Apache Mailinglist \(E-Mail\)" <[EMAIL PROTECTED]> 01/08/02 11:03 AM cc: Please respond to fop-dev Subject: which graphic formats are supported ? hi ! in thetag: which graphic formats are supported ? e.g.: jpg ? and ... greetings Nick Winger (Software-Developer) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Any real-life business use ?
We're using FOP to generate our monthly billing statements. We generate 70,000 statements+ a month in about a 4 hour period of time. Statements range from 1-10 pages. We set up OMR marks for our print shop and OCR fonts for the bank return slips. One way we increased speed was to fire the SAX events directly, instead of through a stylesheet. This also gave us a little more control over the content, whithout having to code FOP extensions. We sold it to our company in several ways. It's verry low cost (donation to apache.org), gave us control over look of statements and allowed our billing question department to view the exact bill the client recieved. It also runs on AS/400's. JohnPT fop-dev-return-12526-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 01/13/02 04:31 PM Subject: Any real-life business use ? Please respond to fop-dev Hello everyone, I have busy evaluated the FO technology and I would like to hear from people that are using it for real-life business needs. What kind of documents are they using it with ? What volume ? Embedding it in servlets ? How do they cope with the "speed" ? How do they justify using FO to their bosses ? Anybody with both 3B2 and FO or Compuset and FO experience ? I would love to hear your story. Patrick Andries - ° - ° - ° - ° Tout sur Unicode 3.1 en français : http://hapax.iquebec.com Traduction complète, mise à jour, texte en ligne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: out of memory exception in java ?
I had problems with fairly large fo's too. The following is from the batch file I wrote that got it to run. I'm not sure if I need all the flags, mostly I'm setting the maximum memory size to 200 Megs. REM set all sorts of flags to make this memory hog run. java -Xrs -Xmx20480 -Xfuture -cp "...fop.jar..." org.apache.fop.apps.Fop %1 %2 Here's what the flags do (java -X) -Xmxset maximum Java heap size -Xfuture enable strictest checks, anticipating future default -Xrs reduce use of OS signals by Java/VM Hope that helps, JohnPT fop-dev-return-12827-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "Apache Mailinglist \(E-Mail\)" <[EMAIL PROTECTED]> 01/29/02 07:31 AM cc: Please respond to fop-dev Subject: out of memory exception in java ? hi ! when i want to render my fo-file, like: Driver driver = new Driver( new InputSource( "FOPTest.fo" ),new FileOutputStream( "FOPTest.pdf" ) ); driver.setRenderer( Driver.RENDER_PDF ); driver.run(); after about 45 pages i get an out of memory exception... anybody know why ? beside: when i have a very large table in one pagesequence... it is rendered to many pages... and on every page i want to have a different image in the footer how does this work ? greetings Nick Winger (Software-Developer) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: background-image
If your working with a one page report, you can put the external-graphic in the xsl-region-body and put your text in the xsl-region-before. Make the xsl-region-before the full size of you page then position your text in the xsl-region-before. Xsl-region-before will write over the flow and give the effect of a background image. Only works on ONE PAGE DOCUMENTS though. JohnPT fop-dev-return-12894-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 01/31/02 09:12 AM Subject: Re: background-image Please respond to fop-dev not... that isn't implemented it FOP yet (read the implemented.html in the docs...) use a toy like iText for that after you made your pdf... real great tool (thanks again DREF) Jochen Maes EDP departement Programmeur KBC-Securities Havenlaan 16 1080 Brussel Tel : 02/429.96.81 Fax : 02/429.17.48 E-mail : [EMAIL PROTECTED] ** This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. KBC Securities reserves the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of any such entity. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: static content question
You want OR which corresponds to your fo:simple-page-master's OR fop-dev-return-13049-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: "Apache Mailinglist \(E-Mail\)" <[EMAIL PROTECTED]> 02/08/02 07:11 AM cc: Please respond to fop-dev Subject: static content question hello again ! another problem i would like to solve: out.println( "" ); out.println( " " ); i have a " " to display the content which goes through serveral pages. now i need a static content on every page, which is always the same, so i though i might do this with: " ", but then the compiler says: " Exception: flow-names must be unique within an fo:page-sequence " so how do i make a static content in the xsl-region-body while still having a flow xsl-region-body ? thanks and greetings Nick Winger (Software-Developer) == VANGUARD Software GmbH Julius Tandler Platz 8 1090 Vienna, AUSTRIA Phone: +43-1-3195263-20 Fax: +43-1-3195263-90 http://www.vanguard.at == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Designing PDF extensions: form fields
>From a users point of view, the XML tagging, like the inline SVG, sounds great. I'd hate to have to program coordinates within the document. However programming relatively to form position would not be so bad (like SVG). It may be good to keep in mind that someday other objects may be able to call JavaScript in PDF's, like SVG's... I'd be so psyched to see form fields available, even without JavaScript. JohnPT fop-dev-return-14092-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 04/03/02 04:50 AM Subject: Re: Designing PDF extensions: form fields Please respond to fop-dev Hi Hansuli, I think this idea will be useful to quite a few people. Others ahve shown interest in these sort of pdf extensions in the past. I agree with the general idea. Use an instream-foreign-object. Put in that some xml markup that represents the PDF form (in this case). The data is then added to the PDFDocument. From a users perspective the particular setup seems a bit awkward and too specific. That is, why should a user need to insert PDF markup into the xml which will have problems since it is incompatible with xml. The plugin name "FOPplugin" is too general since plugins/extensions need to cover all renderers and this is only for a specific renderer. I don't like the renderClass and RenderMethod concept. That ties the xml too closely with the implementation. For the xml input we should probably be thinking more in terms of how the user should see the problem. They want to insert a form into pdf. So call the extension . It could have an attribute type="form". The form information could be more xml'ised. eg. red (Button) etc... This way the information is xml, it is clear what the purpose is and the code handles the implementation details. We already have a system where extensions can be added that take the xml and have access to the pdf document (eg for SVG), stream etc. The pdf library will need to have the correct api for adding forms including the xref data. What do other people think? How does this fit with other ideas such as pdf scripts etc. Regards, Keiron. On 2002.04.02 10:08 J.U. Anderegg wrote: > I programmed PDF form fields into Fop-0.20.1. PDF form fields have an > annotation representation in PDF files with the subtype "widget". So I > patched the external-link within the renderer code to process form > fields. > Additionally a PDF fields object had to be added to the PDF stream and a > reference to it into the PDF document catalog. So far quite easy. > > >From this experience I see now the design below for PDF plugins (rather > "plugin" than "FOP extension", because this is only partially FOP > business). > Main areas of concern are the external interface and on the other hand > general methods provided by FOP to generate valid PDF file structures. > When > this API is available, features like PDF JavaScript etc. will be easy to > implement. Plugins are not allowed to modify any FOP code. > > XSL:FO will be device-dependent. So users will have to take care of that > with XSLT. > > Hansuli Anderegg, Zurich, Switzerland > > == > > EXTERNAL INTERFACE > > PDF Form Field Example: > > (1) > (2) renderMethod="addFormField"> > (3) /T (pb1) > (3) /FT /Btn > (3) /Ff 65536 > (3) /H /P /F 4 > (3) /BS << /W 2 /S /B >> > (3) /MK << /BC [ 0 0 0 ] > (3) /BG [.7529 .7529 .7529] > (3) /CA (Button) >> > > > > (1) instream-foreign-object asks the FOP formatter for space. > __
RE: PDF JavaScript and Form Fields: FOP prototype version is available
I'm also verry interested in how you accomplished this. Looks great. JohnPT fop-dev-return-14271-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: <[EMAIL PROTECTED]> cc: 04/14/02 09:31 PM Subject: RE: PDF JavaScript and Form Fields: FOP Please respond to fop-dev prototype version is available Well done. There is interest. I, for one, would be very interested in seeing the techniques that you have used to make this work. We have been struggling with our own attempt to get FOP to generate PDF JavaScript, but just using the extension element mapping interface. It was becoming clear that branching the source might be the only way to go... Look forward to seeing your inputs and adapted source code. Adrian -Original Message- From: J.U. Anderegg [mailto:[EMAIL PROTECTED]] Sent: Saturday, 13 April 2002 6:24 AM To: [EMAIL PROTECTED] Subject: PDF JavaScript and Form Fields: FOP prototype version is available Attached I send a small demo document generated by an adapted FOP system. If attachements do not work in the forum, send me a request by e-mail. If there is interest I will compile the inputs, some comments and a list of related documents. PDF JavaScript and Form Fields cover a broad range of applications from simple user navigation/form-fillin to complex database/transaction systems. Note that many functions need more Adobe software than just Acrobat Reader. Hansuli Anderegg, Zurich - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
ERROR 10244 [fop ] (): svg graphic could not be rendered: null
I found a bug that I haven't seen reported. It seems that if you try to include a SVG file with an empty text element you get a null pointer exception. This only occurs if you use userconfig.xml file and set strokeSVGTextfalse If you have an SVG with an empty text element (eg: ) you get a null pointer exception. If you put in some CDATA likehi it works. It also works if you remove the user config file so you don't render the text directly into the PDF. Below is the exception I get. ERROR 10244 [fop ] (): svg graphic could not be rendered: null java.lang.NullPointerException at org.apache.fop.svg.PDFTextPainter.paint(PDFTextPainter.java:120) at org.apache.batik.gvt.TextNode.primitivePaint(TextNode.java:395) at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:415) at org.apache.batik.gvt.TextNode.paint(TextNode.java:375) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:132) at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:415) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:132) at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:415) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:132) at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(CanvasGraphicsNode.java:68) at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:415) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:132) at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:415) at org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(PDFRenderer.java:468) at org.apache.fop.render.pdf.PDFRenderer.renderImageArea(PDFRenderer.java:291) at org.apache.fop.image.ImageArea.render(ImageArea.java:68) at org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:158) at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38) at org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:158) at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38) at org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:158) at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38) at org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:158) at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38) at org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:158) at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38) at org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:158) at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38) at org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:158) at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38) at org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:158) at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38) at org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:158) at org.apache.fop.layout.ColumnArea.render(ColumnArea.java:33) at org.apache.fop.render.AbstractRenderer.renderSpanArea(AbstractRenderer.java:58) at org.apache.fop.layout.SpanArea.render(SpanArea.java:53) at org.apache.fop.render.AbstractRenderer.renderBodyAreaContainer(AbstractRenderer.java:114) at org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:728) at org.apache.fop.render.pdf.PDFRenderer.render(PDFRenderer.java:696) at org.apache.fop.apps.StreamRenderer.queuePage(StreamRenderer.java:206) at org.apache.fop.layout.AreaTree.addPage(AreaTree.java:81) at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:305) at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:191) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:178) at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:284) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:749) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097) at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:166) at org.
Re: Big problem with printing from adobe Reader 4
I had this same problem with Linux printing embedded fonts. After installing the fonts on the Linux box and NOT embedding the font, it printed correctly. The PDF would look just fine with the embedded font. That only happened with PFM fonts not TrueType. JPT fop-dev-return-15726-jthaemlitz=oreillyauto.com@XML. APACHE.ORG To: [EMAIL PROTECTED] cc: 07/09/02 10:52 AM Subject: Re: Big problem with printing from adobe Reader 4 Please respond to fop-dev Keiron, I think i might have found it... In my pdf i embedded the arialfont (and through adobe 5 it worked like a charm) but adobe 4 can't print it I found out the problem when we were at the printing facility of our company... This because they work there with the sun solaris 5.9 on the Xerox 6100 Printers (big big big ones :D)... I think the drivers don't recognize the embedded font and therefore print some letters and some letters not... I hope this is correct cause i just changed all the fonts to the default one (i don't specify one anymore) and now the printing works... i know for a fact that the fonts are embedded in the old documents (bigger size and on a linux machine where i didn't install the arial font it worked to :D), but the drivers of the printers simply won't understand it, nor does abode 4 (here) one more question, what font is used by the adobe when you don't specify nor embed another font thank you Jochen Maes ICT Development KBC Securities (kbcsecurities.com) Havenlaan 12 Avenue du Port SIF 8683 B-1080 Brussels Belgium Tel: +32 2 429 96 81 GSM: +32 496 57 90 99 E-mail : [EMAIL PROTECTED] This message and any attachments hereto are for the named person's use only. It may contain confidential, proprietary or legally privileged information. You may not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. If you have received this e-mail message without being the intended recipient, please notify KBC Securities promptly and delete this e-mail. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of KBC Securities. KBC Securities reserves the right to monitor all e-mail communications through its networks and any messages addressed to, received or sent by KBC Securities or its employees are deemed to be professional in nature. The sender or recipient of any messages to or of KBC Securities agrees that those may be read by other employees of KBC Securities than the stated recipient or sender in order to ensure the continuity of work-related activities and allow supervision thereof. KBC Securities does not accept liability for the correct and complete transmission of the information, nor for any delay or interruption of the transmission, nor for damages arising from the use of, or reliance on, the information. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: PDF Impositioning
If your hinting at PDF Form generation, I'd be highly interested. I've seen posts in the past where you can pass direct pdf form streams in for fields, but this is kinda hectic. PDF Form functionality would be awesome. JohnPT [EMAIL PROTECTED] 08/15/02 03:04 AM Please respond to fop-dev To: FOP Developers <[EMAIL PROTECTED]> cc: Subject: PDF Impositioning I've begun to look at the creation of a PDFRender subclass that will do impositioning of the resultant pages. There are three potential ways I can do this: 1. Use reference xobjects from PDF 1.4, I generate as normal except that I trap the original file into a embedded file stream. I then create the output pages based on the number of pages received. It seems to have the least potential for bugs, but it also relies on PDF 1.4 so I'm not sure what RIP support will be available. 2. Convert (actually they would never be pages as I would override the renderPage function) the pages to xobject forms and position them. There are two problems I see with this, one is that if the rip caches pdf form objects then it may cache the pages for no good reason causing an extra memory burden. A number of commercial products use this technique. Also some RIPS generate an inordinate number of gsave/grestore operations when nested xforms are in a document. 3. Do they same as above but convert the page information to content streams. It does mean that all pages need to share the same resource dictionary though which could cause some problems (though FOP currently does this) and is a more complex solution that the other two (pages and xobjects have a simliar structure). I'm sure there would also be other problems with this solution. I'm leaning toward 2 as it balances complexity with compatibility. Anyones thoughts? -k PS: does anyone but me want this :)? -- If you don't test then your code is only a collection of bugs which apparently behave like a working program. Website: http://radio.weblogs.com/0111457/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: AW: AW: Embedding FOP in Java
I created a convenience class called PdfRenderer. It cache's a stylesheet and then you can process files or streams throught it. You can also pass parameters to your stylesheet with a hashtable (probably should have been a Hashmap). Anyway, it's not perfect, but it works and the class file shows exactly what classes and packages are needed. // you can call the class on xml files with the following 2 lines of code PdfRenderer render = new PdfRenderer( "myxslfile.xsl" ); render.run("input.xml", "output.pdf"); // or if you are building a xml string in memory you can do something like the following String xmlString = "some kind of xml"; Source strSource = new StreamSource( new StringReader(xmlString) ); OutputStream out = new FileOutputStream("outputstream.pdf"); render.run( strSource, out ); // or if you have a DOM object you can do something like the following Hashtable xslParams = new Hashtable(2); xslParams.put( "parameter1", "value1" ); xslParams.put( "parameter2", "value2" ); Source source = new DOMSource( node ); render.run( source, new FileOutputStream( "dom.pdf" ), xslParams ); // configs are done globally (statically) so you can call your config file anytime before the run statements File userConfigFile = new File( "userconfig.xml" ); org.apache.fop.apps.Options options = new org.apache.fop.apps.Options( userConfigFile ); Hope that helps. This class cleaned up a bunch of my code. JohnPT [EMAIL PROTECTED] 09/17/02 07:36 AM Please respond to fop-dev To: <[EMAIL PROTECTED]> cc: Subject: AW: AW: Embedding FOP in Java Hi, Can somebody please post a working example of an embedding FOP example with java. I need an example which can transform directly with a XML-File and and XSL-File into PDF. Please post also the needed jar-Files. Thanxx Schoeib -Ursprüngliche Nachricht- Von: Li, Francis [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 17. September 2002 14:29 An: '[EMAIL PROTECTED]' Betreff: RE: AW: Embedding FOP in Java We use latest XALAN and latest FOP to generate HTML and PDF document. Since we like to use latest version of XALAN and XERCES. We just pass the FO file to FOP to handle PDF generation. We are able to use everything new, no problem. avalon-framework-20022706.jar batik.jar BCEL.jar fop-0.20.4.jar jaf-1.0.2.jar jakarta-oro-2.0.4.jar javamail-1.3.jar java_cup.jar log4j-1.2.6.jar runtime.jar xalan-2.4.0.jar xercesImpl-2.1.0.jar xml-apis.jar xsltc.jar good luck. -Original Message- From: Amin Schoeib [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 7:22 AM To: [EMAIL PROTECTED] Subject: AW: AW: Embedding FOP in Java Hi, I tried it also with adding the xml-apis.jar, but I become the same error. I use the newest version of FOP,XALAN and XERXES. What other things can make problems?? Thanxx Schoeib -Ursprüngliche Nachricht- Von: Christian Geisert [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 17. September 2002 12:52 An: [EMAIL PROTECTED] Betreff: Re: AW: Embedding FOP in Java Amin Schoeib schrieb: > Hi, > I already use the newest version of XALAN. > I use the following jar-files in my classpath: > > avalon-framework-cvs-20020315.jar > batik.jar > fop.jar > xalan.jar > xercesImpl.jar > > Are these the correct jar-files which I have to put in my classpath?? xml-apis.jar seems to be missing. But I can't tell you if the versions are correct and it also depends which FOP version you are using. Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] PdfRenderer.java Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: AW: AW: AW: Embedding FOP in Java
The newer version probably uses the Avalon logger. This will throw the ERROR message, but should not "break" the code. You'll have to search for that fix in the archives. It sounds like your not getting the right data in your FO file. Try running your data through the stylesheet on the command line. Then run it through FOP on the command line. You'll be able to analyze the files this way and see where your problem is. The following two commands should help. # create the FO file java org.apache.xalan.xslt.Process -in dataFile.xml -xsl styleSheet.xsl -out styleOutput.fo # render the FO file to PDF java org.apache.fop.apps.Fop -fo styleOutput.fo -pdf resulting.pdf JohnPT PS: sorry about the outdated logger code. [EMAIL PROTECTED] 09/18/02 05:59 AM Please respond to fop-dev To: <[EMAIL PROTECTED]> cc: Subject: AW: AW: AW: Embedding FOP in Java Hi, I tried the code of JohnPT. Here the result: When I compile it, I become the following error: "PdfRenderer.java": Error #: 300 : method setLogger(org.apache.log.Logger) not found in class org.apache.fop.apps.Driver at line 94, column 11 To make the code running I took out the line with setLogger. The code compiled succesfully, but when I execute it I become the following: [ERROR] Logger not set [INFO] building formatting object tree [WARNING] Screen logger not set. javax.xml.transform.TransformerException at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:426) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:215) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2324) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2147) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1203) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:665) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1119) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1097) at beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:105) at beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:69) at beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:122) at beraterfondsdaten.Trans.main(Trans.java:9) - Could not print stack trace... - java.lang.NullPointerException at org.apache.fop.fo.flow.Flow.setFlowName(Unknown Source) at org.apache.fop.fo.flow.Flow.(Unknown Source) at org.apache.fop.fo.flow.Flow$Maker.make(Unknown Source) at org.apache.fop.fo.FOTreeBuilder.startElement(Unknown Source) at org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTreeHandler.java:858) at org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandler.java:952) at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:306) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:716) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:426) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:215) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2324) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2147) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1203) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:665) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1119) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1097) at beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:105) at beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:69) at beraterfondsdaten.PdfRenderer.run(PdfRenderer.java:122) at beraterfondsdaten.Trans.main(Trans.java:9) I don't understand that, I use the newest versions of FOP,XALAN,XERXES nd JAXP but it don't want to work. What reason can this errors have? thanxx Schoeib -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 17. September 2002 16:31 An: [EMAIL PROTECTED] Betreff: Re: AW: AW: Embedding FOP in Java I created a convenience class called PdfRenderer. It cache's a stylesheet and then you can process files or streams throught it. You can also pass parameters to your stylesheet with a hashtable (probably should have been a Hashmap). Anyway, it's not perfect, but it works and the class file shows exactly what classes and packages are needed. // you can call the class on xml files with the following 2 lines of code PdfRenderer render =
Re: Setting the user configuration in embedded code
The user config options are static, so you can call this anywhere before you start you create your driver. You only have to call this once. import org.apache.fop.apps.Options; // Declare our FOP User Config file (this is where we get our fonts) File userConfigFile = new File( "userconfig.xml" ); org.apache.fop.apps.Options options = new org.apache.fop.apps.Options( "userconfig.xml" ); [EMAIL PROTECTED] 10/08/02 09:10 AM Please respond to fop-dev To: [EMAIL PROTECTED] cc: Subject: Setting the user configuration in embedded code Hi, wonder if anyone can help. I am trying to set the user configuratuion file with FOP embedded in my app. java.io.BufferedOutputStream bufferedOutputStream = null; org.apache.fop.apps.Driver driver = null; java.io.ByteArrayInputStream byteArrayInputStream = null; // file to write output to bufferedOutputStream = new java.io.BufferedOutputStream ( outputStream ); // create FOP object with arguments, and run it byteArrayInputStream = new java.io.ByteArrayInputStream ( this.writeXML ( document, true ).getBytes ( ) ); driver = new org.apache.fop.apps.Driver ( new org.xml.sax.InputSource ( byteArrayInputStream ), bufferedOutputStream ); // render pdf to file driver.setRenderer ( driver.RENDER_PDF ); driver.run ( ); // close file bufferedOutputStream.close ( ); I would like to specify some options for loading custom fonts. Has anyone done this or know how to load a user config file in code. ANy help would be appreciated. Regards Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Getting FOP running on Mac OS X
Sorry to send this to the whole list. You should probably report the file name truncation as a bug to Apple. OS 9 and earlier could only have 31 char file names. OSX should aleviate this. You didn't run stuffit expander under a OS 9 emulator did you? JPT |-+--> | | fop-dev-return-18356-jthaemlitz=oreillyauto.com@XML| | | .APACHE.ORG| | | | | | 12/10/02 02:46 PM | | | Please respond to fop-dev | | | | |-+--> >--| | | | To: <[EMAIL PROTECTED]> | | cc:| | Subject: RE: Getting FOP running on Mac OS X | >--| Clay Leeds wrote: > Above it indicates /Library/Java/Home is a symbolic link to the installed > version. If Java is updated, this is changed to point the new version. I > don't know how it's maintained, but I assume that the scripts for > installing help with the "maintenance". Personally, I'd rather > have be able > to download from java.sun.com like everyone else, instead of from Apple, > but they've got their reasons... > > In addition, I found these links helpful: > > Apple's Technical Java Q/As: > http://developer.apple.com/qa/indexes/java-a.html > > Apple's Java FAQ: > http://developer.apple.com/java/faq/ What I am trying to say is that I am in a worse position if I tell the user to do something that doesn't work than I am if I tell them nothing at all (the status quo). I don't doubt that OSX knows how to keep the links straight, but it can't possibly know exactly what version of Java FOP needs. I went ahead & updated the "running.xml" document to include information on these two issues (filename truncation and JAVA_HOME). I added a "caveat" and the java faq link you provided above to try to mitigate the upgrade issue. I am not sure when the web site will next be updated, but in the meantime, if you want to look at the content, go to: http://cvs.apache.org/viewcvs.cgi/xml-fop/src/documentation/content/xdocs/ru nning.xml?rev=HEAD&content-type=text/vnd.viewcvs-markup Victor Mote - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP performance - frustrating.. help!!
I also have speed issues, but not this bad. One thing I do is put a block around the whole table that sets up my default font. Not sure if this will help you any, but it'll clean up the code a little. Also can you specify the font you want, like "Helvetica" instead of "Helvetica, Arial, sans". Just some little things that may help a little. ... ... ... Hope this helps, JPT |-+--> | | fop-dev-return-18504-jthaemlitz=oreillyauto.com@XML| | | .APACHE.ORG| | | | | | 12/27/02 03:57 PM | | | Please respond to fop-dev | | | | |-+--> >--| | | | To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> | | cc:| | Subject: RE: FOP performance - frustrating.. help!! | >--| nyamdweb03:/home/leeins/weblogic/myserver/public_html/fd/xml$java -cp /home/leeins/weblogic/3rd_party_jars_SUN/xalan.jar:$CLASSPATH org.apache.xalan.xslt.Process -IN rates.xml -XSL rates_pdf.xsl -OUT rates.fo this step took about 1 minute... Here is the lengthy my FO file... (only 1/3 of it.. since it's over 1MB) Could somebody shed some lights? What am I doing wrong? Apologies for the large/messy posting... (choose no-wrap to see it better...) Thanks much! http://www.w3.org/1999/XSL/Format ">Rates16 Oct 2002 to 16 Oct 2002 Created by RYDERS on 05/10/2002 at 20:55:2 (CT) Active EUR Funds Fund Date Daily Factor 1-Day Yield (365 Day Rate) Short Long 360 Day Rates 7-Day Current Yield 7-Day Effective Yield 30-Day Yield NAV1 (EUR) TBA ILA Federal Admin - 4139 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.10 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.11 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.12 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.13 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.14 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.15 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401. TBA ILA Federal Inst - 4129 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.10 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.11 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.12 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.13 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.14 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.15 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401. TBA ILA Federal Service - 4149 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.10 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.11 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.12 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.13 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.14 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.15 Dec 20020.23263000.840.84909950.837468000NA0.84.938401. TBA ILA Money Market Admin - 4109 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501.10 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501.11 Dec 2