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 configuration and the renderer independent processor configuration are better separated, which might be a good idea, in particular for people who want to render the same FO to several different output formats. In this case, a typical code snipped would look like Processor p=new Processor( new ProcessorConfiguration(new File(myconfig.xml))); Renderer r=new PDFRenderer( new PDFRendererConfiguration(cocoon:/myPDFconfig.xml))); p.render(new
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]
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: 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]
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]
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 PDFRenderercenters the image properlyand 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
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
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 fo:root 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]
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: 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]
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: 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]
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: 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]
[david@codenoevil.com: Rendering from a Document]
---BeginMessage--- 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---
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: commentOops, that one didn't make it to the list at first./comment 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: 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: commentOops, that one didn't make it to the list at first./comment 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: 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.init(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: commentOops, that one didn't make it to the list at first./comment 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
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: commentOops, that one didn't make it to the list at first./comment 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: 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 commentOops, that one didn't make it to the list at first./comment 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]
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
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--
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: 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: ?xml version=1.0 encoding=utf-8? xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; version=1.0 xsl:template match=/ fo:root fo:layout-master-set fo:simple-page-master master-name=simple page-height=24.2cm page-width=16.4cm margin-top=0.0cm margin-bottom=1cm margin-left=2cm margin-right=2cm fo:region-body
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: 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: 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 thePDFsa little differently, however, and are running on Apache. In the JSP file that displayscontent in the browser, we have the following link withina form nameddocumentmanagementsearchnavigation: a href="#" img src="javascript:void(0);" width="29" height="60" border="0" alt="Print Unprinted Approved Documents in the list."/a Here is the batchPrintDocument functionin thejavascript 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.pdfcookie="+result; newWindow.location = source; newWindow.focus(); return false; } We define the batchprintdocument.pdf action in the Servlet. The batch function in the servletactually 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 featureis working well, except onher 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: htmlhead script language="javascript" !-- window.location.href='%=path%' //-- /script /headbody/body/html 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 helpfulto 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'sPC. 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 toNOT view it in the browser. I had no success with this either.
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: 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: Problems using fo:basic-link
I'm using fo:basic-link external-destination="url(http://www.bankone.com/)" color="#C0" text-decoration="underline"BankOne/fo:basic-link 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 fo:basic-link 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 fo:basic-link Hello, I'm using fo:basic-link to point to a webpage. Now, when I convert it to a PDF document I see the following problem: fo:basic-link external-destination="www.google.com" indicate-destination="true" font-style="normal" color="blue" font-size="8pt"Click here to search the web/fo:basic-link 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]
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]
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]
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]
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: 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: 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]
Encryption
What is involved in encrypting the outputted PDF? Is this something that is simple to implement?