RE: Generating PDF on the fly using on the fly XML
Try looking into Cocoon...I use it to take data from a database, parse it into an xml file, transform it using XSLT into an FO file and render the resulting FO file as PDF on the fly...it handles pictures/text/forms just fine. You can find it at www.apache.org/Cocoon. Hope this helps! Bob Hitchins Senior IT Business Analyst Cargill Crop Nutrition -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, February 03, 2003 4:09 AM To: [EMAIL PROTECTED] Subject: RE: Generating PDF on the fly using on the fly XML one method of using dynamically create xml content would be to use the StringReader. here some sample code: StringReader input = new StringReader(xmlString); try { FileReader inputxslt = new FileReader(new File(xslfile)); Transformer transformer = TransformerFactory.newInstance().newTransformer( new StreamSource(inputxslt)); driver.setOutputStream(new FileOutputStream(pdffile)); transformer.transform(new SAXSource(new InputSource(input)), new SAXResult(driver.getContentHandler())); } catch(FileNotFoundException fnfe) { ... } catch (TransformerException te) { ... } -Original Message- From: joni santoso [mailto:[EMAIL PROTECTED] Sent: Monday, February 03, 2003 7:01 AM To: [EMAIL PROTECTED] Subject: Generating PDF on the fly using on the fly XML Hi, I used to create a servlet that can produce PDF by setting its contentType. 1. Now, I wonder if I can use Apache FOP to take XML stream that I created using JDOM to produce a PDF? How? 2. Is it possible to produce a PDF that only contains JPEG using XML stream? I am thinking about storing an image stream in an XML document like this : picture the stream is here /picture 3. What about producing mixed content (image and text) in a PDF? I know I can use the external link/external file fo element. But what if the image and text are all created on the fly? Thank you, === Meriahkan Tahun Baru Imlek dengan mengirimkan Kartu Elektronik PlasaCom kepada kerabat dan teman Anda Kepada para pengguna TELKOMSave, lakukan pergantian kartu lama Anda segera ! http://www.telkomsave.com === - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: differenct space needed for different letters?
Yes...you need to used a fixed width font (like Courier) as opposed to a proportional font (like Times New Roman). Proportional fonts base the distance between letters on the actual width of the letter (e.g. w is wider than i so it gets more space). Fixed width fonts assign the same width to all letters. Bob Hitchins -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, January 24, 2003 1:24 PM To: [EMAIL PROTECTED] Subject: differenct space needed for different letters? Hi, I have mutiple line of text in one block in the header for my page, I make each line the exactly same number of letters(same string length), then I found out that the actual space each line takes is not the same, some are longer and some are shorter, just like below. Is there any way to make each line appears to be the same 'actual length' ? start of line ccc c ccend of line dongjiang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: why some talbe cells have thiner border?
I have noticed this too...it appears to be a matter of how the exact positioning of the borders is done. I created a form with several boxes on it and I had to play around with the xslt for quite a while before I got all of the box borders to coincide exactly on the printed form (we made the decision that this was more important than a perfect screen rendering). Bob Hitchins Senior IT Business Analyst Cargill Crop Nutrition -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 16, 2003 11:04 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: why some talbe cells have thiner border? Dtang, Does it print out this way or is it an artifact of the PDF display? I have noticed differences between the display and the print output in the past. Mark Dudley Xerox Corporation -Original Message- From: dongjiang tang [mailto:[EMAIL PROTECTED] Sent: Thursday, January 16, 2003 10:55 AM To: [EMAIL PROTECTED] Subject: why some talbe cells have thiner border? Hi, I am define all the border of my cell the same border, but some of them are thiner, any idea? this the piece of code: fo:table-cell padding-top=3pt padding-right=5pt display-align=after border-bottom-style=solid border-bottom-width=2pt border-top-style=solid border-top-width=2pt border-left-style=solid border-left-width=2pt border-right-style=solid border-right-width=2pt thank you! dtang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Showing FO output
I think having the ability to view the FO source would be both very helpful for debugging and also great for learning what is going on. My $0.02 Bob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 06, 2002 7:57 AM To: [EMAIL PROTECTED] Subject: Re: Showing FO output Leif Frederiksen wrote: In order to debug some code, I would like to see the result of the XML+XSLT tranformation, not the result of the rendering. Can I make FOP do this? btw, I was thinking about implementing such a functionality (view fo source) in FOP's awt viewer, but I was not sure anybody need it, so I left that idea. What are FOP users opinions, is it needed? -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel