Re: fop w/ svg HUGE pdf file sizes
To answer my own question: org.apache.fop.configuration.Configuration.put("strokeSVGText","false"); took the size down to 70-90k. I'm not used to having such useful information on the fop website :-) Back in pre 0.20 days we needed to dig through source code to figure out what options existed :-) Dave - Original Message - From: "David Frankson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 28, 2003 2:26 PM Subject: fop w/ svg HUGE pdf file sizes > I am running fop 0.20.5 w/ the included batik to create a pdf that is > about 6 pages of simple graphs. The 6 page pdf is 6.7 megs in size! > > Here is a sample of the output: > http://65.121.2.203/school1.pdf > > Is there some kind of pdf file size optimization I haven't turned on? Or a > design technique that will shrink this down? > > I have a deadline about to hit and I need to have a couple thousand > pre-generated pdfs downloadable over the internet. 6 megs is just too big. > I'd appreciate a little help, otherwise I have to scrap this and start over. > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
fop w/ svg HUGE pdf file sizes
I am running fop 0.20.5 w/ the included batik to create a pdf that is about 6 pages of simple graphs. The 6 page pdf is 6.7 megs in size! Here is a sample of the output: http://65.121.2.203/school1.pdf Is there some kind of pdf file size optimization I haven't turned on? Or a design technique that will shrink this down? I have a deadline about to hit and I need to have a couple thousand pre-generated pdfs downloadable over the internet. 6 megs is just too big. I'd appreciate a little help, otherwise I have to scrap this and start over. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Embedding examples (or tutorial) and new directory structure
http://xml.apache.org/fop/embedding.html lists 6 different examples of embedding fop. Where do I find these example files? I can't find them in any of the distributions. Dave - Original Message - From: "Jeremias Maerki" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 11, 2003 3:15 PM Subject: Embedding examples (or tutorial) and new directory structure Hi there I've committed my first set set of embedding examples to the branch. I decided not to call it a tutorial, because that's not what it is. The intentions have stayed the same since the annoucement, though. I intend to add the documentation for the above in the next couple of days. Is that ok, if I just add that to the bottom of embedding.html? It won't be much anyway. I placed the new files in the newly created examples directory in accordance to what we discussed around december 1st. I will relocate the contrib stuff and the fo examples to this directory, too. I decided not to hack away at the server side CVS directories. Too much headache included. I'll just copy, commit, delete. I'd like to get rid of the docs directory in the end. I think there's still the -1 from Oleg concerning the src/foschema. How do we resolve that? We've got: 1. src/foschema (my proposal, +1 from Keiron and Jörg) 2. src/documentation/test/foschema (Oleg's preferred location. Did I get you right on this?) I would also like to get src/org to src/java/org. I think it's ok to lose history on the contrib and docs stuff when relocating. But that's not so easy with the Java sources. I'm not going to do CVS surgery. Do we have a volunteer? Pleeease? :-) Jeremias Maerki - 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: BARCODE
I used a commercial barcode font: http://www.carolinabarcode.com/ and was pleased with the results. I just followed the usual directions for installing a custom font, and that was it. d On Tuesday, October 8, 2002, at 07:34 AM, Surov Maxim wrote: Hi! Is it possible to embed barcodes into PDF using FOP? Thanks in advance, Maxim Surov
bug? one-word table cell not appearing
In the following FO table, the word "Final" doesn't appear in the first row. Note that the first column contains only one word. The word "Final" does appear in the second row. Note that the first column contains more than one word. Is this a bug, or is it just me? I'm using FOP 0.20.3 on Linux. http://www.w3.org/1999/XSL/Format";> Review Final Comprehensive Review Final -- J. David Eisenberg http://catcode.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Design Documentation Question
I'm just trying to get familiar with fop design, with the ultimate intention of participating. I have two questions. I got the source from cvs. I am looking in xml-fop/docs/design and also xml-fop/docs/design/alt.design but it is not clear to me how I am meant to view the various documentation files (xml, png, svg and whatnot) in those directories. Are they meant to be examined separately, or are they used to create some html or pdf that I should look at? Also, I cannot get at the faq servlet listed on the website. I think I saw mention somewhere in the archives to this list that there may be a known problem with, but I cannot for the life of me re-locate that in the archive. How does one get at the latest faq for development? - Dave Penton - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
SVG base URL exception
FOP is complaining about "Could not set base URL for svg" and refusing to draw a line. How does one set this URL? The version of FOP I'm using .20.1 Specifically, this XSL:FO... http://www.w3.org/2000/svg"; width="6in" height="0.1in"> ...gives me this stack trace... [ERROR]: Logger not set [INFO]: building formatting object tree [INFO]: [1] [INFO]: [2] [ERROR]: > [ERROR]: > [ERROR]: Could not set base URL for svg java.net.MalformedURLException: java.lang.NullPointerException at java.net.URL.(URL.java:496) at java.net.URL.(URL.java:376) at java.net.URL.(URL.java:330) at org.apache.fop.svg.SVGElement.layout(SVGElement.java:143) at org.apache.fop.fo.flow.InstreamForeignObject.layout (InstreamForeignObject.java:198) at org.apache.fop.fo.flow.Block.layout(Block.java:259) at org.apache.fop.fo.flow.Flow.layout(Flow.java:149) at org.apache.fop.fo.flow.Flow.layout(Flow.java:108) at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:294) at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:191) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:178) I remember creating SVG lines in the past (must have been an older version of FOP) w/o errors like this. d - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Exploring the FOP API design space
cruft ? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "J.Pietschmann" <[EMAIL PROTECTED]> To: "fop dev" <[EMAIL PROTECTED]> Sent: Friday, May 31, 2002 5:34 PM Subject: Exploring the FOP API design space > Hi foppers, > I know I should provide code instead of talking, but then... > > The current FOP API suffers from a variety of deficiencies > - unexpected statefulness (most horribly embodied in >XSLTInputHandler) > - weak abstraction of input and output channels > - incomplete separation of abstraction levels. > - cruft :-) > > Some points I think should be followed on design of a > new and hopefully better API: > - Atomic initialisation. After creating a processor, > it should be ready to run. Mandatory parametrisation > data should be passed either to the constructor or the > method(s) running the formatting process, everything > else should be initialised from sensible defaults. > - No file names, anywhere. Strings representing ressources > are always URLs, on the command line, in the config file > everywhere. In the API, use java.io.File if files are > deemed necessary. > - No baseDir. Define a baseURL concept. Pass all URL > through a resolver. > - Better abstraction of input and output channels. > > Whether only an avalon component API is exposed or whether there is an > avalon-free API and a separate avalon component is a matter of > taste. In either case, I'd like to have the possiblity to run a FOP > core without access to external config *files*, this means I can > create a new Driver() and can pass all config data by java properties, > service definitions and by using a user written Configuration class > passed to the Driver.configure() method for everything too complex to > be passed as properties and services (i.e. user font config). A FOP > default Configuration class could read a system and a user config > file. From what I've gathered from Avalon this is already implemented > this way there. However, I'm not sure, and I'm not dogmatic about > this. > > The problem I have is the design space for abstracting input > and output channels. > > = Input = > For input, we have the javax.xml.transform.Source stuff which > provides a nice unified encapsulation of SAX, DOM and serialised > XML streams as well as SAX and DOM itself. > > The nice part about the j.x.t.Source stuff is that it shields > the user from as much of the lower level XML stuff as possible, > in particular from setting up a parser in the common case of > having serialised XML as input. > > Design choice 1: > Use j.x.t.Source as FOP input. Implement a > o.a.f.stream.XSLTStreamSource as a j.x.t.s.StreamSource subclass > for providing XSLT power. (see end of message for an interface > proposal) > > Choice 2: > Provide SAX and DOM as input (getContentHandler() and render(DOM)) > > Choice 3: > Provide (more precise: expose) both. Redundant, but, well... > > = Output = > Next problem: output. We have two rather radically different > output types: byte streams and GUI panels. > A really stumbling block is that the object the output is > written to is volatile, it is likely to change with every > rendering run, while the kind of renderer as well as the > renderer specific configuration is more stable. This has > profund implications for the API design. > > Choice 1: > The interface is at the final output level. This means > render()/run() methods for each of the classes: >render(OutputStream) // for PDF, MIF, PS, ... >run(UserAgent) // for AWT... > We could add a print() method if necessary. > Rationale for choosing the method names: render() means > the input FO is rendered to a byte stream. Run() means, > the UserAgent is started and the user can interact with it. > The run() method will return if the user somehow ends the > interaction process and shuts down the UserAgent. Do I > interpret the current state correctly? > This choice implies the renderer and any configuration > data specific to the renderer has to be passed to the > Driver (processor) through the Driver configuration > methods. Because some renderers can be assumed to have > a lot of renderer specific config data which warrants > a structure imposed on it, I'm not very fond of the whole > idea. > > Choice 2: > The interface is the renderer. This means the renderer > object has to be created by the user explicitely. The > advantage is that the renderer configuration can be > designed to fit the renderer rather than to be passed > through a more generic interface at the Driver. Also, > renderer configu
Re: C# Version of FOP
Please provide a link to your company's site so we can sample the ported code. Thanks. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "Mark Griffiths" <[EMAIL PROTECTED]> To: "Fop-Dev" <[EMAIL PROTECTED]> Sent: Monday, May 27, 2002 12:32 PM Subject: C# Version of FOP > Dear FOP Developers > > Out of courtesy I wanted to let you all know that we have ported a recent > version of FOP to C# and have decided to market it as a commercial > component. > > FOP has proved a excellent starting point for the project and I would like > to thank all the FOP developers, past and present, for their contributions. > > Assuming the component is commercially successful, we are looking forward to > repaying the Apache community by donating money or resources. > > Thanks again to all those involved with FOP and good luck for the future. > > Kind regards > Mark > > -- > Mark Griffiths > mailto:[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]
Re: Embedding Example
Our application uses FOP on a seperate server and is access via an ASP page by way of SOAP (MS Soap Toolkit 2.0). So the actually serving of the document is handled by a Response.BinaryWrite on the ASP page. I guess IIS/ASP must take care of the content-length header for me. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "Jim Urban" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 24, 2002 9:49 AM Subject: RE: Embedding Example > The main reason is the line: response.setContentLength(content.length); > Failing to set the content length, which happens if you do it as you > suggest, causes IE to get upset and fail to call Acrobat Reader to display > the streamed PDF. I know this for a fact because I had it working as you > suggested and we had more then one client complain that they could not get > Acrobat Reader to display our dynamically created PDFs. I went into our > code and changed it back to the way the embedding example showed and the IE > issues went away. > > > Jim Urban - [EMAIL PROTECTED] > Park City Solutions Inc. > Clinical Connectivity Suite Product Manager > Suite 295 > 500 Park Blvd. > Itasca, IL 60143 > Voice: (630) 250-3045 x106 > Fax: (630) 250-3046 > > CONFIDENTIALITY NOTICE > This message and any included attachments are from Park City Solutions Inc. > and are intended only for the entity to which it is addressed. The contained > information is confidential and privileged material. If you are not the > intended recipient, you are hereby notified that any use, dissemination, or > copying of this communication is strictly prohibited and may be unlawful. If > you have received this communication in error please notify the sender of > the delivery error by e-mail or call Park City Solutions Inc. corporate > offices at (435) 654-0621 > > -Original Message- > From: David B. Bitton [mailto:[EMAIL PROTECTED]] > Sent: Friday, May 24, 2002 8:25 AM > To: fop-dev > Subject: Embedding Example > > Why if passing the ContentHandler from FOP into a Xalan transform is faster, > is it not done this way in the embedding example? > > Can I write an example for doing it this way for inclusion in the distro? > > -- > > David B. Bitton > [EMAIL PROTECTED] > www.codenoevil.com > > Code Made Fresh DailyT > > > - > 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]
Embedding Example
Why if passing the ContentHandler from FOP into a Xalan transform is faster, is it not done this way in the embedding example? Can I write an example for doing it this way for inclusion in the distro? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: embedded FOP from Document to PDF
ok, here's what ya want to do. when you perform a xalan xslt transform, you can specify a SaxResult as the output object. When you instantiate the SaxResult object, you pass a ContentHandler object to the constructor. Ok, so the question is, what does this have to do with you. fop's transformation engine is sax driven. we are given access to the underlying transformation engine, a SAX ContentHandler by calling getContentHandler() on the Driver object. We then pass the return value to the SAXResult constructor. the nice thing about doing it this way, is that as xalan transforms the xsl, it fires SAX events right into fop. therefore, it's essentially generating fop's output (pdf for example) at the same time the xml is transformed in xsl:fo by an xslt stylesheet. the line of code from my app looks like this: ... transformer.transform( new DOMSource( doc ), new SAXResult( driver.getContentHandler() )); ... also, by doing this, you do not need to pass any document or inputsource or even call render(), because it all done once the transform finishes. lemme know if you need an example. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "Juergen Lippold" <[EMAIL PROTECTED]> To: ">" < <[EMAIL PROTECTED]> Sent: Tuesday, May 21, 2002 4:22 AM Subject: embedded FOP from Document to PDF Hello, I have no Problems reading the XML and the XSL-file and directly generating the PDF-output. That works fine. But in my application I'm filling the XMl-file, writing it to the harddisk and then starting the FOP-conversion. It would be nice to start the conversion directly with the org.w3c.dom.Document in memory and the XSL-File from harddisk. Does someone knows if this is possible with FOP? Thanks for Help. Regards Juergen Lippold - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Getting Progress Feedback
Is there a way to attache a "delegate" or "helper" object to some part of FOP that will result in FOP calling some method I write on it? I'd like to inform users as to how many pages have been rendered plus give them other possible feedback about their report. For example for a 30,000 page report, say, it might be nice to tell the user that their job is on page 17,500 or whatever. David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Shrink oversized pages to paper size
I have a fo document for printing mailing labels and positioning on the printed document needs to be exact. FOP generates a perfectly spaced PDF document, but when I print it, Acrobat scales it down a bit and throws the whole thing off. Digging around I found that unchecking "Shrink oversized pages to paper size" makes it print exactly what I want, but "Shink" is checked by default and all users would need to remember to uncheck it before printing. My page was defined with a .5in top and bottom margin and a .1875in left/right margin, and I experimented with the margins to try to keep it from shrinking, but had no luck. No matter how large I make the margins, it still shrinks it. Is there something in a FOP PDF that tells Acrobat that there is content in the full 8.5x11space and it needs to be scaled down? Is there any way to prevent the automatic shrink? Dave
Shrink oversized pages to paper size
I have a fo document for printing mailing labels and positioning on the printed document needs to be exact. FOP generates a perfectly spaced PDF document, but when I print it, Acrobat scales it down a bit and throws the whole thing off. Digging around I found that unchecking "Shrink oversized pages to paper size" makes it print exactly what I want, but "Shink" is checked by default and all users would need to remember to uncheck it before printing. My page was defined with a .5in top and bottom margin and a .1875in left/right margin, and I experimented with the margins to try to keep it from shrinking, but had no luck. No matter how large I make the margins, it still shrinks it. Is there something in a FOP PDF that tells Acrobat that there is content in the full 8.5x11space and it needs to be scaled down? Is there any way to prevent the automatic shrink? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: PDF encryption
Actually, 128 bit is a ver. 5.0 requirement. I'm using this exact setup in my app (iText w/ FOP for encryption), and we are requiring all users to have AcroReader 5.0 for 128 bit encryption. Also, if you encrypt at 128 bit, and then check the encryptions properties of the doc in Reader, you'll see strength 128 and next to it, 5.0 in parenthesis. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "J.Pietschmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 28, 2002 5:39 PM Subject: Re: PDF encryption > Geez, self-followup: > > writer.setEncryption(PdfWriter.STRENGTH40BITS, > "pdf", null, PdfWriter.AllowCopy); > > If I set encryption to STRENGTH128BITS, as the original > had, Acrobat Reader 4.0 complains about "Error while > decrypting". Probably an export restriction :-(, so be > careful. > > J.Pietschmann > > > - > 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: PCL renderer limitations
checkout www.netlingo.com -- David B. Bitton[EMAIL PROTECTED]www.codenoevil.com Code Made Fresh Daily - Original Message - From: Art Welch To: '[EMAIL PROTECTED]' Sent: Friday, April 26, 2002 2:59 PM Subject: RE: PCL renderer limitations If the PDFRenderer centers the image properly and the PCLRenderer does not then it is probably a bug in FOP (likely the PCLRenderer) not a problem with the FO code. Art -Original Message-From: Bruno Verachten [mailto:[EMAIL PROTECTED]]Sent: Friday, April 26, 2002 2:11 PMTo: [EMAIL PROTECTED]Subject: Re: PCL renderer limitations [EMAIL PROTECTED] type="cite"> If the image is totally off center, then the problem is probably not related to scaling. "IIRC images", sorry I should have included a comma in there as in: "If I remember correctly, images..." It seems a bit odd to me that the PDF renderer would center the image properly and the PCL renderer would not center it at all. I have not looked at the code in a long time, but I thought that FOP did all the layout before calling the renderer. So it should just be saying "put the image here" and supplying the appropriate coordinates to the renderer. But it is entirely possible that this had changed - or perhaps even more likely - I am not remembering correctly. I have not looked at FOP code much since the redesign started. Okay... If you have time on your hands next week, I can send my fo code to the list.I have to leave now (8pm here), so ... have a nice week-end.Thanks for the answers, including the ones about shorthands ;-)Bruno Verachten.
Re: Using Options With Enbedding
For my SOAP class, I instantiate the Options object in the class constructor. That way, for each call to the class, Options is already set, and good to go. You can see when it gets created if you set your log level to DEBUG. You'll see: ... DEBUG 10191 [fop ] (): reading user configuration file ... or something very similiar This is generated by the Options object. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "Jeremias Maerki" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, April 24, 2002 4:18 PM Subject: Re: Using Options With Enbedding > You don't have to. It does some magic in the background. "static" is the > keyword. :-) > > On 24.04.2002 19:21:54 Jim Urban wrote: > > I understand (I think, I hope) how to add fonts to FOP. I understand the > > concept of using an Options object to load the userconfig.xml file. Where I > > get lost is, where in FopServlet does the Options object come in to play? > > In other words, how do I pass my Options object to FOP so my fonts can be > > used? > > > > Thanks, > > Jim > > > Cheers, > Jeremias Maerki > > > - > 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: Exception message text not bubbling up
Would that cause the entire exception message to be null though?This all stemmed from a change I had made to the underlying XML which caused the XSLT not to match the root element, and therefore not outputing a in the resultant transformation, so to answer your question, yes the parent was null. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "Nancy Deschenes" <[EMAIL PROTECTED]> To: "David B. Bitton" <[EMAIL PROTECTED]> Sent: Wednesday, April 24, 2002 4:57 PM Subject: Re: Exception message text not bubbling up > On Wed, 24-Apr-2002 at 00:35, "David B. Bitton" <[EMAIL PROTECTED]> wrote: > > +--- > | It;s just that the stack trace shows the exception being thrown from line > | 149 of ...PageSequence. Oh well. > | > | [...] > | > | > > For example, line 149 of org.apache.fop.pagination.PageSequence: > | > > > | > > throw new FOPException("page-sequence must be child of root, > | not > | > > " > | > >+ parent.getName()); > | > > > | > > is eventually thrown by the Transformer as a TransformerException, but > | when > | > > I getMessage(), it's an NPE. Any idea why this would be? > +--- > > Is it at all possible that parent is null? > > Nancy Deschenes > Objective Consulting, Inc. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Exception message text not bubbling up
No, I know what stack traces info is. You asked me if I was sure whether FOP threw the exception, and yes, based on the stack trace, it was FOP that threw the exception. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "J.Pietschmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 24, 2002 4:22 PM Subject: Re: Exception message text not bubbling up > David B. Bitton wrote: > > It;s just that the stack trace shows the exception being thrown from line > > 149 of ...PageSequence. Oh well. > > Stack traces of exceptions mention Java source file names > and line numbers where they are thrown. > Actually, what do you expect? Name+line of the FO source > where the error happens? That's not all that hard, however, > what should be used if you are generating the FO on the > fly using XSLT? > > J.Pietschmann > > > > - > 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: Exception message text not bubbling up
It;s just that the stack trace shows the exception being thrown from line 149 of ...PageSequence. Oh well. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "J.Pietschmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 23, 2002 3:17 PM Subject: Re: Exception message text not bubbling up > David B. Bitton wrote: > > My current implementation passes the Driver into the Sax transform. If the > > transform creates malformed xsl:fo, which is a possibility, the FOPException > > that is raised by FOP, is coming up to the top as an NPE and not the actuall > > message text. > > > > For example, line 149 of org.apache.fop.pagination.PageSequence: > > > > throw new FOPException("page-sequence must be child of root, not > > " > >+ parent.getName()); > > > > is eventually thrown by the Transformer as a TransformerException, but when > > I getMessage(), it's an NPE. Any idea why this would be? > > > Are you sure you don't have something else which causes the parser > or the transformer to throw a NPE? > > With the following code > try { > Driver driver=new Driver(); > driver.setRenderer(Driver.RENDERER_PDF); > driver.setOutputStream(...); > Transformer transformer=TransformerFactory.newInstance() > .newTransformer(new StreamSource(new File("stuff.xsl"))); > transformer.transform(new StreamSource(new File("stuff.xml")), > new SAXSource(driver.getContentHandler())); > } > catch( Exception e) { > System.out.println(e.getMessage()); > } > I get the "page-sequence must be..." message without a problem, and > the caught Exception is a TransformerException. > > > J.Pietschmann > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Exception message text not bubbling up
My current implementation passes the Driver into the Sax transform. If the transform creates malformed xsl:fo, which is a possibility, the FOPException that is raised by FOP, is coming up to the top as an NPE and not the actuall message text. For example, line 149 of org.apache.fop.pagination.PageSequence: throw new FOPException("page-sequence must be child of root, not " + parent.getName()); is eventually thrown by the Transformer as a TransformerException, but when I getMessage(), it's an NPE. Any idea why this would be? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Unix and FOP ?
yep -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "Carlos Daniel Schafer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 9:47 AM Subject: RE: Unix and FOP ? > In window, I can worked correctly and I uses instruccions and reference them > in userconfig.xml, but > Can I use the specials fonts by Window without problems into UNIX.? > That's possible? > > > > -Mensaje original- > > De: David B. Bitton [SMTP:[EMAIL PROTECTED]] > > Enviado el: viernes, 12 de abril de 2002 10:39 > > Para: [EMAIL PROTECTED] > > Asunto: Re: Unix and FOP ? > > > > I have used FOP on Linux w/ TTF fonts. Just reference them in > > userconfig.xml file like you would any font. The instructions on doing > > this > > are available from FOP > > > > -- > > > > David B. Bitton > > [EMAIL PROTECTED] > > www.codenoevil.com > > > > Code Made Fresh Daily(tm) > > - Original Message - > > From: "Carlos Daniel Schafer" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Friday, April 12, 2002 8:28 AM > > Subject: RE: Unix and FOP ? > > > > > > > But > > > > > > I need working with the fonts specials, for examples barcode (I2OF5.ttf) > > by > > > Windows. > > > > > > How I can do it ? or Is there the fonts specials for UNIX differents to > > True > > > Type?. > > > > > > > > > > -Mensaje original- > > > > De: Alistair Hopkins [SMTP:[EMAIL PROTECTED]] > > > > Enviado el: viernes, 12 de abril de 2002 4:31 > > > > Para: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > > > Asunto: RE: Unix and FOP ? > > > > > > > > I can't remember the details but there are certain gui packages which > > Fop > > > > needs to process the default fonts: if you run it on linux without > > > > X-windows > > > > it may well complain > > > > > > > > -Original Message- > > > > From: John Austin [mailto:[EMAIL PROTECTED]] > > > > Sent: 12 April 2002 07:36 > > > > To: [EMAIL PROTECTED] > > > > Subject: Re: Unix and FOP ? > > > > > > > > > > > > On Thursday 11 April 2002 09:37, you wrote: > > > > > Hi, > > > > > > > > > > I need information the file xsl:fo transformation in UNIX. > > > > > What's I need by uses XSL:FO in UNIX? > > > > > Can I do? > > > > > > > > You can use xsl:fo in ANY system that has an implementation of the > > Java > > > > VM. This includes any reasonable implementation of Unix (AFAIK). > > > > > > > > Many people use Cocoon 2 from the Apache project because it provides a > > > > ton of features, but you can use just the Fop program if you wish to. > > > > > > > > I use it both ways and have also used it from XML Spy. > > > > > > > > In Cocoon 2 you can run XSL transformations to produce an XSL:FO > > > > document and render this to one of a number of formats such as PDF, PS > > > > and RTF using the FopSerializer. > > > > > > > > I have also used Fop driven by a shell script. The memory footprint is > > > > smaller but you have to cart Fop around with you. From Cocoon, you can > > > > generate fancy-pants documents over the network. > > > > > > > > Cocoon has a much steeper and lengthy learning curve. Fop is much > > > > smaller and comes with lots of examples. > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, email: [EMAIL PROTECTED] > > > > > > > > --- > > > > Incoming mail is certified Virus Free. > > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > > Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/2002 > > > > > > > > --- > > > > Outgoing mail is certified Virus Free. > > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > > Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/2002 > > > > > > > > > > > > - > > > > 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] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Unix and FOP ?
I have used FOP on Linux w/ TTF fonts. Just reference them in userconfig.xml file like you would any font. The instructions on doing this are available from FOP -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh Daily - Original Message - From: "Carlos Daniel Schafer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 12, 2002 8:28 AM Subject: RE: Unix and FOP ? > But > > I need working with the fonts specials, for examples barcode (I2OF5.ttf) by > Windows. > > How I can do it ? or Is there the fonts specials for UNIX differents to True > Type?. > > > > -Mensaje original- > > De: Alistair Hopkins [SMTP:[EMAIL PROTECTED]] > > Enviado el: viernes, 12 de abril de 2002 4:31 > > Para: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > Asunto: RE: Unix and FOP ? > > > > I can't remember the details but there are certain gui packages which Fop > > needs to process the default fonts: if you run it on linux without > > X-windows > > it may well complain > > > > -Original Message- > > From: John Austin [mailto:[EMAIL PROTECTED]] > > Sent: 12 April 2002 07:36 > > To: [EMAIL PROTECTED] > > Subject: Re: Unix and FOP ? > > > > > > On Thursday 11 April 2002 09:37, you wrote: > > > Hi, > > > > > > I need information the file xsl:fo transformation in UNIX. > > > What's I need by uses XSL:FO in UNIX? > > > Can I do? > > > > You can use xsl:fo in ANY system that has an implementation of the Java > > VM. This includes any reasonable implementation of Unix (AFAIK). > > > > Many people use Cocoon 2 from the Apache project because it provides a > > ton of features, but you can use just the Fop program if you wish to. > > > > I use it both ways and have also used it from XML Spy. > > > > In Cocoon 2 you can run XSL transformations to produce an XSL:FO > > document and render this to one of a number of formats such as PDF, PS > > and RTF using the FopSerializer. > > > > I have also used Fop driven by a shell script. The memory footprint is > > smaller but you have to cart Fop around with you. From Cocoon, you can > > generate fancy-pants documents over the network. > > > > Cocoon has a much steeper and lengthy learning curve. Fop is much > > smaller and comes with lots of examples. > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, email: [EMAIL PROTECTED] > > > > --- > > Incoming mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/2002 > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.344 / Virus Database: 191 - Release Date: 02/04/2002 > > > > > > - > > 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]
Re: Multithreading FOP ?
I had an issue with multithreading but it was as a result of my code and not FOP. I have the Driver object as a global in my SOAP class, so it was getting detroyed because I had the class set to Application for its lifetime setting. Once I made Driver a local, created a new instance for each call, and passed it directly to my helper function, everything works fine. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "Jeremias Maerki" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 8:05 AM Subject: Re: Multithreading FOP ? > > could you precise the degree of threadsafeness ? > > I read about the problems with the image package, are there other areas ? > > I think that's the worst bug right now. There is another one, but I > can't find it anymore. > > > The possible use of FOP in WebSphere without any servlet is currently my > > interest. > > Sure, one could use some pessimistic concurrency implementation like monitor > > objects and other locks. > > > > Do people using FOP in a servlet environment have problems beside image > > stuff ? > I'm not using it in a servlet environment but I restricted our server to > process only one document at once because of these problems. > > Cheers, > Jeremias Märki > > mailto:[EMAIL PROTECTED] > > OUTLINE AG > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern > Tel. +41 41 317 2020 - Fax +41 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]
Re: Multithreaded failure
I moved the creation (and destruction) of the Driver object inside the method. Also I had forgotten that in Apache SOAP, you can control object lifetime. So I changed it from Application to Request, so now each request gets a fresh instance of my class. This works, but I'm not happy with it. My question is this, if I have a Driver object as a global inside my class, will it be trounced by another instance running in a different thread? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "Scott Moore" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 04, 2002 5:23 PM Subject: RE: Multithreaded failure > > Upon init (once in the servlet) > > // Gotta configure FOP to know where the base directory is. Otherwise > // it will generate errors. Add a trailing slash so we can use relative > // paths in our XSL. > org.apache.fop.configuration.Configuration.put("baseDir", "file:" + dir > + File.separator); > org.apache.fop.configuration.Configuration.put("strokeSVGText", new > Boolean(false)); > > > > Done for every report request: > > > public static void createPDF(Document xslfo, > OutputStream pdf) > throws IOException, FOPException > { > Driver driver = new Driver(new DocumentInputSource(xslfo), pdf); > > Hierarchy hierarchy = Hierarchy.getDefaultHierarchy(); > Logger log = hierarchy.getLoggerFor("fop"); > if (debugMode) > { > log.setPriority(Priority.DEBUG); > } > else > { > log.setPriority(Priority.FATAL_ERROR); > } > driver.setLogger(log); > driver.setRenderer(Driver.RENDER_PDF); > driver.run(); > pdf.flush(); > } > > > > HTH, > Scott > > -Original Message- > From: David B. Bitton [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 04, 2002 4:58 PM > To: [EMAIL PROTECTED] > Subject: Re: Multithreaded failure > > > Simply because it is at the top of my SOAP method. I don't think that there > is an init() called on a SOAP class. Also, do you instantiate a new Driver > object for every call to the servlet? I'd appreciate if you could share > some code. Thanks. > > - > 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: Multithreaded failure
Simply because it is at the top of my SOAP method. I don't think that there is an init() called on a SOAP class. Also, do you instantiate a new Driver object for every call to the servlet? I'd appreciate if you could share some code. Thanks. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "Scott Moore" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 04, 2002 4:43 PM Subject: RE: Multithreaded failure > Why are you reading the user configuration more than once? In my servlet, > which is multithreaded, I read the user configuration file once upon init. > I have no problems (except the occasional image error, which I catch and > regenerate the PDF when it happens) with concurrent PDF generation using > FOP. > > Scott > > -Original Message- > From: David B. Bitton [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 04, 2002 4:17 PM > To: fop-dev > Subject: Multithreaded failure > > You can see where the second thread enters because of the double entry for > "reading user configuration file", then the repeated failed starts. After > each "setting up fonts", is where the exception is being thrown. Just to > make sure, I am using Xalan from CVS, as per a suggestion from someone on > the Xalan list. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Multithreaded failure
List, I'm having a failure of FOP 0.20.3 while in a multithreaded environment. FOP is being called within the context of a SOAP RPC. As soon as I hit the process w/ a second thread, I start getting a FOPException "org.apache.fop.apps.FOPException: root must be root element". I am firing the SAX events directly into the FOPTreeBuilder by way the of the getContentHanlder() and a Xalan XML/XSLT transform. I set the log output to DEBUG, and here is a clip around the time of the failure: DEBUG 10179 [fop ] (): reading user configuration file INFO10179 [fop ] (): building formatting object tree DEBUG 10179 [fop ] (): setting up fonts INFO10179 [fop ] (): [1] DEBUG 10179 [fop ] (): Last page-sequence produced 1 pages. INFO10179 [fop ] (): [2] DEBUG 10179 [fop ] (): area contents overflows area DEBUG 10179 [fop ] (): area contents overflows area DEBUG 10179 [fop ] (): Last page-sequence produced 1 pages. INFO10179 [fop ] (): Parsing of document complete, stopping renderer DEBUG 10179 [fop ] (): Initial heap size: 43574Kb DEBUG 10179 [fop ] (): Current heap size: 43534Kb DEBUG 10179 [fop ] (): Total memory used: -40Kb DEBUG 10179 [fop ] (): Memory use is indicative; no GC was performed DEBUG 10179 [fop ] (): These figures should not be used comparatively DEBUG 10179 [fop ] (): Total time used: 921ms DEBUG 10179 [fop ] (): Pages rendererd: 2 DEBUG 10179 [fop ] (): Avg render time: 460ms/page DEBUG 10179 [fop ] (): reading user configuration file DEBUG 10179 [fop ] (): reading user configuration file INFO10179 [fop ] (): building formatting object tree DEBUG 10179 [fop ] (): setting up fonts INFO10179 [fop ] (): [1] DEBUG 10179 [fop ] (): Last page-sequence produced 1 pages. INFO10179 [fop ] (): [2] INFO10179 [fop ] (): [3] INFO10179 [fop ] (): building formatting object tree DEBUG 10179 [fop ] (): setting up fonts DEBUG 10179 [fop ] (): reading user configuration file INFO10179 [fop ] (): building formatting object tree DEBUG 10179 [fop ] (): setting up fonts DEBUG 10179 [fop ] (): reading user configuration file INFO10179 [fop ] (): building formatting object tree DEBUG 10179 [fop ] (): setting up fonts DEBUG 10179 [fop ] (): reading user configuration file INFO10179 [fop ] (): building formatting object tree DEBUG 10179 [fop ] (): setting up fonts You can see where the second thread enters because of the double entry for "reading user configuration file", then the repeated failed starts. After each "setting up fonts", is where the exception is being thrown. Just to make sure, I am using Xalan from CVS, as per a suggestion from someone on the Xalan list. Unfortunately my application relies on this working, so any help would be more than greatly appreciated. I'll be sure to reciprocate if you are ever in NYC. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
PDF viewing with IE 5.
Hi All,I recently started to use fop and came across the problem with IE notdisplaying the PDF. After looking around and checking other peoplessolutions it seems it was due to the filename extension required to be .pdfand the content-length header needed to be set. To get the content length Ineeded to buffer the output; and used a ChunkByteBuffer class to do this.This is instead of allocating a byte[] as the current FopServlet does. TheChunkByteBuffer class I have released as LGPL to be added to the FOP projector the embedded example so that others don't need to go through the samepain. :) I hope you find it useful for the project.This ChunkByteBuffer could be used in conjunction with checking the requestheaders for the type of browser being used by the client. If the browser isIE then use the buffer, otherwise stream directly. The buffer also uses astatic vector of free chunks so that data does not need to be reallocatedfor every buffer used. The free chunk vector currently only grows, andprobably needs some timed cleanup mechanism. If you implement this let meknow. You can find the code here:www.livemedia.com.au/ChunkByteBuffer.javaI don't have an example of how to use it as my current code uses lots ofexternal classes. It would go something like this in the FopServlet.javaexample.ChunkByteBuffer cbb = new ChunkByteBuffer();OutputStream bout = cbb.getOutputStream();Driver driver = new Driver( foFile, bout );driver.setRenderer( Driver.RENDER_PDF );driver.run();bout.close();response.addIntHeader( "Content-Length", cbb.length() );OutputStream out = response.getOutputStream();InputStream in2 = cbb.getInputStream();byte buffer[] = new byte[2048];while( (length = in2.read( buffer, 0, 2048)) > 0 ){ out.write( buffer, 0, length );}in2.close();out.close();To make sure files had a .pdf extension I used the mod_rewrite engine ofapache. My current test is using a static filename as follows:RewriteRule ^/fred.pdf$ /print/servlet/printServlet [P]If you find it useful in what you're doing or find any bugs let me know.Regards,David.PS I'm currently looking for some contract work.. anyone? :)
FOP in a multithreading environment
I am running FOP in a SOAP context. I have started to stress test my code. As soon as I enable a second thread hitting my SOAP server, FOP fails. I noticed rumbling in the mailing back around ver. 0.18.1 about thread safety. Is there something I should do, or is this still a bug in the code? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Keep two table rows together
I have a table with data that is "grouped" every two rows. The first row has data in cells, and the second row is a span, and it has additional info. How can I stop a page break between the two rows? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Problems with SAX pipeline
my code uses the following: transformer.transform( new DOMSource( doc ), new SAXResult( _driver.getContentHandler() )); and it works great. Lemme know if you'd like to see the rest. :) -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "J.Pietschmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 26, 2002 4:16 PM Subject: Re: Problems with SAX pipeline > Laurent Bihanic wrote: > > This application uses a SAX pipeline to apply an XSLT transformation > > (XML -> XSL-FO) and feed it into FOP's Driver directly through its > > ContentHandler. > > > > FOP does not display any error message but the generated PDF file is 2 > > KB shorter than when generated from the same FO document read from a > > file and Acrobat Reader complains that "the file is damaged and could > > not be repaired". > > No. > I suggest to check your SAX stream first whether all elements are > properly closed. Try to feed it as a SAXSource to an identity XSL > transformation (use TransformerFactory.newInstance().newTransformer()). > The serialized file will be always well-formed (the transformer > closes open elements for you) but you could check for suspicious > omissions at the end. > > > J.Pietschmann > > > - > 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: Rendering from a Document
Here's an update, and a potential bug. The NPE was actually resulting from an improper transformation of the XML. The Element object passed in by Apache SOAP needs to "promoted" to Document object status prior to being passes to the transform in a DOMSource object. This is accomplished with the follow: Transformer transformer = tFactory.newTransformer( new StreamSource( xsl_url ) ); DocumentBuilderFactory dBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = dBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.newDocument(); Node newNode = doc.importNode( element, true ); doc.appendChild( newNode ); transformer.transform( new DOMSource( doc ), new SAXResult( driver.getContentHandler() )); This produces a nice PDF. I notice that by doing this, I do not have to call the run() method, so therefore I'm assuming that this saves a step in the entire rendering process. Please correct me if I'm wrong, but am I to believe that the PDF is being rendered as the SAX events are being fired by the transformer? By this, it seems like this should save me alot of memory usage because I won't have to hold the XSL:FO output in an object. I am very happy with the way this is turning out. I promise an article on it as soon as I'm finished.y -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Code Made Fresh DailyT - Original Message - From: "Jeremias Maerki" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 22, 2002 10:49 AM Subject: Fw: Re: Rendering from a Document > Oops, that one didn't make it to the list at first. > > DOM (Document) should work. But using DOM to process a 400MB XML? You > wouldn't want to do that. Try to find a way to use SAX. You can fill SAX > events into FOP to create the FO tree. Maybe it helps us to provide you > with some pointers and ideas if you tell us what exactly you're trying > to do. > > > I'm sorry to post this again but I need help. Does passing a Document datatype to the Driver > > render() method work? I have to potential to move XML files in excess of 400MB and so I need to avoid as > > moving of data in memory as possible. > > Cheers, > Jeremias Märki > > mailto:[EMAIL PROTECTED] > > OUTLINE AG > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern > Tel. +41 41 317 2020 - Fax +41 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]
Re: Rendering from a Document
at java.lang.Thread.run(Thread.java:536) If anything, this is makes for good Google keyword searching. On Fri, Mar 22, 2002 at 05:59:26PM +0100, Jeremias Maerki wrote: > > I was just looking at the FOP API JavaDocs. Can I use getContentHanlder from the >Driver object, send that > > into the transformer wrapped in a SAXResults object? Will this populate FOP with >the required data to do > > the XSL:FO transform? > > You got it! That's just what I was about to suggest. > > > On Fri, Mar 22, 2002 at 11:22:12AM -0500, David B. Bitton wrote: > > > 1000/N > > > Status: O > > > X-Status: > > > X-Keywords: > > > X-UID: 600 > > > > > > Ok this is what I'm doing: > > > > > > I produce an XML file from data stored on a mainframe. The XML is generate in a >VB object. The XML is > > > passed up to an ASP page that makes a Low Level API SOAP call, using MSSOAP >Toolkit 2.0, to my PDF server. > > > The PDF server is running Tomcat 4/Apache SOAP 2.2. > > Concerning Apache SOAP 2.2: You might want to have a look at Axis > (http://xml.apache.org/axis) which is a floolow-on for SOAP 2.2. I think > I heard once that it is based on SAX rather than DOM. Haven't tested it, > though. > > > > > > > On the PDF server, I receive the XML as literalxml in the envelope, fetch a >stylesheet, pass the Element > > > object to a Xalan 2.3 transformer (wrapped in a DOMSource object), and then >transform the XML into XSL:FO > > > objects. > > > > > > Now I have a Document object that was returned from the transformer wrapped in a >DOMResults object. The > > > next step is where the problem lies. I want to pass the Document to a Driver, >but I get the dreaded > > > NullPointerException. > > > > > > Most of the time, the XML is will be small ( 5 - 7K), but there is a potention >for an account to have 5 to > > > 10 thousand transactions in a day, and we store up to 63 days of data (a single >transaction in XML is 594 > > > bytes, therefore a 630K transaction XML file would be 374MB, plus some extra >data at the top). So you can > > > see what I have the potential to deal with. > > > > > > What I don't even know is how FOP will handle this. The XSL:FO file is sure to >be much larger than 380MB. > > > I transformer a 6.66KB XML file and it produced a XSL:FO file of 16.2KB. If we >use that as a benchmark, > > > than the same 374MB would become 909.8MB. That's a whole lot of RAM, not to >mention what FOP is going to > > > use to store the rendered PDF. > > I hope you will be lucky. Some have reported that big documents work > well. Others were not so lucky. As long as there are not many references > in your documents you should get quite far. You can browse the archives. > There has been a number of discussions on this topic. > > > > I'm hoping that someone can poke a hole in these numbers (please), because this >is getting to look a whole > > > lot bigger than expected. Obviously performance and resource utilization are >major concernes (like when are > > > they not?). Obviously SAX for this would be faster because it wouldn't require >loading the entire XML > > > contents into memory. > > > > > > So, now is here the questions come in. Do I return from the transform a >SAXResults? Also, how do I > > > effectively handle the incoming XML into the SOAP method? I would prefer to >send the XML in literalxml > > > format so the < and > are HTML encoded (increasing the size of the content even >more). > > > > > > Where do I go from here? > > > > > > > > > On Fri, Mar 22, 2002 at 04:49:40PM +0100, Jeremias Maerki wrote: > > > > Oops, that one didn't make it to the list at first. > > > > > > > > DOM (Document) should work. But using DOM to process a 400MB XML? You > > > > wouldn't want to do that. Try to find a way to use SAX. You can fill SAX > > > > events into FOP to create the FO tree. Maybe it helps us to provide you > > > > with some pointers and ideas if you tell us what exactly you're trying > > > > to do. > > > > > > > > > I'm sorry to post this again but I need help. Does passing a Document >datatype to the Driver > > > > > render() method work? I have to potential to move XML files in excess of >400MB and so I need to avoid as > > > > > moving of data in memory as possible. > > Cheers, > Jeremias M?rki > > mailto:[EMAIL PROTECTED] > > OUTLINE AG > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern > Tel. +41 41 317 2020 - Fax +41 41 317 2029 > Internet http://www.outline.ch > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] -- David B. Bitton [EMAIL PROTECTED] Diversa ab illis virtute valemus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Rendering from a Document
Ok, I'm doing this: Transformer transformer = tFactory.newTransformer( new StreamSource( xsl_url ) ); transformer.transform( new DOMSource( source ), new SAXResult( driver.getContentHandler() )); and I'm getting javax.xml.transform.TransformerException: java.lang.NullPointerException. this is last point of execution in the stack trace: at org.apache.fop.fo.pagination.PageSequence.(PageSequence.java:144) Do you, or anyone know why this would be? Also, once this runs, do I call driver.run()? On Fri, Mar 22, 2002 at 05:59:26PM +0100, Jeremias Maerki wrote: > > I was just looking at the FOP API JavaDocs. Can I use getContentHanlder from the >Driver object, send that > > into the transformer wrapped in a SAXResults object? Will this populate FOP with >the required data to do > > the XSL:FO transform? > > You got it! That's just what I was about to suggest. > > > On Fri, Mar 22, 2002 at 11:22:12AM -0500, David B. Bitton wrote: > > > 1000/N > > > Status: O > > > X-Status: > > > X-Keywords: > > > X-UID: 600 > > > > > > Ok this is what I'm doing: > > > > > > I produce an XML file from data stored on a mainframe. The XML is generate in a >VB object. The XML is > > > passed up to an ASP page that makes a Low Level API SOAP call, using MSSOAP >Toolkit 2.0, to my PDF server. > > > The PDF server is running Tomcat 4/Apache SOAP 2.2. > > Concerning Apache SOAP 2.2: You might want to have a look at Axis > (http://xml.apache.org/axis) which is a floolow-on for SOAP 2.2. I think > I heard once that it is based on SAX rather than DOM. Haven't tested it, > though. > > > > > > > On the PDF server, I receive the XML as literalxml in the envelope, fetch a >stylesheet, pass the Element > > > object to a Xalan 2.3 transformer (wrapped in a DOMSource object), and then >transform the XML into XSL:FO > > > objects. > > > > > > Now I have a Document object that was returned from the transformer wrapped in a >DOMResults object. The > > > next step is where the problem lies. I want to pass the Document to a Driver, >but I get the dreaded > > > NullPointerException. > > > > > > Most of the time, the XML is will be small ( 5 - 7K), but there is a potention >for an account to have 5 to > > > 10 thousand transactions in a day, and we store up to 63 days of data (a single >transaction in XML is 594 > > > bytes, therefore a 630K transaction XML file would be 374MB, plus some extra >data at the top). So you can > > > see what I have the potential to deal with. > > > > > > What I don't even know is how FOP will handle this. The XSL:FO file is sure to >be much larger than 380MB. > > > I transformer a 6.66KB XML file and it produced a XSL:FO file of 16.2KB. If we >use that as a benchmark, > > > than the same 374MB would become 909.8MB. That's a whole lot of RAM, not to >mention what FOP is going to > > > use to store the rendered PDF. > > I hope you will be lucky. Some have reported that big documents work > well. Others were not so lucky. As long as there are not many references > in your documents you should get quite far. You can browse the archives. > There has been a number of discussions on this topic. > > > > I'm hoping that someone can poke a hole in these numbers (please), because this >is getting to look a whole > > > lot bigger than expected. Obviously performance and resource utilization are >major concernes (like when are > > > they not?). Obviously SAX for this would be faster because it wouldn't require >loading the entire XML > > > contents into memory. > > > > > > So, now is here the questions come in. Do I return from the transform a >SAXResults? Also, how do I > > > effectively handle the incoming XML into the SOAP method? I would prefer to >send the XML in literalxml > > > format so the < and > are HTML encoded (increasing the size of the content even >more). > > > > > > Where do I go from here? > > > > > > > > > On Fri, Mar 22, 2002 at 04:49:40PM +0100, Jeremias Maerki wrote: > > > > Oops, that one didn't make it to the list at first. > > > > > > > > DOM (Document) should work. But using DOM to process a 400MB XML? You > > > > wouldn't want to do that. Try to find a way to use SAX. You can fill SAX > > > > events into FOP to create the
Re: Fw: Re: Rendering from a Document
I was just looking at the FOP API JavaDocs. Can I use getContentHanlder from the Driver object, send that into the transformer wrapped in a SAXResults object? Will this populate FOP with the required data to do the XSL:FO transform? On Fri, Mar 22, 2002 at 11:22:12AM -0500, David B. Bitton wrote: > 1000/N > Status: O > X-Status: > X-Keywords: > X-UID: 600 > > Ok this is what I'm doing: > > I produce an XML file from data stored on a mainframe. The XML is generate in a VB >object. The XML is > passed up to an ASP page that makes a Low Level API SOAP call, using MSSOAP Toolkit >2.0, to my PDF server. > The PDF server is running Tomcat 4/Apache SOAP 2.2. > > On the PDF server, I receive the XML as literalxml in the envelope, fetch a >stylesheet, pass the Element > object to a Xalan 2.3 transformer (wrapped in a DOMSource object), and then >transform the XML into XSL:FO > objects. > > Now I have a Document object that was returned from the transformer wrapped in a >DOMResults object. The > next step is where the problem lies. I want to pass the Document to a Driver, but I >get the dreaded > NullPointerException. > > Most of the time, the XML is will be small ( 5 - 7K), but there is a potention for >an account to have 5 to > 10 thousand transactions in a day, and we store up to 63 days of data (a single >transaction in XML is 594 > bytes, therefore a 630K transaction XML file would be 374MB, plus some extra data at >the top). So you can > see what I have the potential to deal with. > > What I don't even know is how FOP will handle this. The XSL:FO file is sure to be >much larger than 380MB. > I transformer a 6.66KB XML file and it produced a XSL:FO file of 16.2KB. If we use >that as a benchmark, > than the same 374MB would become 909.8MB. That's a whole lot of RAM, not to mention >what FOP is going to > use to store the rendered PDF. > > I'm hoping that someone can poke a hole in these numbers (please), because this is >getting to look a whole > lot bigger than expected. Obviously performance and resource utilization are major >concernes (like when are > they not?). Obviously SAX for this would be faster because it wouldn't require >loading the entire XML > contents into memory. > > So, now is here the questions come in. Do I return from the transform a SAXResults? > Also, how do I > effectively handle the incoming XML into the SOAP method? I would prefer to send >the XML in literalxml > format so the < and > are HTML encoded (increasing the size of the content even >more). > > Where do I go from here? > > > On Fri, Mar 22, 2002 at 04:49:40PM +0100, Jeremias Maerki wrote: > > Oops, that one didn't make it to the list at first. > > > > DOM (Document) should work. But using DOM to process a 400MB XML? You > > wouldn't want to do that. Try to find a way to use SAX. You can fill SAX > > events into FOP to create the FO tree. Maybe it helps us to provide you > > with some pointers and ideas if you tell us what exactly you're trying > > to do. > > > > > I'm sorry to post this again but I need help. Does passing a Document >datatype to the Driver > > > render() method work? I have to potential to move XML files in excess of 400MB >and so I need to avoid as > > > moving of data in memory as possible. > > > > Cheers, > > Jeremias M?rki > > > > mailto:[EMAIL PROTECTED] > > > > OUTLINE AG > > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern > > Tel. +41 41 317 2020 - Fax +41 41 317 2029 > > Internet http://www.outline.ch > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, email: [EMAIL PROTECTED] > > -- > > David B. Bitton > [EMAIL PROTECTED] > > Diversa ab illis virtute valemus. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] -- David B. Bitton [EMAIL PROTECTED] Diversa ab illis virtute valemus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Fw: Re: Rendering from a Document
Ok this is what I'm doing: I produce an XML file from data stored on a mainframe. The XML is generate in a VB object. The XML is passed up to an ASP page that makes a Low Level API SOAP call, using MSSOAP Toolkit 2.0, to my PDF server. The PDF server is running Tomcat 4/Apache SOAP 2.2. On the PDF server, I receive the XML as literalxml in the envelope, fetch a stylesheet, pass the Element object to a Xalan 2.3 transformer (wrapped in a DOMSource object), and then transform the XML into XSL:FO objects. Now I have a Document object that was returned from the transformer wrapped in a DOMResults object. The next step is where the problem lies. I want to pass the Document to a Driver, but I get the dreaded NullPointerException. Most of the time, the XML is will be small ( 5 - 7K), but there is a potention for an account to have 5 to 10 thousand transactions in a day, and we store up to 63 days of data (a single transaction in XML is 594 bytes, therefore a 630K transaction XML file would be 374MB, plus some extra data at the top). So you can see what I have the potential to deal with. What I don't even know is how FOP will handle this. The XSL:FO file is sure to be much larger than 380MB. I transformer a 6.66KB XML file and it produced a XSL:FO file of 16.2KB. If we use that as a benchmark, than the same 374MB would become 909.8MB. That's a whole lot of RAM, not to mention what FOP is going to use to store the rendered PDF. I'm hoping that someone can poke a hole in these numbers (please), because this is getting to look a whole lot bigger than expected. Obviously performance and resource utilization are major concernes (like when are they not?). Obviously SAX for this would be faster because it wouldn't require loading the entire XML contents into memory. So, now is here the questions come in. Do I return from the transform a SAXResults? Also, how do I effectively handle the incoming XML into the SOAP method? I would prefer to send the XML in literalxml format so the < and > are HTML encoded (increasing the size of the content even more). Where do I go from here? On Fri, Mar 22, 2002 at 04:49:40PM +0100, Jeremias Maerki wrote: > Oops, that one didn't make it to the list at first. > > DOM (Document) should work. But using DOM to process a 400MB XML? You > wouldn't want to do that. Try to find a way to use SAX. You can fill SAX > events into FOP to create the FO tree. Maybe it helps us to provide you > with some pointers and ideas if you tell us what exactly you're trying > to do. > > > I'm sorry to post this again but I need help. Does passing a Document >datatype to the Driver > > render() method work? I have to potential to move XML files in excess of 400MB >and so I need to avoid as > > moving of data in memory as possible. > > Cheers, > Jeremias M?rki > > mailto:[EMAIL PROTECTED] > > OUTLINE AG > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern > Tel. +41 41 317 2020 - Fax +41 41 317 2029 > Internet http://www.outline.ch > > > ----- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] -- David B. Bitton [EMAIL PROTECTED] Diversa ab illis virtute valemus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[david@codenoevil.com: Rendering from a Document]
--- Begin Message --- List, I'm sorry to post this again but I need help. Does passing a Document datatype to the Driver render() method work? I have to potential to move XML files in excess of 400MB and so I need to avoid as moving of data in memory as possible. Please send help. :) -- David B. Bitton [EMAIL PROTECTED] Diversa ab illis virtute valemus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] --- End Message ---
NPE on Driver.render(Document)
--WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I noticed some unanswered questions in the archives in regards to driver.re= nder(Document) throwing a NullPointerException. Why is this? I read a workaround, but I like to know if the straight forwa= rd method works. Thanks. :) --=20 David B. Bitton [EMAIL PROTECTED] Diversa ab illis virtute valemus. --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature Content-Disposition: inline -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8l7lmMNOMzNRRk50RAiOJAJ4jClevJtMFIt++LE095gQy5v9jJgCgjn62 oO4zXGHTKIs82ss87yaPYbE= =cXoq -END PGP SIGNATURE- --WIyZ46R2i8wDzkSu--
NPE from Driver.render(Document)
I noticed some unanswered questions in the archives in regards to driver.render(Document) throwing a NullPointerException. Why is this? I read a workaround, but I like to know if the straight forward method work. Thanks. :) -- David B. Bitton [EMAIL PROTECTED] Diversa ab illis virtute valemus. msg06018/pgp0.pgp Description: PGP signature
Re: svg content not compiling
Not sure if this is related, but do you have any AWT support on your Linux box? On an iSeries or AS/400 system I have to run a version of X-windows and a package that supplies native AWT support. I believe that the PJA package works on Linux systems. You can find out more about PJA at: http://www.eteks.com/pja/en/ David Morris >>> [EMAIL PROTECTED] 03/13/02 08:16AM >>> I have complied an xml file with an xsl file containing svg content on my windows mechine and it works fine... but when i compile the same files on my linux mechine with the same distribution of fop (0.20.3) it crashes: Exception in thread "main" java.lang.NoClassDefFoundError at org.apache.fop.svg.SVGElement.init(SVGElement.java:197) at org.apache.fop.svg.SVGElement.(SVGElement.java:84) It seems to be the classpath issue involving batik.jar. I have all of the needed .jar files located in JAVA_HOME/jre/lib/ext/. What else do i need to try in order to solve this problem. I also need to solve this for tomcat (FopServlet runs fine as long as there is no svg elements) Thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: userconfig.xml
--cvVnyQ+4j833TQvp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable So, then would that be JAVA_HOME? When I checked user.dir, i got c:\winnt\= system32. On Tue, Mar 12, 2002 at 08:55:22AM +0100, Beer, Christian wrote: > > Yeah. If I try File file =3D new File("userconfig.xml"), where=20 > > is it looking > > relative to the class file requesting the file? > >=20 > No, he is looking relative to the path you started java from. >=20 > Greets,=20 > Christian >=20 > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] --=20 David B. Bitton [EMAIL PROTECTED] Diversa ab illis virtute valemus. --cvVnyQ+4j833TQvp Content-Type: application/pgp-signature Content-Disposition: inline -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8jnY7MNOMzNRRk50RAqc/AKCz/pMMwvbecfU0Ptx5kwpuFEACHQCfWlN+ kddSonvUQEmcYSz1lYfCrhc= =LLT3 -END PGP SIGNATURE- --cvVnyQ+4j833TQvp--
Re: userconfig.xml
Revelation: Now I know why System.getProperties("user.dir") == "c:\windows\system32", because that's where the Tomcat NT service must start from (not to mention the java.exe that's in that folder also). Hmm, what to do? Ok, so how can I have a not so relative path? Conundrum: How can I gain access to configuration info that resides in the web.xml file for the SOAP servlet that calls my class, that in turn calls FOP? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Beer, Christian" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 12, 2002 2:55 AM Subject: AW: userconfig.xml > > Yeah. If I try File file = new File("userconfig.xml"), where > > is it looking > > relative to the class file requesting the file? > > > No, he is looking relative to the path you started java from. > > Greets, > 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: FW: [iText-questions] Re: merging two libraries
Absolutely. In fact, I am using iText to do just that, encryption. iText has a PDFReader class that take a byte[] array for the constructor. ... PdfReader reader = new PdfReader(out.toByteArray()); ... goto to http://www.lowagie.com/iText/tutorial/ch01.html#readingPDF and check out the http://www.lowagie.com/iText/examples/Encrypt.java sample. If you check the API JavaDocs, you can see how you can adapt the sample to use the PdfReader constructor i noted earlier. :) -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Matt Savino" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 12, 2002 8:32 AM Subject: Re: FW: [iText-questions] Re: merging two libraries > Is it possible to use iText for post-FOP processing like encryption or > adding conditional text based on page breaks? > > "New, Cecil (GEAE)" wrote: > > > > My suggestion was *not* to merge the two! > > > > iText is a Java API with a document creation focus. In this day and age, > > XSL:FO can be viewed as just another document type - in the same way that > > more proprietary or older formats are (that is, PDF, RTF, etc.). > > > > Now XSL:FO is different in that you can't just double click on one and see > > something. But the FOP project comes close. > > > > Making iText (optionally) output xsl:fo would greatly extend its potential > > applications and make it squarely standards based. > > > > I would like to think that someday, StarOffice, Wordperfect, etc. would > > either natively use xsl:fo as their file storage format or at least be able > > to import it. > > > > Having something like iText that *programatically* create documents is very > > exciting! > > > > -Original Message- > > From: Keiron Liddle [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, March 12, 2002 3:53 AM > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > Subject: [iText-questions] Re: merging two libraries > > > > Hi, > > > > From the archives it appears that the discussion on the fop-dev list was > > about 2 years ago (no apparent refusal though). It is certainly time to > > revisit. > > > > From the small amount of information I know about iText it would appear > > to be a more advanced pdf library. > > I don't know what the license issues might be. > > > > What sort of joining forces are you proposing? > > > > Please send to the fop-dev list for further discussion. > > > > Regards, > > Keiron. > > > > On 2002.03.12 09:27 [EMAIL PROTECTED] wrote: > > > Hello all, > > > > > > I'm not familiar with FOP, but I can't help noticing > > > that people are moving from FOP to iText and vice versa. As original > > > developer of iText, a JAVA-PDF library, I already > > > proposed you guys at Apache twice to join forces and to combine > > > both libraries. I now subscribe to this mailing list only to > > > ask you a third time to reconsider your refusal. Please read these mails > > > from some iText/FOP users: > > > http://www.geocrawler.com/lists/3/SourceForge/8175/0/8071577/ > > > > > http://www.mail-archive.com/itext-questions%40lists.sourceforge.net/msg00491 > > > > > .html Please send your answers to the iText mailing list. > > > You don't need to subscribe, I will pass them through. > > > Remark: sorry, but due to the lack of time to read all > > > my mail as it is, I will now unsubscribe from the FOP > > > mailing list. kind regards, > > > Bruno Lowagie > > > > ___ > > iText-questions mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > - > > 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]
Re: Error with 20.0.3!
Snipped from CHANGES in the 0.20.3 distro: ... - Changed "master-name" to "master-reference" on fo:page-sequence, fo:single-page-master-reference, fo:repeatable-page-master-reference and fo:conditional-page-master-reference to comply with the latest XSL recommendation. Also changed the unimplemented property space-treatment to white-space-treatment and updated examples and tests to use the new syntax. ... You need to update you XSL-FO to reflect this change in the code. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Klosa Uwe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 12, 2002 5:29 AM Subject: Error with 20.0.3! > With 20.0.2 all pages worked fine, but now I'm getting the following error: > > org.apache.fop.apps.FOPException: 'master-reference' for > 'fo:page-sequence'matches no 'simple-page-master' or 'page-sequence-master' > at > org.apache.fop.fo.pagination.PageSequence.getNextPageMaster(PageSequence.jav > a:532) > at > org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:334) > at > org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:268) > at > org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:200) > at > org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:182) > at > org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:463) > at org.apache.fop.apps.Driver.render(Driver.java:481) > at org.apache.fop.apps.Driver.render(Driver.java:501) > at > diva.xml.xsql.serializers.XSQLFOP203Serializer.serialize(XSQLFOP203Serialize > r.java:43) > at > oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:282) > at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application > FilterChain.java:247) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh > ain.java:193) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja > va:243) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja > va:190) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > at > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 > 46) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 > ) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > at > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. > java:170) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 > ) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java > :174) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:429) > at > org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:495) > at java.lang.Thread.run(Thread.java:536) > > This is my stylesheet: > > > http://www.w3.org/1999/XSL/Transform"; >
Re: [ANNOUNCEMENT] Fop 0.20.3 released
I notice the timestamp on the files is 3/4. Is that right, because that means I already have code made fresh daily. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Christian Geisert" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, March 11, 2002 6:02 PM Subject: [ANNOUNCEMENT] Fop 0.20.3 released > Doh, sorry for the previous mail (don't know what happened..) > > > Hi all, > > just in case someone hasn't noticed yet ;-) > > > FOP 0.20.3 is finally available at http://xml.apache.org/dist/fop > for downloading. > > The main reason for this release is the conformance to the XSL-FO > Version 1.0 W3C Recommendation. Other changes include: > > - support for CMYK and embedded ICC profiles in jpeg images > - support for EPS images > - improved font encodings for native (Acrobat) fonts > - i18n improvments for AWT viewer > - support for letter-spacing > - Polish, Greek, and Hungarian hyphenation > - and of course a lot of bugfixes... > > > Changes from previous Release Candidate (rc2): > - added missing japanese resource for AWT viewer > - fixed Markers > - updated logkit from 1.0b4 to 1.0 > > > Enjoy, > 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: Acrobat 5.0 Error
Do your documents employ any encryption? Also, why aren't you opening the new window with the url to the servlet in the first place? Also, I'm confused as to the use of the cookie (personnaly, i'm fond of cookie monster myself). I can see that you are "serving" the pdf from within the servlet. Try, just for kicks, saving it to disk, and then sending down that Jscript. If anything, I'd be curious to see what happens. I code web for a living, so, any questions, feel free... -- David B. Bitton[EMAIL PROTECTED]www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: Rachael Blank To: '[EMAIL PROTECTED]' Sent: Monday, March 11, 2002 5:22 PM Subject: RE: Acrobat 5.0 Error David, Thank you for the advice. We are handling the PDFs a little differently, however, and are running on Apache. In the JSP file that displays content in the browser, we have the following link within a form named documentmanagementsearchnavigation: Here is the batchPrintDocument function in the javascript file: function batchPrintDocument( form ) { var option = "HEIGHT=400,WIDTH=700,scrollbars=1,status=1,menubar=1"; newWindow = window.open("BatchPrint.html", "BatchPrintDocumentWindow", option); result = getCookieData(); if (result == "") { result = 0; document.cookie = "app=" + result; } else { result = parseInt(result) + 1; document.cookie = "app=" + result; } var source = "Servlet?actiontotake=batchprintdocument.pdf&cookie="+result; newWindow.location = source; newWindow.focus(); return false; } We define the batchprintdocument.pdf action in the Servlet. The batch function in the servlet actually builds one large document that consists of many smaller documents. For instance, a user can print one individual report or click on the batch print icon to print all of the reports. She is able to print one doc OK, but receives the error when printing batch printing all documents even when there is only 1 or 2 docs to be batch printed. This feature is working well, except on her computer. We suspect it is her configuration. Thanks again!! Rachael -Original Message-From: David B. Bitton [mailto:[EMAIL PROTECTED]]Sent: Monday, March 11, 2002 4:22 PMTo: [EMAIL PROTECTED]Subject: Re: Acrobat 5.0 Error How is the PDF being served to the user? Is it coming from an ASP page and being Response.BinaryWrite'ed? The best work around that I'm using for this problem is this: I persist the file on the server, then send this to the browser: </FONT></DIV> <DIV><FONT size=2><!--</FONT></DIV> <DIV><FONT size=2> window.location.href='<%=path%>'</FONT></DIV> <DIV><FONT size=2>//--></FONT></DIV> <DIV><FONT size=2> This way, IE will go fetch the file itself. If you are using IIS, save the docs in their own folder, then go into the IIS setting, and enable content expiration (it's on the HTTP Headers tab) just for that folder and set it to expire immediately. If you don't do this, IE will keep pulling the PDF from it's cache if you re-use filenames. :) -- David B. Bitton[EMAIL PROTECTED]www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: Rachael Blank To: '[EMAIL PROTECTED]' Sent: Monday, March 11, 2002 3:28 PM Subject: Acrobat 5.0 Error Hello! Thanks in advance for your time and help. I know this is not exactly an FOP issue, but will be very helpful to the folks who are already in a production environment. I have a user running WIN NT and views FOP-generated PDFs in Acrobat 5.0 within Internet Explorer. When she opens the PDF, she receives the error: File does not begin with :%PDF... She receives a dialog box then clicks OK and gets a blank screen. In our offices, we are able to view the same documents in Acrobat 5.0 with no problem. At this time, I think it is a problem on the user's PC. I am hoping someone has seen this type of problem before. I am able to see that, on my computer, the PDF starts with :%PDF. Why is her Acrobat interpreting it differently? Thanks! Rachael P.S. I also had her try the option to NOT view it in the browser. I had no success with this either.
Re: Acrobat 5.0 Error
How is the PDF being served to the user? Is it coming from an ASP page and being Response.BinaryWrite'ed? The best work around that I'm using for this problem is this: I persist the file on the server, then send this to the browser: </FONT></DIV> <DIV><FONT size=2><!--</FONT></DIV> <DIV><FONT size=2> window.location.href='<%=path%>'</FONT></DIV> <DIV><FONT size=2>//--></FONT></DIV> <DIV><FONT size=2> This way, IE will go fetch the file itself. If you are using IIS, save the docs in their own folder, then go into the IIS setting, and enable content expiration (it's on the HTTP Headers tab) just for that folder and set it to expire immediately. If you don't do this, IE will keep pulling the PDF from it's cache if you re-use filenames. :) -- David B. Bitton[EMAIL PROTECTED]www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: Rachael Blank To: '[EMAIL PROTECTED]' Sent: Monday, March 11, 2002 3:28 PM Subject: Acrobat 5.0 Error Hello! Thanks in advance for your time and help. I know this is not exactly an FOP issue, but will be very helpful to the folks who are already in a production environment. I have a user running WIN NT and views FOP-generated PDFs in Acrobat 5.0 within Internet Explorer. When she opens the PDF, she receives the error: File does not begin with :%PDF... She receives a dialog box then clicks OK and gets a blank screen. In our offices, we are able to view the same documents in Acrobat 5.0 with no problem. At this time, I think it is a problem on the user's PC. I am hoping someone has seen this type of problem before. I am able to see that, on my computer, the PDF starts with :%PDF. Why is her Acrobat interpreting it differently? Thanks! Rachael P.S. I also had her try the option to NOT view it in the browser. I had no success with this either.
Re: userconfig.xml
Yeah. If I try File file = new File("userconfig.xml"), where is it looking relative to the class file requesting the file? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Carlos Daniel Schafer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 11, 2002 2:10 PM Subject: RE: userconfig.xml > Hi > > Are you locate the relative path for userconfig.xml? > > > -Mensaje original- > > De: Polly Tsang [SMTP:[EMAIL PROTECTED]] > > Enviado el: domingo, 10 de marzo de 2002 22:24 > > Para: [EMAIL PROTECTED] > > Asunto: Re: userconfig.xml > > > > Yes, Thank you so much. > > At 10:47 AM 2002/3/8 -0500, you wrote: > > >In the context of a servlet, where would I place userconfig.xml file > > >relative to the webapps dir, and what path would I use to retrieve the > > file. > > >According to java.io API JavaDoc file, a relative path is relative to the > > >user's home dir. Would I actually have to say: > > > > > >File file = new File("c:\tomcat4\webapps\soap\WEB-INF\userconfig.xml") > > > > > >or something like: > > > > > >File file = new File("userconfig.xml") > > > > > >Any ideas? I need the config file because it has font info in it. > > > > > >-- > > > > > >David B. Bitton > > >[EMAIL PROTECTED] > > >www.codenoevil.com > > > > > >Diversa ab illis virtute valemus. > > >- Original Message - > > >From: "Peter B. West" <[EMAIL PROTECTED]> > > >To: <[EMAIL PROTECTED]> > > >Sent: Friday, March 08, 2002 12:49 AM > > >Subject: Re: userconfig.xml > > > > > > > > > > Polly, > > > > > > > > You are not the first, nor will you be the last, to be thrown by this. > > > > All of the work of the Options object is done in the constructor. > > You > > > > don't have to do anything more with it. It sets up a lot of static > > > > data, accessible by static methods, in a Configuration class. Have a > > > > look at org.apache.fop.configuration.Configuration for the access > > > > methods. Look at the example config.xml and userconfig.xml in > > > > xml-fop/conf to see what sort of data is stored in there. > > > > > > > > Hmm This seems to crop up a bit. Maybe something like a static > > > > Options.configure() would be less confusing for an essentially static > > > > operation. > > > > > > > > Peter > > > > > > > > Polly Tsang wrote: > > > > > > > > > Hi all, > > > > > > > > > > How can I use userconfig in embedding servlet programs? > > > > > > > > > > I don't understand the following 2 statements that included in > > > > > xml.apache.org web page. Could someone give a brief sample code > > about > > > > > this? > > > > > > > > > > userConfigFile = new File(userConfig); > > > > >options = new Options(userConfigFile); > > > > > > > > > > Thanks you so much!!! > > > > > > > > > > Regards, > > > > > Polly > > > > > > > > > > > > - > > > > > 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] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
HowTo Render PDF from XML string and XSL file
I have spent some time looking at the embedding sample, and I have some questions. I have successfully implemented FOP as a WebService having the XSL-FO data posted to the service and the service rendering the file onto the local machine. Now I want to do the XML/XSL to XSL-FO transform in the WebService. I noticed that the transform occurs in the XSLInputHandler. This then allows for an InputSource and XMLReader to be available to the Driver.render() overloaded method. The unfortunate part is the XSLInputHandler constructor only takes File object, no stream. I'd like to avoid bouncing the XML data off the disk just to statisfy this requirement for using XSLInputHandler. So, my question is this, how can I arrive at the same results, an InputSource and an XMLReader interfaced object for Driver.render()? Or better yet, what I'm asking is what is going on inside XSLInputHandler that I can slurp out into my code. Tx :) -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Problems using
I'm using BankOne and all I'm getting is a blue underlined word, and not a link. This was working when I was using XEP from RenderX. I'm using 0.20.3. Also, I setup FOP as a WebService (Apache SOAP). Let me know what is the correct forum to post the code. It runs on either Linux or MS for the server part, and my client is MS. -- David B. Bitton[EMAIL PROTECTED]www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Dunning, John" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 08, 2002 1:26 PM Subject: RE: Problems using > There was a post on this a while back; I can't remember all the specifics,> but it appears that borders and/or padding was adding up. When I changed my> 'padding-after="5mm"' to 'space-after="5mm"', the problem disappeared.> > HTH,> John> > -Original Message-> From: Roland [mailto:[EMAIL PROTECTED]]> Sent: Friday, March 08, 2002 1:08 PM> To: [EMAIL PROTECTED]> Subject: Problems using > > > Hello,> I'm using > to point to a webpage. Now, when I convert it to a PDF document I see the > following problem:> www.google.com" > indicate-destination="true" font-style="normal" color="blue" > font-size="8pt">Click here to search the web> > When I put the mouse over the text that has the link attached to("Click > here to search the web"). The mouse pointer doesn't change. It only changes > when I move it a little ABOVE the linked text. After it changed to a little > finger I can click it and it will open the webpage. I also notice that when > I click, a little box over the text turns black. The size of the box is > always the size of the word that is below it. You have to try this out > urself to see what I mean. I will try to describe it here:> > [X]> Click here to search the web> > So the mouse only changes when I point it above the text. If I'm over the > word "search" the marked area([X]) will turn black temporarily. The > area that turns black always is the size of the underlying word.> What is going on here? It seems that Fop is having a problem with the > referenced area? The link sensitive area seems to be displaced in relation > to the corresponding text.> Is this a bug?> I'm using fop-0.20.2.> Has this been fixed in fop-0.20.3 ?> > Thanks for any help,> Roland> > > -> 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: userconfig.xml
In the context of a servlet, where would I place userconfig.xml file relative to the webapps dir, and what path would I use to retrieve the file. According to java.io API JavaDoc file, a relative path is relative to the user's home dir. Would I actually have to say: File file = new File("c:\tomcat4\webapps\soap\WEB-INF\userconfig.xml") or something like: File file = new File("userconfig.xml") Any ideas? I need the config file because it has font info in it. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Peter B. West" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 08, 2002 12:49 AM Subject: Re: userconfig.xml > Polly, > > You are not the first, nor will you be the last, to be thrown by this. > All of the work of the Options object is done in the constructor. You > don't have to do anything more with it. It sets up a lot of static > data, accessible by static methods, in a Configuration class. Have a > look at org.apache.fop.configuration.Configuration for the access > methods. Look at the example config.xml and userconfig.xml in > xml-fop/conf to see what sort of data is stored in there. > > Hmm This seems to crop up a bit. Maybe something like a static > Options.configure() would be less confusing for an essentially static > operation. > > Peter > > Polly Tsang wrote: > > > Hi all, > > > > How can I use userconfig in embedding servlet programs? > > > > I don't understand the following 2 statements that included in > > xml.apache.org web page. Could someone give a brief sample code about > > this? > > > > userConfigFile = new File(userConfig); > >options = new Options(userConfigFile); > > > > Thanks you so much!!! > > > > Regards, > > Polly > > > > - > > 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]
Re: java.util.HashMap to com.sun.java.util.collections.HashMap
Ok, idea be gone. I'm going back to my original idea, SOAP. Tx. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Art Welch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 07, 2002 1:18 PM Subject: RE: java.util.HashMap to com.sun.java.util.collections.HashMap > Prior versions of FOP used to support JDK 1.1 (with reduced functionality). > However some time back, JDK 1.1 support was dropped. I have not looked at > this in a while, but I suspect that HashMap may be the least of the > problems. I suspect that supporting JDK 1.1 with the current FOP would > require dropping image and SVG support as well as significant coding > changes. > > FOP has come a long way since the last version that supported JDK 1.1, so it > would probably make a lot more sense to apply your efforts to getting a JDK > 1.2+ environment for your COM DLL. > > But if you are doing with FOP does not require the latest and greatest FOP. > There should be an old version of FOP around somewhere. I think (but am not > sure) that 0.19.1 may have been the last (or one of the last) versions to > support JDK 1.1. May require a rebuild. The build script had an option to > build for JDK 1.1 (IIRC it was package_jdk11 or something like that). > > Art > > -Original Message- > From: David B. Bitton [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 07, 2002 11:43 AM > To: fop-dev > Subject: java.util.HashMap to com.sun.java.util.collections.HashMap > > > Has it come up where anyone has attempted to use FOP w/ JDK 1.1. The is no > HashMap class. Sun has made available the collections classes for use in > 1.1. This requires changing every import of java.util.HashMap to > com.sun.java.util.collections.HashMap. I plan on doing this on my copy of > the codebase, because I am rolling FOP up into a COM DLL for use from an ASP > page, and J++ (the only way to build a COM DLL, as far as I know) uses 1.1. > > Any thoughts? > > -- > > David B. Bitton > [EMAIL PROTECTED] > www.codenoevil.com > > Diversa ab illis virtute valemus. > > > - > 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]
Re: java.util.HashMap to com.sun.java.util.collections.HashMap
There are number of ways to make Java available across COM, but as far as i can tell, they all use the local VM that's installed on the machine, and it needs to be running. This way, it's compiled into the DLL, along with _all_ of the other classes that are used (from xalan, etc.). I just d/l'ed the latest CVS snapshot, and the build breaks on: [javac] E:\xml-fop\build\src\org\apache\fop\svg\PDFGraphics2D.java:1196: nested class org.apache.fop.svg.PDFGraphics2D. PDFGraph icsConfiguration is an abstract class. It can't be instantiated. [javac] return new PDFGraphicsConfiguration(); [javac]^ [javac] E:\xml-fop\build\src\org\apache\fop\svg\PDFGraphics2D.java:1203: nested class org.apache.fop.svg.PDFGraphics2D. PDFGraph icsConfiguration must be declared abstract. It does not define java.awt.image.VolatileImage createCompatibleVolatileImage(int, int) from class java.awt.GraphicsConfiguration. [javac] static class PDFGraphicsConfiguration extends GraphicsConfiguration { [javac] ^ [javac] 2 errors, 1 warning does anyone know why this is? I am using all of the latest version of the dependent libraries, Xalan, Xerces, etc. I wanted to make sure I could build the classes before I started the search and destroy mission to find java.util.HashMap. Help? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Nicola Ken Barozzi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 07, 2002 12:08 PM Subject: Re: java.util.HashMap to com.sun.java.util.collections.HashMap > From: "David B. Bitton" <[EMAIL PROTECTED]> > > > Has it come up where anyone has attempted to use FOP w/ JDK 1.1. The is > no > > HashMap class. Sun has made available the collections classes for use in > > 1.1. This requires changing every import of java.util.HashMap to > > com.sun.java.util.collections.HashMap. I plan on doing this on my copy of > > the codebase, because I am rolling FOP up into a COM DLL for use from an > ASP > > page, and J++ (the only way to build a COM DLL, as far as I know) uses > 1.1. > > You can use also the java-plugin (IIRC) to make java objects used as OCXs. > There is also a project on IBM alphaworks, and one on Sun javasoft to make > EJBs used in such a way. > > Maybe these can help. > > -- > Nicola Ken Barozzi [EMAIL PROTECTED] > - verba volant, scripta manent - >(discussions get forgotten, just code remains) > - > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Missing src
Maybe I'm missing something, but fop-0.20.3-src.tar.gz has no source in it, just .class files. Ok, what's the trick? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
java.util.HashMap to com.sun.java.util.collections.HashMap
Has it come up where anyone has attempted to use FOP w/ JDK 1.1. The is no HashMap class. Sun has made available the collections classes for use in 1.1. This requires changing every import of java.util.HashMap to com.sun.java.util.collections.HashMap. I plan on doing this on my copy of the codebase, because I am rolling FOP up into a COM DLL for use from an ASP page, and J++ (the only way to build a COM DLL, as far as I know) uses 1.1. Any thoughts? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
To re-direct or not to re-direct
Perhaps not the correct forum for this question, but do I have to redirect Tomcat through IIS/Apache or can I serve my servlet direct from Tomcat? -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Encryption
Would you be so graceous as to share the code you use to do this? I am quite new to Java, so I could use the leg up. Tx :) -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Manuel Mall" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 06, 2002 9:51 PM Subject: RE: Encryption > David, > > You are correct both solutions are post processing type solutions, ie. it is > an additional step after the XSL-FO -> PDF conversion. I am pretty certain > FOP, in its current version, cannot do it. The question for you is if you > can modify your PDF server to perform this additional step, eg. first > produce a temporary PDF file on disk using FOP and then call for example the > pdcat tool to copy the temporary PDF file to its permanent home and apply > the encryption while doing it. This is how we do it here within a Tomcat > hosted servlet. > > Manuel > > -Original Message- > From: David B. Bitton [mailto:[EMAIL PROTECTED]] > Sent: Thursday, 7 March 2002 10:41 > To: [EMAIL PROTECTED] > Subject: Re: Encryption > > > I quickly looked at iText, and that is not a XSL-FO -> PDF engine. > RenderX's XEP Java app does do encryption, but they are not a viable option > for us. Where in the FOP process could we hotwire some encryption? > > Also, the command line app won't work because we want the write the file > directly to disk for immediate availability to the browser. The creating of > the PDF will be the result of a SOAP call to our PDF server, posting the > XSL-FO data. > > -- > > David B. Bitton > [EMAIL PROTECTED] > www.codenoevil.com > > Diversa ab illis virtute valemus. > - Original Message - > From: "Manuel Mall" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, March 06, 2002 8:17 PM > Subject: RE: Encryption > > > > To apply encryption to FOP generated PDF files we post process the files > > with a command line tool called pdcat from a PDF tools set available from > > http://pdf.glance.ch. > > > > If you are looking for an all Java solution I believe iText from > > http://www.lowagie.com/iText/ also allows encryption (but no decryption). > > > > Manuel > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, 7 March 2002 2:57 > > To: fop-dev > > Subject: Encryption > > > > > > What is involved in encrypting the outputted PDF? Is this something that > is > > simple to implement? If someone can point me in the right direction, I'd > > appreciate it. :) > > > > -- > > > > David B. Bitton > > [EMAIL PROTECTED] > > www.codenoevil.com > > > > Diversa ab illis virtute valemus. > > > > > > - > > 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] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Encryption
I quickly looked at iText, and that is not a XSL-FO -> PDF engine. RenderX's XEP Java app does do encryption, but they are not a viable option for us. Where in the FOP process could we hotwire some encryption? Also, the command line app won't work because we want the write the file directly to disk for immediate availability to the browser. The creating of the PDF will be the result of a SOAP call to our PDF server, posting the XSL-FO data. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Manuel Mall" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 06, 2002 8:17 PM Subject: RE: Encryption > To apply encryption to FOP generated PDF files we post process the files > with a command line tool called pdcat from a PDF tools set available from > http://pdf.glance.ch. > > If you are looking for an all Java solution I believe iText from > http://www.lowagie.com/iText/ also allows encryption (but no decryption). > > Manuel > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, 7 March 2002 2:57 > To: fop-dev > Subject: Encryption > > > What is involved in encrypting the outputted PDF? Is this something that is > simple to implement? If someone can point me in the right direction, I'd > appreciate it. :) > > -- > > David B. Bitton > [EMAIL PROTECTED] > www.codenoevil.com > > Diversa ab illis virtute valemus. > > > - > 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]
Re: FOP Schema
I had a problem validating the schema. I changed the namespace declaration for xs to "http://www.w3.org/2000/10/XMLSchema"; and it came up ok in XML Spy. Granted, this could be an issue w/ ver. 3.5 of XML Spy. Dunno. -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - Original Message - From: "Chuck Paussa" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 06, 2002 2:11 PM Subject: FOP Schema > I've generated and cleaned up the attached schema from the XSL FO DTD. These are fairly clean documents with some additions like enumerated types for lengths and percentages. The enumerated types do not exclude values not implemenetd in FOP. One item to note is that the element names in the schema do not include the fo: prefix, so if you're generating code from the schema, you'll have to work around that. Post any comments and I'll include them in the next update. [Even the cranky comments I've gotten so far are useful];-) > > Chuck Paussa > > > - > 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 DTD attached (updated)
Ok, I added "fo:" to " + > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] fop4d.dtd.diff Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP DTD attached (updated)
I opened the attached DTD in XML Spy, and the validation failed at: ... To: <[EMAIL PROTECTED]> Sent: Wednesday, March 06, 2002 2:05 PM Subject: FOP DTD attached (updated) > DTD lovers > > I've created the attached DTD from the XSL FO W3C documents. I updated the DTD to allow you to exclude those elements that are not handled by > FOP. These are fairly clean documents with some additions like enumerated types for lengths and percentages. The enumerated types do not exclude values not implemenetd in FOP. The DTD should work well with PSGML. Post any comments and I'll include them in the next update. [Even the cranky comments I've gotten so far are useful];-) > > Chuck Paussa > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Encryption
What is involved in encrypting the outputted PDF? Is this something that is simple to implement? If someone can point me in the right direction, I'd appreciate it. :) -- David B. Bitton [EMAIL PROTECTED] www.codenoevil.com Diversa ab illis virtute valemus. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FopServlet error
The web.xml file in fop.war is bad. Open the .war, and remove the element with /servlet/fop in it. The extra servlet-mapping child element violates the DTD. The corrected web.xml file should be: http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> Fop FopServlet Fop /fop :) - Original Message - From: "Carlos Daniel Schafer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 05, 2002 3:08 PM Subject: RE: FopServlet error > Hi > > You have look the file web.xml into fop.war is configured for other Tomcat, > I think so Tomcat 3.0, may be and your Tomcat is diferent. > Today, I take this same problem. > > > I sorry, my English is very bad, may be Indian. I'm the Argentina, Buenos > Aires. > > > > -Mensaje original- > > De: Dunning, John [SMTP:[EMAIL PROTECTED]] > > Enviado el: martes, 05 de marzo de 2002 17:05 > > Para: '[EMAIL PROTECTED]' > > Asunto: FopServlet error > > > > Hello, > > I'm trying to get the FopServlet example working; I've placed the fop.war > > file in the /webapps/ directory, but now when I start Tomcat I get this > > message on the console window: > > > > Starting service Tomcat-Standalone > > Apache Tomcat/4.0.3 > > PARSE error at line 26 column 23 > > org.xml.sax.SAXParseException: The content of element type > > "servlet-mapping" > > must match "(servlet-name,url-pattern)". > > > > Looking at the configuration files that come with Tomcat, the > > content is as expected. Anyone else experiened this, or > > any suggestions? > > > > TIA, > > John > > > > > > - > > 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]
Encryption
What is involved in encrypting the outputted PDF? Is this something that is simple to implement?
Re: FO -> PDF works with Netscape, not with IE
how do you set the no-cache for the output header going out of the servlet, because I saw this prob just yesterday. - Original Message - From: "Savino, Matt C" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 05, 2002 11:34 AM Subject: RE: FO -> PDF works with Netscape, not with IE > If you don't set any of the cache properties in the response header > (returned PDF) to no-cache (or expires immediately, or whatever equivalent), > IE 5.5 is smart enough to internally return it's own cache on the second hit > (at least in my experience). > > Matt Savino > > > > -Original Message- > > From: Katiyar, Bhawana [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, March 05, 2002 7:37 AM > > To: [EMAIL PROTECTED] > > Subject: RE: FO -> PDF works with Netscape, not with IE > > > > > > I am using IE 5.5 SP2. My request for a PDF document is being > > sent twice. > > Does anyone has a working servlet which serves PDF requests > > in one shot. > > > > Thanks > > Bh > > > > -Original Message- > > From: Savino, Matt C [mailto:[EMAIL PROTECTED]] > > Sent: Monday, March 04, 2002 5:00 PM > > To: '[EMAIL PROTECTED]' > > Subject: RE: FO -> PDF works with Netscape, not with IE > > > > > > If you have to support older verisons of IE (<5.5), you'll > > also have to take > > a couple of steps to avoid calling FOP 2 or 3 times. One > > you'll want to look > > out for User-Agent='contype' in the request header, and only > > return the > > content type, not the actual content. But this isn't enough > > (even though > > Microsoft says it is). IE < 5 likes to request the PDF doc, > > then kill the > > request, then request the contype, then request the doc again. Except > > sometimes, and under no reproduceable set of conditions I > > could discern, IE > > accepts the whole document on the first request. Which means > > you can't just > > only call FOP and return the whole doc on the third hit. The only full > > solution I've seen so far is to cache the PDF byte-array in > > the session > > after the first hit, then return it if requested on the third > > hit. (credit > > Jim Urban I believe) This doesn't save you from sending the > > PDF out over the > > wire twice, but it does save calling FOP twice. And so far > > the latter has > > proven to be much more time and resource-consuming. I've attached the > > servlet I use to generate HTML and PDF. It's kind of a mess, > > but you should > > be able to find all the pieces. > > > > One note: it's possible setting the 'Content-Disposition' as > > described below > > may clear up the problem. I remember experimenting with > > Content-Disposition > > a long time ago, but I didn't like the way it brought up two > > consecutive > > 'Save As...' dialogs. > > > > Matt Savino > > > > > > > -Original Message- > > > From: Chetan Vig [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, March 04, 2002 1:51 PM > > > To: [EMAIL PROTECTED] > > > Subject: Re: FO -> PDF works with Netscape, not with IE > > > > > > > > > Make sure you have the following set in your response > > > // CONTENT DISPOSITION ENSURES THAT IE > > > BROWSER RECOGNIZES > > > THE PDF > > > // BYTE STREAM AS A PDF FILE > > > // SOLUTION FOUND FROM MICROSOFT SUPPORT PAGE > > > // NO IMPACT FOR NETSCAPE BROWSER > > > response.addHeader("Content-Disposition", > > > "inline;filename=report.pdf"); > > > response.setContentLength(contentSize); > > > > > > Chetan > > > > > > > > > Jim Urban wrote: > > > > > > > Be sure you set the content length, otherwise IE has > > > problems. It also > > > > helps to call reset to clear any information in the HTTP > > > header before > > > > setting your content type or any other values. > > > > > > > > Jim > > > > > > > > > -Original Message- > > > > > From: Katiyar, Bhawana [mailto:[EMAIL PROTECTED]] > > > > > Sent: Monday, March 04, 2002 3:23 PM > > > > > To: [EMAIL PROTECTED] > > > > > Subject: FO -> PDF works with Netscape, not with IE > > > > > > > > > > > > > > > Hi! I am using version .18 to render PDF from XML. Rendering is > > > > > fine with Netscape, but doesn't work with IE. > > > > > Any clues? > > > > > Thanks > > > > > Bhawana > > > > > > > > > > > > > > > > > > > > > > > > > - > > > > > 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] > > > > > > > > > > > >
Fixing Inline Italic/Bold
Is it just me, or does inlined italic or bold text create spurious spaces on the line and violate the margins? This is a pretty big problem. I'd like to fix it. I posted a question about this on fop-user but got no response. I am assuming this is a bug in FOP, and would really appreciate any comments anyone one might have about what parts of the code might be relevant to a fix. -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: AW: keep-with-next?
Thank you for your response! I was afraid you would say this. :) I was hoping it might be a relatively simple fix; I wonder if there isn't a kluge I can put in the existing approach that would suffice for the heading/following paragraph problem... So FOP is basically being redesigned/rewritten, eh? I wonder how far along this is. On Thu, 31 Jan 2002, Bertrand Delacretaz wrote: > (by the way your message was crossposted to fop-user, please avoid this as it > makes it very hard to follow discussions) > > On Wednesday 30 January 2002 20:21, David Wood wrote: > > I am a Java coder and know my way around the standard. I volunteer to try > > to fix this, if someone who is more familiar with FOP's internals can > > tell me where to look... > > I cannot help you much, but here's at least a reply to your offer ;-) > > AFAIK getting keep-with... stuff to work requires serious redesign, which is > currently going on (Keiron and Karen?), but apparently fairly slowly. > > Keiron would probably be the one to answer you, but in his last message > (Jan.14th I think) he indicated that he'd be "away for some time". I have no > idea when he will be back, maybe someone knows more? > > -- > -- Bertrand Delacrétaz, www.codeconsult.ch > -- web technologies consultant - OO, Java, XML, C++ > > > > > > > - > 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: AW: keep-with-next?
I should be more specific - what I mean is; I would like to try to get keep-with-next/previous working with fo:block elements. On Wed, 30 Jan 2002, David Wood wrote: > I am a Java coder and know my way around the standard. I volunteer to try > to fix this, if someone who is more familiar with FOP's internals can > tell me where to look... > > -David > > On Wed, 30 Jan 2002, Sam Prokop wrote: > > > I found out it just works with table-rows, if you use keep-with-next and > > keep-with-previous. > > and you have to take care, that the table doesn´t exceeds the page, > > otherwise you´ll get a infinite-loop. > > > > that´s all i found out :-( > > > > Sam > > > > > -Ursprüngliche Nachricht- > > > Von: Costantino Sertorio [mailto:[EMAIL PROTECTED]] > > > Gesendet: Montag, 28. Januar 2002 16:51 > > > An: [EMAIL PROTECTED] > > > Betreff: keep-with-next? > > > > > > > > > Hello, > > > Is the keep-with-next attribute supported by FOP? > > > If yes, can anybody explain to me what I am doing wrong? > > > I have a "heading" template which I would like to keep > > > together with the > > > following text, therefore I defined the following, but it > > > doesn't work (the > > > following paragraph ends up in the next page): > > > > > > > > > > > > > > > > > space-before="0.6cm" space-after > > > ="0.6cm" font-size="13pt" font-weight="bold"> > > > > > > > > > > > > > > > > > font-size=" > > > 10pt" font-weight="bold"> > > > > > > > > > > > > > > > Thank you, > > > > > > Costantino > > > > > > > > > > > > > > > - > 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: AW: keep-with-next?
I am a Java coder and know my way around the standard. I volunteer to try to fix this, if someone who is more familiar with FOP's internals can tell me where to look... -David On Wed, 30 Jan 2002, Sam Prokop wrote: > I found out it just works with table-rows, if you use keep-with-next and > keep-with-previous. > and you have to take care, that the table doesn´t exceeds the page, > otherwise you´ll get a infinite-loop. > > that´s all i found out :-( > > Sam > > > -Ursprüngliche Nachricht- > > Von: Costantino Sertorio [mailto:[EMAIL PROTECTED]] > > Gesendet: Montag, 28. Januar 2002 16:51 > > An: [EMAIL PROTECTED] > > Betreff: keep-with-next? > > > > > > Hello, > > Is the keep-with-next attribute supported by FOP? > > If yes, can anybody explain to me what I am doing wrong? > > I have a "heading" template which I would like to keep > > together with the > > following text, therefore I defined the following, but it > > doesn't work (the > > following paragraph ends up in the next page): > > > > > > > > > > > space-before="0.6cm" space-after > > ="0.6cm" font-size="13pt" font-weight="bold"> > > > > > > > > > > > font-size=" > > 10pt" font-weight="bold"> > > > > > > > > > > Thank you, > > > > Costantino > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP - Thread-safe ?
I think it's intended to be thread safe. However, a couple of bugs (in 0.20.2) break this. A (possibly not exhaustive) list of things to fix: synchronizsation should be class-wide rather than object-wide in the following classes: org.apache.fop.fo.StandardElementMapping org.apache.fop.extensions.ExtensionElementMapping org.apache.fop.svg.SVGElementMapping Cheers David Rosenborg Pantor Engineering AB - Original Message - From: "Claus Nielsen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 11, 2001 4:28 PM Subject: FOP - Thread-safe ? > > Is FOP thread-safe ? > > Claus > > > - > 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: servlet called thrice on IE 4.0
It is a behavior that is unavoidable in IE. I cache the pdf and return it on the second hit. Dave - Original Message - From: "Savino, Matt C" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 20, 2001 11:09 AM Subject: servlet called thrice on IE 4.0 > I know this has been discussed here before, but I just wanted to ask in case > anyone has discovered a solution. Basically I'm etting that problem where IE > is calling the FOP servelt twice. Only on Weblogic, the second call seems to > be causing a socket error. The net result is that the servelt has to be > called three times to actually work (I've pasted the output below). I've > verified that IE 4.72 and beyond don't see this problem. Just wondering if > anyone ever found a fix. > > Thanks a lot, > Matt > > > Below is the output from ONE call to > http://localhost:7001/resultview/ReportGenerator.jsp?counter=25 (the > 'counter=' piece is put in to avoid IE-early-version caching problem): > > > servlet: session ID = > O1qHKkV5IXQWz0y11xfOSj8vbLdv3Uzl9lVf5mSDqcEHTJtX7mca!-2004853107!-1675706787 > !7001!7002!1006274346312 > ReportGeneratorServlet says hiTue Nov 20 09:09:49 PST 2001 > srd.contentType = pdf > srd.reportId = 1001 > reportProps.getProperty(report1001) = lr > Writing XML source to: C:\bea\wlserver6.1\ReportOutput.xml > > Writing FO source to: C:\bea\wlserver6.1\ReportOutput.xml > > building formatting object tree > setting up fonts > [1] [2] > Parsing of document complete, stopping renderer > Initial heap size: 45687Kb > Current heap size: 52679Kb > Total memory used: 6991Kb > Memory use is indicative; no GC was performed > These figures should not be used comparatively > Total time used: 1688ms > Pages rendererd: 2 > Avg render time: 844ms/page > servlet: session ID = > O1qHKkV5IXQWz0y11xfOSj8vbLdv3Uzl9lVf5mSDqcEHTJtX7mca!-2004853107!-1675706787 > !7001!7002!1006274346312 > ReportGeneratorServlet says hiTue Nov 20 09:09:51 PST 2001 > srd.contentType = pdf > srd.reportId = 1001 > reportProps.getProperty(report1001) = lr > Writing XML source to: C:\bea\wlserver6.1\ReportOutput.xml > > Writing FO source to: C:\bea\wlserver6.1\ReportOutput.xml > > building formatting object tree > setting up fonts > [1] [2] > Parsing of document complete, stopping renderer > Initial heap size: 53805Kb > Current heap size: 61054Kb > Total memory used: 7249Kb > Memory use is indicative; no GC was performed > These figures should not be used comparatively > Total time used: 1563ms > Pages rendererd: 2 > Avg render time: 781ms/page > > <[WebAppServletContext(1024240,RVWebApp1,/RVWebApp1)] Root cause of > ServletException > java.net.SocketException: Connection aborted by peer: socket write error > at java.net.SocketOutputStream.socketWrite(Native Method) > at java.net.SocketOutputStream.write(SocketOutputStream.java:83) > at > weblogic.servlet.internal.ChunkUtils.writeChunkNoTransfer(ChunkUtils.java:20 > 2) > at > weblogic.servlet.internal.ChunkUtils.writeChunks(ChunkUtils.java:167) > at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:248) > at > weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:306) > at weblogic.servlet.internal.ChunkOutput.write(ChunkOutput.java:197) > at > weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:1 > 25) > at > weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamI > mpl.java:155) > at java.io.OutputStream.write(OutputStream.java:61) > at > com.questdiagnostics.applications.resultview.servlet.ReportGeneratorServlet. > renderPdf(ReportGeneratorServlet.java:171) > at > com.questdiagnostics.applications.resultview.servlet.ReportGeneratorServlet. > renderReport(ReportGeneratorServlet.java:120) > at > com.questdiagnostics.applications.resultview.servlet.ReportGeneratorServlet. > service(ReportGeneratorServlet.java:67) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java > :265) > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java > :200) > at > weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo > ntext.java:2456) > at > weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java > :2039) > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) > > > servlet: session ID = > O1qHKkV5IXQWz0y11xfOSj8vbLdv3Uzl9lVf5mSDqcEHTJtX7mca!-2004853107!-1675706787 > !7001!7002!1006274346312 > ReportGeneratorServlet says hiTue Nov 20 09:09:53 PST 2001 > srd.contentType = pdf > srd.reportId = 1001 > reportProps.getProperty(report1001) = lr > Writing XML source to: C:\bea\wlserver6.1\ReportOutput.xml > > Writing FO source to: C:\bea\wlserver
My First FOP'ed publication done
Hi, Just a short note to say a big thank-you to everyone who has developed FOP. I have just finished my first publication which was 300 A4 pages. I had a few problems but in the end managed everything the client which is cool. Thanks Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Inline text-align problem
Hi, I am trying to format a line with 3 elements one to be left aligned, one centered and one right aligned. From my reading I believe the following should work. left text center text right text But the text all comes out just as if there are no inline elements ie all on one line with each inline element continuing immediately after the one before. Am I doing something wrong or is this expected in fop 0.20.2? Thanks Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Table border thickness inconsistency
Hi! I'm using Fop 0.20.2 and have experienced the following problem: When rendering a table with cells like this border-bottom-width="0.25pt" border-bottom-style="solid" border-bottom-color="#e0e0e0"> test not all borders come out with the same width. The deviant borders appear in groups. The number of borders in each group seem to vary with the specified bottom-border-width. Is this maybe a rounding problem? I've only tested the PDF and PS renderers and the problem appears in both of them. (BTW, I tried to run my example with a fop compiled from the latest files in the cvs repository and got no output pages at all. Maybe this is due to some CR/R incompatibility?) Cheers, David Rosenborg Pantor Engineering AB
Re: FOP memory usage
Indeed, thanks to a recommendation from Mr. Lillywhite to use a sequence for each of my pages instead of one sequence for all, my memory footprint for a 500 page report went from 270+ MB to 1.4 MB. This was using 0.20.2 dave On Friday, November 9, 2001, at 12:31 PM, Lloyd McKenzie/CanWest/IBM wrote: > > I'm not sure if this will help or not, but it worked well for me. > > I was trying to process a 64 MB document, and it was taking DAYS > and was > eating gobs of memory. I did some wading through the code, looking for > ways to optimize. I found a couple of places to reduce memory, > but nothing > substantial. (I plan to run some analysis on my changes, and if > they make > a difference of more than 5%, I'll submit them for inclusion in a > future > release.) However, in my wondering through the code, I realized > that FOP > parses and stores everything until it runs into an 'End' Page sequence > marker. My XML document was one BIG page sequence, so FOP was > parsing the > entire thing before it would start to generate output. As my XML > consisted > of a large number of fairly independent sections, I modified my > XSLT to put > each section into a different page sequence. The result was that > FOP only > parses objects to the end of the page-sequence, spits out the pages for > that sequence, and garbage collects the objects before moving > on. The only > data that is retained are link references. These eat up a bit > memory, but > nothing as bad as all of the area references needed to draw the page :> > > Hope this helps, > > > Lloyd > > Lloyd McKenzie, P.Eng. I/T Architect, IBM Global Services > Internet: [EMAIL PROTECTED] > PhoneMail: (780)421-5620 Internal Mail:AZ*K0R*1004 *EDM > > > Matt Savino <[EMAIL PROTECTED]> on 11/09/2001 08:21:53 AM > > Please respond to [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > cc: > Subject: Re: FOP memory usage > > > Make sure you're using -hotspot. Try setting the initial and max heap > size to 256M if you have it. Turn on verbose garbage collection to see > what's happening. Even though it says 'No garbage collection was > performed, I'm not sure that's accurate (see below). Also sometimes the > total memory used is negative. So don't assume you'll always run out of > memory. That said 15MB XML to 120MB PDF may be a littl much. The only > way to find out is to try it! > > <<< my output on Weblogic with -hotspot -verbose:gc -ms256m -mx256m >>> > > FopServlet says hi > [GC 14710K->12798K(261888K), 0.0258153 secs] > [GC 14840K->13743K(261888K), 0.0275211 secs] > [Full GC 15436K->13778K(261888K), 0.7851467 secs] > [GC 15825K->14079K(261888K), 0.0097378 secs] > [GC 16127K->14306K(261888K), 0.0203590 secs] > [GC 16354K->14835K(261888K), 0.0211491 secs] > [GC 16883K->14911K(261888K), 0.0125452 secs] > [GC 16959K->14949K(261888K), 0.0097037 secs] > [GC 16997K->14981K(261888K), 0.0080228 secs] > building formatting object tree > setting up fonts > [GC 17029K->15288K(261888K), 0.0154997 secs] > [GC 17336K->15777K(261888K), 0.0254016 secs] > [GC 17825K->16324K(261888K), 0.0199059 secs] > [1[GC 18372K->16920K(261888K), 0.0248386 secs] > [GC 18968K->17332K(261888K), 0.0178556 secs] > [GC 19380K->17702K(261888K), 0.0221106 secs] > ] [2][GC 19750K->18117K(261888K), 0.0219930 secs] > [GC 19021K->18525K(261888K), 0.0153204 secs] > [GC 19952K->19940K(261888K), 0.0163652 secs] > [GC 21009K->21005K(261888K), 0.0129846 secs] > [GC 22075K->22075K(261888K), 0.0132101 secs] > [3[GC 24122K->23293K(261888K), 0.0148726 secs] > ][GC 25341K->23623K(261888K), 0.0144110 secs] > [4[GC 25671K->23925K(261888K), 0.0167574 secs] > [GC 25973K->24281K(261888K), 0.0171810 secs] > ] > Parsing of document complete, stopping renderer > Initial heap size: 15357Kb > Current heap size: 24716Kb > Total memory used: 9358Kb > Memory use is indicative; no GC was performed > These figures should not be used comparatively > Total time used: 5117ms > Pages rendererd: 4 > Avg render time: 1279ms/page > > > > > > > "Maring, Steve" wrote: >> >> I'm using fop-0.20.1. >> >> I started with a 650KB XML file that I transformed into a 4MB XSL:FO > file. >> Running this file through FOP to generate a PDF used about 90MB of > memory. >> >> Initial heap size: 807Kb >> Current heap size: 91637Kb >> Total memory used: 90829Kb >> Memory use is indicative; no GC was performed >> These figures should not be used comparatively >> Total time used: 31265ms >> Pages rendererd: 17 >> Avg render time: 1839ms/page >> >> I have XML files in excess of 15MB that need to be converted to PDF. >> Assuming that a linear extrapolation is possible, it would >> suggest that > the >> JVM running the FOP process would need in excess of 2GB of memory for > this >> to avoid the dreaded java.lang.OutOfMemoryError. >> >> Are there any optimizations that can be done to FOP? >> >> Thanks. >> -Steve Maring >> Nielsen Media Research >> >> --
table bug
Greetings, The code below causes fop 0.20.1 to crash. The cause is a missing following the "Moisture Rating" block. -dd http://www.w3.org/1999/XSL/Transform"; xmlns:fo="http://www.w3.org/1999/XSL/Format";> http://www.w3.org/1999/XSL/Format";> Electronic Component Analysis More Stuff View/Print Traveler Header and Steps Traveler Number Part Type Moisture Rating Instructions - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
FOP performance enhancement
I've been following the progress of FOP since .15 and I'd like to say that I really appreciate all the work everyone puts in. My company produces student administration software for k-12 schools and open-source projects are the ideal way to put great technology in the hands of under-funded school districts. We currently use FOP in a servlet environment for doing pdf reporting (1 to 20 pages). The memory consumption is a bit high, but we have had great sucess and stability with our current usage. Our IDEAL dream is to be able to batch print report cards and parent letters using this technology. This would involve taking the same simple fo document and applying it 500-3000 times, depending on the number of students. We don't use anything fancy like page counting, or references to other parts of the document. As far as I can see, it should be possible to format, render and stream out each page as it's completed. (Although this probably breaks other aspects of the FO spec.) If I am able to produce documents like this in the near future, it will lock in Fop as a core part of our technology architecture. Is there any way to optimize my fo documents to make this possible? I remember seeing some benchmarks reaching thousands of pages by Mark Lillywhite, but unfortunately my documents were unable to take advantage of those enhancements. Is anyone else currently working on something like this? Thanks, Dave Frankson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
FOP documentation / oddities
I downloaded Fop-0.20.1-bin.tar.gz and untarred it. Minor documentation problem: In the docs/html-docs/index.html file, it says that the latest version of FOP is 0.18 The docs/examples/fo/border.fo file makes extensive use of , but docs/html-docs/implemented.html says that block-container is not implemented. Finally, (and this is probably me just not understanding the entire spec), according to section 6.6.7, I should be able to use the width attribute with , but I get no extra space in: Some text spaced within other text. --- J. David Eisenberg http://catcode.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Line feed in FOP
Linda, If you actually need a linefeed character ( ) try this: -dd Linda Zammit wrote: 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
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]
Re: Configuring the FOP 0.18 in Cocoon 1.8 or more
sudhakar, I wrote an article for the August issue of Midrange Computing that covers that topic. If you do not have access to the magazine, I can forward a copy of that article to you. The main challenges are with the Cocoon jar file. I found through a process of elimination that on some releases (V4R5 < some group) one package had to be removed from the jar file. The article covers setup with Tomcat, which I would recommend over WebSphere. The installation is pretty strait forward and can be as simple as drag and drop from a working windows setup to a mapped drive on your AS/400 or iSeries. You then have to modify Tomcat's startup script, which isn't too hard to set the appropriate class path. David Morris >>> [EMAIL PROTECTED] 09/22/01 03:29 AM >>> hello, can anybody tell me how to configure the FOP 0.18 in cocoon 1.8 or more. Thanks in advance. sudhakar sankar - 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 support for number-rows-spanned property
Karen, That's it -- thre spanning column has a long list-block that goes over to the next page. Okay, I can workaround by putting tables within tables. Thanks. -dd Karen Lease wrote: > David, > > I don't think it was in 0.19.0, which is consistent with the error > message. > The reason for the infinite loop may well be that some group of rows > which are held together by spans is too big to fit on the page. This is > a known bug, and I'm not currently working on it, as it's not that easy > to do. Like many difficult layout issues, we hope to attack this in the > "redesign". > However, just to make sure that there isn't some other wierd reason for > this problem, I'd be happy to look at your .fo file. > > Regards, > Karen > > "David S. Dixon" wrote: > > > > Karen, > > > > Was number-rows-spanned support in 0.19.0? I have an .fo file that turns into a > > .pdf file under 0.19.0 but complains of > > > > WARNING: Number of cell columns under table-row not equal to number of > > table-columns > > > > for the two rows corresponding to the spanned rows. Under 0.20.1, fop goes into > > an infinite loop on this file. > > > > -dd > > > > Karen Lease wrote: > > > > > Hi Amit, > > > > > > The number-rows-spanned property is now implemented in FOP, but it > > > wasn't yet in 0.18.1. If you want to use it, you should download the > > > latest version of FOP from the website - that's 0.20.1. > > > > > > Regards, > > > Karen > > > > > > [EMAIL PROTECTED] wrote: > > > > > > > > I'm not sure if this is the right place to ask such a question... if not, I > > > > would appreciate some information on where to find a solution to this > > > > problem :- > > > > > > > > I've been trying to use the "number-rows-spanned" property to generate > > > > tables in my PDF file using FOP 0.18.1. However, I keep getting errors - is > > > > the "number-rows-spanned" property not implemented in FOP yet? > > > > > > > > Thanks for your help > > > > 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP support for number-rows-spanned property
Karen, Was number-rows-spanned support in 0.19.0? I have an .fo file that turns into a .pdf file under 0.19.0 but complains of WARNING: Number of cell columns under table-row not equal to number of table-columns for the two rows corresponding to the spanned rows. Under 0.20.1, fop goes into an infinite loop on this file. -dd Karen Lease wrote: > Hi Amit, > > The number-rows-spanned property is now implemented in FOP, but it > wasn't yet in 0.18.1. If you want to use it, you should download the > latest version of FOP from the website - that's 0.20.1. > > Regards, > Karen > > [EMAIL PROTECTED] wrote: > > > > I'm not sure if this is the right place to ask such a question... if not, I > > would appreciate some information on where to find a solution to this > > problem :- > > > > I've been trying to use the "number-rows-spanned" property to generate > > tables in my PDF file using FOP 0.18.1. However, I keep getting errors - is > > the "number-rows-spanned" property not implemented in FOP yet? > > > > Thanks for your help > > 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]
CVS error?
Folk, When I do a checkout or update of the cvs repository, it checksout/updates a whole bunch of stuff (ending with xml-fop/src/org/apache/fop/fo/properties), then says: cvs update: cannot find password cvs [update aborted]: use "cvs login" to log in first Wouldn't it say this in the beginning instead of much later (maybe even the end, I don't know)? -dd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Compressing Input Document
Group, I am wondering if there is a way to compress the XSL-FO document passed to FOP. We have been experimenting with FOP via Cocoon, Cocoon2, and standalone. One tact was to use JDOM to create a DOM XSL-FO tree passed to FOP. The data passed to FOP seems pretty excessive and will not scale to our needs. We saw about a 35X increase from input to carefully crafted XSL-FO document. There may still be some opportunity for us to trim this down, but table formatting seems to use up a lot of space. Is there a way to compress the XSL-FO object down to a reasonable size? The data itself appears to be very redundant. Thanks, David Morris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: OT(?): transcendental functions in XSLT
Mark, Correction and clarification on my previous response: By small angles, I meant small angle DIFFERENCES -- the series expansions work best for small angles. The sine expansion to 3 terms is good within 1% up to pi/2, as is the cosine expansion to 4 terms (the first term is always 1, so it's equivalent to sine to 3 terms). Then you find yourself doing if-then ladders for the four quadrants, i.e. sin(pi/2 < x < pi) = sin(pi - x), sin(pi < x < 2pi) = - sin(x - pi), and so on. I haven't thought about how do to this in fop, so this may or may not help. -dd "David S. Dixon" wrote: > Mark, > > Well, you could do what most implementations of sine and cosine would do, > series expansion: > > sin(x) = x - x^3/3! + x^5/5! - x^7/7! ... > > cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! ... > > I haven't tried it, but if you avoid small angles (not a bad idea with pie > charts, anyway) the expansion shouldn't have to include more than three > terms, I suspect. > > -dd > > Mark wrote: > > > Hi folks, > > > > sorry for this slightly off topic post but i was hoping someone could > > help me. > > > > I thought i should be able to produce a very simple xml schema for > > generating pie charts. the idea was that I could use XSLT to transform > > from the pie-chart schema to SVG (and then to import the SVG into FOP). > > > > It would be preferable to express the size of the pie chart segments as > > percentages, but the SVG Path object requires coordinates on the > > circumferance of a circle. > > > > The problem is that there don't seem to be any functions in XSLT or > > XPath that let me find the sin() or cosine() of an angle. Am I missing > > something? I thought I could possibly use a transform but I can't seem > > to perform a transform in the middle of a Path. > > > > I finally decided that maybe if I created a table of degree-to-sin/cos > > mappings I could somehow use the document() function to import this into > > the stylesheet and use an index to search it (ergh) but that doesn't > > seem to work either. > > > > There's little point in having a pie-chart schema if you have to do the > > calculations yourself anyway. > > > > So if anyone has any suggestions .. ? I'd certainly be pleased to share > > a pie-chart-XSLT transform if I can get it going. > > > > As an aside, does anyone know why SVG paths are so (IMHO) brain dead? I > > can't believe that the elements in a path aren't XML elements, it seems > > very strange. (Generating the paths in XSLT is going to be a bit > > painful, even if I can get the sin() of an angle. I dont really see how > > "M300,200 h-150 a150,150 0 1,0 150,-150 z" qualifies as XML). > > > > Cheers > > Mark > > > > - > > 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]
Re: OT(?): transcendental functions in XSLT
Mark, Well, you could do what most implementations of sine and cosine would do, series expansion: sin(x) = x - x^3/3! + x^5/5! - x^7/7! ... cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! ... I haven't tried it, but if you avoid small angles (not a bad idea with pie charts, anyway) the expansion shouldn't have to include more than three terms, I suspect. -dd Mark wrote: > Hi folks, > > sorry for this slightly off topic post but i was hoping someone could > help me. > > I thought i should be able to produce a very simple xml schema for > generating pie charts. the idea was that I could use XSLT to transform > from the pie-chart schema to SVG (and then to import the SVG into FOP). > > It would be preferable to express the size of the pie chart segments as > percentages, but the SVG Path object requires coordinates on the > circumferance of a circle. > > The problem is that there don't seem to be any functions in XSLT or > XPath that let me find the sin() or cosine() of an angle. Am I missing > something? I thought I could possibly use a transform but I can't seem > to perform a transform in the middle of a Path. > > I finally decided that maybe if I created a table of degree-to-sin/cos > mappings I could somehow use the document() function to import this into > the stylesheet and use an index to search it (ergh) but that doesn't > seem to work either. > > There's little point in having a pie-chart schema if you have to do the > calculations yourself anyway. > > So if anyone has any suggestions .. ? I'd certainly be pleased to share > a pie-chart-XSLT transform if I can get it going. > > As an aside, does anyone know why SVG paths are so (IMHO) brain dead? I > can't believe that the elements in a path aren't XML elements, it seems > very strange. (Generating the paths in XSLT is going to be a bit > painful, even if I can get the sin() of an angle. I dont really see how > "M300,200 h-150 a150,150 0 1,0 150,-150 z" qualifies as XML). > > Cheers > Mark > > - > 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 Bug Fixes
Steve, Thanks for the reply. Right you are - I subscribed to the list over the weekend. By archive, do you mean the bugzilla search facility? Thanks again, -dd COFFMAN Steven wrote: > David, > You recently asked what the status of your patch was. I guess you > aren't subscribed to the list, but Karen replied that she had resolved the > problem you reported, though not with the patch you supplied. Please see > details below. In the future, please subscribe to the list to get your > responses or check the archives. > -Steve > > -Original Message- > From: Karen Lease [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 20, 2001 6:06 PM > To: [EMAIL PROTECTED] > Subject: Re: FOP Bug Fixes > > Hi David, > > I've had a look at your files. You're right about (2), and it's now > fixed in the CVS version (as of tonight). > > However I think that you may have a slight misunderstanding of setting > up margins on the page-master and the body-region which is giving the > results you describe in (1). > > If you use FO like this for your page-master, it should work better, > although with these values the header and footer text are right at the > edges of the page. > > page-height="28.0cm" margin-left="2.5cm" margin-right="2.5cm" > margin-top="0cm" margin-bottom="0cm" > master-name="first"> > > > > > > Note that the margin-top and margin-bottom values on region-body should > correspond to (or be greater than) the "extent" values on the > region-before and region-after FO. The margins on the simple-page-master > object determine the "content-rectangle" within which the region-body > and the 4 side regions must be positioned. > It's a little complicated; try looking at the diagrams in the XSL CR > specification in 6.4.12 and 6.4.13. > > Hope that helps and happy Foppin' > > Regards, > Karen Lease > > "David S. Dixon" wrote: > > > > Greetings, > > > > I generated the attached test.fo file in Java. There were two problems: > > > > 1. The table overran the title (region-before) and page number > > (region-after) > > 2. The table headers cells got progressively narrower on each subsequent > > page > > > > - > 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]
fop bug fix
Greetings, I submitted a bug fix for FOP some time back and don't recall ever receiving confirmation. How do I find out the status? -dd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Markers
Is there a version of FOP that works with markers? __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Servlets being invoked twice
As far as I know, IE has always done 2 requests per mime type that it doesn't handle internally. See Article ID: Q293336 in the M$ knowledge base. Netscape and all others only do 1 request. If anyone knows a configuration that can get IE to behave, please let me know I do suggest adding response.addHeader("Content-Disposition", "inline; filename=report.pdf"); it will fix some glitches in IE5.0, and also have you considered using a Dom Document rather than a string to pass your xml around? It would save you from having to parse it twice when you go from your business object to Xalan, and from Xalan to FOP. Dave - Original Message - From: "Alex Amies" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Tim Kearney" <[EMAIL PROTECTED]> Sent: Wednesday, August 08, 2001 11:15 AM Subject: FOP Servlets being invoked twice > I have a problem with a servlet, which serves up pdf documents, > invoking the servlet twice for every time I request the > url using my browser. The pdf document is produced > correctly in both instances. Anybody else seen this > problem, know what it is, or have a constructive suggestion? > > The servlet gets data from a database, formats into xml, > transforms it with Xalan, then again to a pdf, sending > the content to a byte array where it is then written to > the output stream. Here is a code fragment: > > Writer writer = new StringWriter(); > > // Get an xslt processor factory > TransformerFactory tFactory = TransformerFactory.newInstance(); > > // Create the 3 objects the XSLTProcessor needs to perform the > transformation. > ReportInfo reportInfo = getReportData(request,res); > String xml = reportInfo.getXml(); > StringReader stringReader = new StringReader(xml); > Source xmlSource = new StreamSource(stringReader); > Source xslSheet = getXSLInput(reportInfo.getReportNo()); > StreamResult xmlResult = new StreamResult(writer); > > Transformer transformer = tFactory.newTransformer(xslSheet); > > // Perform the transformation. > transformer.transform(xmlSource, xmlResult); > > // send output from xsl transformation to a string reader > // create a input source containing the xsl:fo file which can be fed to > Fop > Reader reader = new StringReader(writer.toString()); > writer.flush(); > writer.close(); > > //set Driver methods to start Fop processing > Driver driver = new Driver(); > > driver.setRenderer("org.apache.fop.render.pdf.PDFRenderer",".14"); > 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"); > > // send pdf writer output to a byte array stream > ByteArrayOutputStream baos = new ByteArrayOutputStream(); > PrintWriter printWriter = new PrintWriter(baos); > driver.setWriter(printWriter); > driver.buildFOTree(parser, new InputSource(reader)); > driver.format(); > driver.render(); > > // send the bytes out to the servlet output stream > res.setContentType("application/pdf"); > res.setContentLength(baos.size()); > > long sixty = System.currentTimeMillis() + 60*1000; > res.setDateHeader("Expires", sixty); > baos.writeTo(res.getOutputStream()); > res.flushBuffer(); > > > > - > 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: Bug fix for non ASCII environments
Hi, http://xml.apache.org/mail/fop-dev/ is a working archive of this mailing list. Regards, David Baudoin - Original Message - From: Darren Munt <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 23, 2001 2:34 PM Subject: RE: Bug fix for non ASCII environments > Markus, > > You ask two questions there: > 1. Are there Unicode PDFs? The answer to that one is yes. > 2. Can FOP create them? This I do not know and will leave to someone else to > answer. > > The point is that if you force ISO-8859-1 encoding, it wont ever be able to. > I've been working with FOP for only a week or two and I can't find a working > archive of this mailing list, so I don't know if this has been discussed > already. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Barcode fonts.. was Re: userconfig in AIX.
Thanks.. I can now set my own user config settings.. next problem. barcode font support? I looked back over recent emails regarding barcode fonts. I downloaded and tried a few fonts from: http://www.barcode-1.com/pub/russadam/fonts.html I had the most success with. http://www.barcode-1.com/pub/russadam/shareware/barcod39.zip The PDF was rendered with no warnings or errors. However when I tried viewing it in Adobe Acrobe 3.01, I got an error. "A font contains a bad CMap Encoding" Has anyone succeeded with getting a 3of9 barcode font working? thanks again.. David. - Original Message - From: "Keiron Liddle" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 19, 2001 2:22 PM Subject: Re: userconfig in AIX. > Well thats you problem, its not proper xml. > > You have to actually cloas of all tags. > ie. > > notice the "/" at the end of the line > > On Thu, 19 Jul 2001 08:19:10 David Ryan wrote: > > Thanks for the suggestion. I tried the -d option but it didn't give me > > much > > detail on why the error was occuring. I tried commenting out most of the > > userconfig.xml and found that it succeeded. Now I need to work out why > > it > > doesn't like my config file. Is there anyway I can get more information > > from the config file parser? > > > > > > > > > > > > > > > > > > > > > > Can you see anything wrong with this? Commenting out the tag > > makes > > it read the file successfully. > > > > Thanks, > > David. > > > - > 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: userconfig in AIX.
Thanks for the suggestion. I tried the -d option but it didn't give me much detail on why the error was occuring. I tried commenting out most of the userconfig.xml and found that it succeeded. Now I need to work out why it doesn't like my config file. Is there anyway I can get more information from the config file parser? Can you see anything wrong with this? Commenting out the tag makes it read the file successfully. Thanks, David. - Original Message - From: "Keiron Liddle" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 19, 2001 1:50 PM Subject: Re: userconfig in AIX. > > First of all can you put "-d" in the command line. THis will show an error > dump of what is hapenning. > > The message that you are getting is printed out if the ConfigurationReader > throws a FOPException, ie. any sort of error. So it may be that there is > some other problem such as invalid xml, there is an IOException, your > parser doesn't support namespace pref, your parser wasn't found etc. > > In other words, lots of things could be wrong. > > On Thu, 19 Jul 2001 04:33:01 David Ryan wrote: > > > > Hi.. > > > > I'm attempting to run FOP 0.19.0 under AIX using WebSphere Java 1.2.2. > > Most > > things seems to be working ok. My problem is that I can't seem to load > > my > > own user configuration file. Using the Fop command line program.. > > > > java -classpath fop.jar org.apache.fop.apps.Fop -c "conf/userconfig.xml" > > -fo > > fonts.fo -pdf > > fonts.pdf > > > > ---I get the following message. > > reading user configuration file > > Can't find user configuration file conf/userconfig.xml > > using default values > > -- > > > > I have tried copying the config file into the current directory. I've > > tried > > providing the whole path /.../userconfig.xml. I've tried renaming the > > file. > > In the end I tried writing my own code to test if it was related to fop > > command line code. > > > >static void main( String[] args ) { > >try { > > Options options = null; > > > > String pathFonts = null; > > InputSource foFile = new InputSource( new > > FileInputStream("fonts.fo")); > > FileOutputStream out = new FileOutputStream( "fonts.pdf" ); > > // options = new Options(new File("/home/davidr/Fop19/userconfig.xml")); > > options = new Options(); > > options.loadUserconfiguration("userconfig.xml"); > > > > Driver driver = new Driver(); > > driver.setRenderer(Driver.RENDER_PDF); > > driver.addElementMapping("org.apache.fop.fo.StandardElementMapping"); > > > > driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping"); > > driver.setOutputStream(out); > > driver.buildFOTree(createParser(), foFile); > > driver.format(); > > driver.render(); > > } catch (Exception e) { > > System.out.println("Error in Main"); > > e.printStackTrace(); > > } > > } > > > > You will notice, I even tried different methods of setting options. > > Every > > time I get the same error. I can only assume this is a bug related to > > AIX? > > Anyone seen this problem, or can suggest a solution or workaround? > > > > Thanks.. > > David. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
userconfig in AIX.
Hi..I'm attempting to run FOP 0.19.0 under AIX using WebSphere Java 1.2.2. Mostthings seems to be working ok. My problem is that I can't seem to load myown user configuration file. Using the Fop command line program..java -classpath fop.jar org.apache.fop.apps.Fop -c "conf/userconfig.xml" -fofonts.fo -pdffonts.pdf---I get the following message.reading user configuration fileCan't find user configuration file conf/userconfig.xmlusing default values--I have tried copying the config file into the current directory. I've triedproviding the whole path /.../userconfig.xml. I've tried renaming the file.In the end I tried writing my own code to test if it was related to fopcommand line code. static void main( String[] args ) { try { Options options = null; String pathFonts = null; InputSource foFile = new InputSource( new FileInputStream("fonts.fo")); FileOutputStream out = new FileOutputStream( "fonts.pdf" ); // options = new Options(new File("/home/davidr/Fop19/userconfig.xml")); options = new Options(); options.loadUserconfiguration("userconfig.xml"); Driver driver = new Driver(); driver.setRenderer(Driver.RENDER_PDF); driver.addElementMapping("org.apache.fop.fo.StandardElementMapping");driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping"); driver.setOutputStream(out); driver.buildFOTree(createParser(), foFile); driver.format(); driver.render(); } catch (Exception e) { System.out.println("Error in Main"); e.printStackTrace(); } }You will notice, I even tried different methods of setting options. Everytime I get the same error. I can only assume this is a bug related to AIX?Anyone seen this problem, or can suggest a solution or workaround?Thanks..David.
Re: bit OT but..streaming PDF to browsers
Check the Microsoft Knowledge base for Article ID: Q293336 It explains the idiotic way IE handles MIME types. Dave - Original Message - From: "Alex McLintock" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 05, 2001 9:07 AM Subject: Re: bit OT but..streaming PDF to browsers > --- Dave Frankson <[EMAIL PROTECTED]> wrote: > > PDFs from a servlet works in all broswers but you have to remember to do all > > of the following: > > > > > > 1.) Set the headers: > > > >response.setContentType("application/pdf"); > >response.addHeader("Content-Disposition", "inline; filename=report.pdf"); > > > > Your other suggestions I've heard of before - but haven't noticed this one. > Does it really work? What browsers support "Content-Disposition" ? > Where can I find out more? > > Presumably I ought to add it to the FAQ. > > Cheers > > Alex > > > = > Alex McLintock[EMAIL PROTECTED]Open Source Consultancy in London > OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ > DR WHO COMPETITION: http://www.diversebooks.com/cgi-bin/caption/captions.cgi?date=200104 > Get Your XML T-Shirt at http://www.inversity.co.uk/ > > > Do You Yahoo!? > Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk > or your free @yahoo.ie address at http://mail.yahoo.ie > > - > 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: bit OT but..streaming PDF to browsers
I get pdfs from servlets to work fine in IE, but I never have overcome the 2 hits per pdf. Is there a solution to this? - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 04, 2001 7:31 PM Subject: bit OT but..streaming PDF to browsers > Hi all, > i have been pulling my hair out trying to get my nicely created PDFs > from FOP to IE4/5.5. Has anyone out there managed to bytestream a PDF to > any version of IE. I can get it to work but the browser makes 2-3 hits to > the server (presumably some bad hack by Bill based on the Expires Http > header that i am sending) it all works fine in Netscape/Mozilla. As i > cannot server a file due to security i really don't know wot else to do. > Any help much appreciated :-) > BTW i am serving via servlets & JSP, setting the content type to > 'application/pdf'. > > cheers > Dave > > > Streamlink Pty Ltd, Level 5, 33 York Street, Sydney NSW 2000 Australia > > Ph: +61 2 8243 1200 Fax: +61 2 8243 1210 Web: www.streamlink.com.au > > *** > This email and any attachments is confidential and is the intellectual > property of Streamlink Pty Ltd. If you are not the intended recipient > you cannot use, distribute or copy this message or attachments. If this > is the case, please notify the sender by return email immediately and > erase all copies of the message and attachments, Thank you. > *** > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]