from PDF to FOP
anyway to convert from an existing PDF to FOP? I would like to make a form in a wordprocessor print to PDF convert PDF to FOP src use java to edit the FOP and fill-in form generate a new PDF thanks. -- = = Management is doing things right; leadership is doing the = = right things.- Peter Drucker= =___= = http://www.sun.com/service/sunps/jdc/javacenter.pdf = = www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone = = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unicode special chars
That works! Thanks, often you can`t see the most obvious solution ;-) Timo J.Pietschmann wrote: Timo Haberkern wrote: i have a little problem with unicode special characters. If i write the Unicode-Newline from my Java Application (with XercesJ) to XML it escapes #x2028; to amp;#x2028;. FOP seems to ignore the amp;#x2028; and works only as expected if there is a #x2028; There is a difference between an XML file read by a parser and strings supplied through a Java interface for XML. Use the Java syntax for representing Unicode characters: \u2028 in Java strings. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . -- Grüsse Timo Haberkern EMEDIA OFFICE GmbH Wingertstr. 4 74850 Schefflenz-Kl. http://www.emedia-office.com [EMAIL PROTECTED] Tel.: 06293/921121 Fax: 06293/921129 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Column in a block
Hello, i'm using a complex stylesheet with svg,jpg, and many blocks...so i want to format a text inside one of these block in two columns automatically... I hope to be clear - Original Message - From: Oleg Tkachenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 07, 2002 10:48 PM Subject: Re: Column in a block marco scotoni wrote: I know that it's possible work with columns on FO using the property on tag Region-Body. I need to use column on a Block...any idea how could i do? You cannot, that's region-body property. What's a problem are you trying to solve this way? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.20.4
Try with adding the following system property to the startup arguments for the server: com.ibm.ws.classloader.classSharing=false i.e java -Dcom.ibm.ws.classloader.classSharing=false ... By default WAS cashes class definitions on a per server basis, and not on a per classloader basis, as would seem natural in a J2EE container. The property above should fix the problem, I have tested it in WAS 4.0.2 and 4.0.3. Also make sure that you have the correct version of xerces (1.2.3?) either in WEB-INF/lib or in the root of the ear. Br - Johan J.Pietschmann wrote: [EMAIL PROTECTED] wrote: [04/12/02 10:30:12:407 HST] 541ff1e2 WebGroup X Servlet Error: Class org/xml/sax/XMLReader violates loader constraints: java.lang.LinkageError: Class org/xml/sax/XMLReader violates loader constraints at org.apache.fop.apps.Driver.getParserClassName(Unknown Source) For some reason the servlet container (WAS) wont load the XMLReader interface, probably because it has already one loaded from another part of the class path. That's something which requires a WAS guru, if you have a support contract, call the IBM support. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Johan Åbrandt Technical Project Manager (Tekninen projektipäällikkö) Tel. +358 9 6817 3342 Mobile. +358 40 848 8068 [EMAIL PROTECTED] Profit Software Oy Meritullinkatu 11 C 00170 Helsinki, Finland __ This message and its attachments have been found clean from known viruses with three different antivirus programs. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: from PDF to FOP
Hanasaki JiJi wrote: anyway to convert from an existing PDF to FOP? I'd say no way. See recent discussion in xsl-list: http://www.biglist.com/lists/xsl-list/archives/200211/msg00996.html -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
embedding FOP in Java
Hello, I am using the following file embedding fop: "import org.apache.fop.apps.Driver;import org.apache.fop.layout.Page;import org.apache.fop.apps.Version;import org.apache.fop.apps.XSLTInputHandler;import org.apache.fop.apps.InputHandler;import org.xml.sax.*;import org.apache.fop.messaging.MessageHandler;import java.io.*; //import org.apache.fop.apps.InputHandler;//import org.apache.fop.apps.XSLTInputHandler; public class fop{ public void fop(String xmlFile, String xslFile, String outFile){ Driver driver = new Driver();driver.setRenderer(Driver.RENDER_PDF);InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile);XMLReader parser = inputHandler.getParser();driver.setOutputStream(new FileOutputStream(outFile));driver.render(parser, inputHandler.getInputSource());}}" Unfortunately when I compile it, I get the following error: fop.java:19: cannot resolve symbolsymbol : constructor XSLTInputHandler (java.lang.String,java.lang.String)location: class org.apache.fop.apps.XSLTInputHandler InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); ^1 error Can you help me ? I would also like to embed the FOP as a Web Service. Can you give me any pointers to tutorials on this ? Regards, Boris
Re: embedding FOP in Java
i use this method and it works fine public void createPdf(String xml, String xslPath, String outputPdfPath) throws TransformerConfigurationException, TransformerException, FileNotFoundException, FOPException, IOException { MessageHandler.setScreenLogger(log); FileOutputStream fos=new FileOutputStream(outputPdfPath); Driver driver=new Driver(); driver.setLogger(log); driver.setOutputStream(fos); driver.setRenderer(Driver.RENDER_PDF); StreamSource xmlStreamSource=new StreamSource(new StringReader(xml)); Transformer transformer=TransformerFactory.newInstance().newTransformer(new StreamSource(xslPath)); transformer.transform(xmlStreamSource, new SAXResult(driver.getContentHandler())); fos.close(); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
embedding FOP in Java
Sorry for beeing forced to ask this question, I have created I java class that takes xml file and xsl file and creates pdf. Now my xml has croatian character and those are showen as #. I read documentation and it says that fonts must be avaliable on the platform. Now I don't understand this since I have croatina locale set and I can view pdf files that have croatian characters. I have tried to use different font familises for fo:block tag. (Arial, Symbol etc ...) What should I do to make it work. If you can explain it to me step by step I would be very thankful. My method is public void createPdf(String xml, String xslPath, String outputPdfPath) throws TransformerConfigurationException, TransformerException, FileNotFoundException, FOPException, IOException { Logger log = new ConsoleLogger(ConsoleLogger.LEVEL_WARN); MessageHandler.setScreenLogger(log); FileOutputStream fos=new FileOutputStream(outputPdfPath); //Options options = new Options(new File(c: \\Adis\\MedicSoft\\MedicsoftClient\\GUI\\config\\print\\userconfig.xml)); Driver driver=new Driver(); driver.setLogger(log); driver.setOutputStream(fos); driver.setRenderer(Driver.RENDER_PDF); StreamSource xmlStreamSource=new StreamSource(new StringReader(xml)); Transformer transformer=TransformerFactory.newInstance ().newTransformer(new StreamSource(xslPath)); transformer.transform(xmlStreamSource, new SAXResult(driver.getContentHandler())); fos.close(); } and xsl that is used for fop is very easy ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:template match=/ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=simple page-height=29.7cm page-width=21cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm margin-right=2.5cm fo:region-body margin-top=3cm/ fo:region-before extent=3cm/ fo:region-after extent=1.5cm/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=simple fo:flow flow-name=xsl-region-body xsl:apply-templates select=data/ /fo:flow /fo:page-sequence /fo:root /xsl:template xsl:template match=data fo:block xsl:apply-templates select=name/ xsl:apply-templates select=description/ /fo:block /xsl:template xsl:template match=name fo:block font-size=18pt font-family=sans-serif line-height=24pt space-after.optimum=15pt background-color=blue color=white text-align=center padding-top=3pt xsl:value-of select=./ /fo:block /xsl:template xsl:template match=description fo:block font-size=12pt font-family=Symbol line-height=15pt space-after.optimum=3pt text-align=justify xsl:value-of select=./ /fo:block /xsl:template /xsl:stylesheet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic space adjustment between fo:list-tem-label and fo:list-item-body
Hi Oleg, thanks for that advise. I finally find a solution based on your hint. Greetings Chris Vejrazka At 23:53 29.11.2002, you wrote: A workaround could be to change provisional-distance-between-starts value dynamically according to length of xsl:number return value in em units. Something like xsl:variable name=label xsl:call-template name=countLi/ /xsl:variable fo:list-block provisional-distance-between-starts={string-length($label)}em - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Document security of PDFs
Hi everybody, in inspecting the document security of a PDF, which was generated by FOP, i noticed that -amongst others- the changing the document property was set to allowed, security method to none and document assembly set to allowed. Naive as i was, i expected Acrobat reader documents to be secure (a vague qualifier of course). Adobe PDF files are secure and reliable, according their own website. With Acrobat (Writer) i simply was able to change the contents of the fop-generated pdf . My question is: can i get pfd documents with fop in which the security-properties are more tight, say at least changing the document set to not allowed? Thanks, Oscar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tools for Fo
Are there any tools that convert, for example, a simple excel, word or other formats to a Fo format or to a xsl/fo format? You can save an Excel file as an XML-file. (At least, i can, with my 2002 version.) Can you work from there? Oscar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tools for Fo
I was thinking of editing the XML files in the JAR produced by OpenOffice. Just dont know how to convert to FOP input format :( Oscar Schoof wrote: Are there any tools that convert, for example, a simple excel, word or other formats to a Fo format or to a xsl/fo format? You can save an Excel file as an XML-file. (At least, i can, with my 2002 version.) Can you work from there? Oscar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- = = Management is doing things right; leadership is doing the = = right things.- Peter Drucker= =___= = http://www.sun.com/service/sunps/jdc/javacenter.pdf = = www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone = = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Document security of PDFs
At 16:34 09/12/02, Oscar Schoof wrote: My question is: can i get pfd documents with fop in which the security-properties are more tight, say at least changing the document set to not allowed? I believe that if you want properly secure PDF files then you need to do that using a third party tool which adds the security after FOP has generated the file. I am sure one or two have been mentioned on this list. Alex Openweb Analysts Ltd, London. Software For Complex Websites http://www.OWAL.co.uk/ Open Source Software Companies please register here http://www.OWAL.co.uk/oss_support/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Document security of PDFs
Oscar Schoof wrote: My question is: can i get pfd documents with fop in which the security-properties are more tight, say at least changing the document set to not allowed? That's in the todo list, but still not implemented. BUt you can easily postprocess generated pdf by a third-party pdf-library like iText, see Joerg's example: http://marc.theaimsgroup.com/?l=fop-devm=102002975028427w=2. -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: embedding FOP in Java
Boris Rousseau wrote: Unfortunately when I compile it, I get the following error: fop.java:19: cannot resolve symbol symbol : constructor XSLTInputHandler (java.lang.String,java.lang.String) location: class org.apache.fop.apps.XSLTInputHandler InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile); ^ 1 error Can you help me ? The only constructor XSLTInputHandler class has is public XSLTInputHandler(File xmlfile, File xsltfile), there is no XSLTInputHandler (java.lang.String,java.lang.String) constructor. -- Oleg Tkachenko eXperanto team Multiconn Technologies, Israel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]