Open and print pdf files
Hi all, Fop is cool but once i have successfully created my pdf file it would be nice to open and print it. Does anyone know of a platform independent way to open a pdf file. So far the only way i have found is platform dependent ( for NT : Runtime.getRuntime().exec(cmd /c start +txtPdf.getText()); ). I was thinking that if java provided a way to display an active http link it would be easy to open a pdf file via the default web browser. What do you think? Does anyone know how to send either ps or pdf directly to the printer (or via a print dialog)? Thank you for your help Franck
protection
hello all, Is there a way to password protect a pdf ? Xavier
AW: Problem with SVG only Black White
Thanx for your suggestions, we had some gradiants in the svg, which were displayed in just black. and it seems, that fop ignores the style given by the svg-tag. where there are attributes like fill-opacity color-interpolation color-rendering etc. and maybe these things make the svg look nice in batik and the adobe-viewer. because in the svg the fill attribute had only none, black and gray as values. here is the svg tag we´re using... svg xmlns:xlink=http://www.w3.org/1999/xlink; style=fill-opacity:1; color-interpolation:auto; color-rendering:auto; text-rendering:auto; stroke:black; stroke-linecap:square; stroke-miterlimit:10; stroke-opacity:1; shape-rendering:auto; fill:red; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:apos;sansserifapos;; font-style:normal; stroke-linejoin:miter; font-size:12; image-rendering:auto; stroke-dashoffset:0; xmlns=http://www.w3.org/2000/svg; after all, it seems i have to go deeper into this svg stuff. cheers sam -Ursprüngliche Nachricht- Von: J.Pietschmann [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 14. Mai 2002 21:17 An: [EMAIL PROTECTED] Betreff: Re: Problem with SVG only Black White Sam Prokop wrote: i´ve got some svg made by jfree-chart, they look nice in the batik-browser, but if i render them with fop 0.20.3 to pdf they are just black and white. This hasn't come up before. As a wild guess check whether your SVG contains transparent stuff or certain other shading effects, FOP can't render them properly into PDF. Apart from this, I'd have to resort to mind reading, which I'm very bad at, unless you post your SVG code. It would be nice if you trimmed it down as much as possible. This may also reveal the problem to you. J.Pietschmann
Re: protection
You can use iText after you have generated your PDF. It is a Java PDF API that allows you to manipulate pdf pages by pages and to control PDF document properties like encryption and viewing and printing... it's easy to use and only have a few limitation like some image type not handled. see http://itext.sourceforge.net Cyril At 10:08 16/05/2002 +0200, you wrote: hello all, Is there a way to password protect a pdf ? Xavier
Re: AW: Open and print pdf files
Apart From Chaumette Patrick idea,have you tried the FOPPrintServlet.java example from FOP,it works good for me.I tested only in Windows Envt.Of course it depends whether u use Servlet/JSP. Regards Balaji --- Chaumette, Patrick [EMAIL PROTECTED] wrote: Hello Franck, on WinNT you can directly send PostScript to a printer with something like this: byte[] psByteArray = ... produced from FOP, a PostScript byte Array File printerFile = new File(ntservername\\printername); FileOutputStream os = new FileOutputStream(file); os.write(psByteArray); os.close(); Actually we are currently exactly doing this. Your printer has to be PostScript capable. On Unix maybe one has just to open the printer queue, don't know. PDF Printing directly to a printer works only if the printer knows how to interpret pdf (sure an expensive printer, don't know which supports this currently) or you will have to convert PDF to PostScript with some tool. Hope this helps, greetings, Patrick Dipl. Inform. Patrick Chaumette T-Systems ITS GmbH Service Prozesse Retail Hausanschrift: Fasanenweg 9, 70771 Leinfelden-Echterdingen Postanschrift: Postfach 100258, 70746 Leinfelden-Echterdingen Telefon: (0711)972-2437 Telefax: (0711)972-1949 E-Mail: [EMAIL PROTECTED] Internet: http://www.t-systems.de -Ursprüngliche Nachricht- Von: MARTIN Franck [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 16. Mai 2002 09:50 An: [EMAIL PROTECTED] Betreff: Open and print pdf files Hi all, Fop is cool but once i have successfully created my pdf file it would be nice to open and print it. Does anyone know of a platform independent way to open a pdf file. So far the only way i have found is platform dependent ( for NT : Runtime.getRuntime().exec(cmd /c start +txtPdf.getText()); ). I was thinking that if java provided a way to display an active http link it would be easy to open a pdf file via the default web browser. What do you think? Does anyone know how to send either ps or pdf directly to the printer (or via a print dialog)? Thank you for your help Franck http://briefcase.yahoo.com.au - Yahoo! Briefcase - Save your important files online for easy access!
RE: foregroundColor
A note about using XML-SPY for fop development. I used it quite a bit lately and while I found it good, the DTD it uses for XSL:FO is far from complete and sometimes incorrect. That's not to say it isn't very useful, just be careful and have the spec (http://www.w3.org/TR/xsl/) handy as well. [Niki Dinsey] Hi there ppl, I've spoken to XML Spy about this a couple of weeks ago, seems they used a DTD referenced from the XSL W3C Working Draft, 21 Apr 1999. This was the last time w3c brought out a DTD for the fo namespace. They (xmlspy) won't allow you to manually edit the auto complete so I guess we're stuck with this outdated version till W3C get round to bringing something new out. Does anybody have a newer version of the fo DTD/XSD Check the mail from XMLSpy below: Niks _ Dear Niks, I have spoken to our CTO and he has said that we have not implemented the new commands due to the fact that the W3C hasn't brought about a new XSL dtd since the http://www.w3.org/TR/1999/WD-xsl-19990421/#AEN7695 version. Until they bring out a dtd we cannot change the elements in the entry helper list. I am sorry, but you cannot change this manually yourself in XML Spy. Kind regards Birgit ... Birgit Reidinger ... IT Support Engineer ... Altova GmbH - The XML Spy Company == XML Spy 4.3 Suite: the original award-winning IDE, Document Editor, XSLT Designer, Browser PlugIn, XML Schema Editor, and SOAP Debugger Visit www.xmlspy.com to download your free evaluation copy today! === The information transmitted in this message and/or as an attachment to it is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Altova GmbH and Altova, Inc. do not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of Altova GmbH and Altova, Inc. unless otherwise specifically stated. Thank you!
keep-with-next=always not honored on a group of table rows
I would like to keep together on a same page a group of table rows. I used keep-with-next=always and all except the last fo:table-row elements of the group, but for the attached XFO document (a course schedule), a page-break occurs in the middle of a group of 9 rows (16:15), between pages 2 and 3. Obviously, the group of rows would hold within a single page, so why is this page break occuring? How should the keep-with-next property be specified on a fo:table-row? I saw from previous postings that keep-with-next=always was used; the XLSFO REC 1.0 spec rather mentions keep-with-next.within-page=always. I tried the two but it didn't work either. I did read from J. Pietschmann (http://marc.theaimsgroup.com/?l=fop-userm=101950534709263w=2) that the keep-with-next property should work for table rows. Is this true for FOP 0.20.3 or should I get the latest CVS version? Or did I overlook something? I joined the source XFO, as it is rather lengthy, and marked the group of row which spans across pages 2 and 3 with the '[BEGIN]' and '[END]' text markers. As there is a keep-with-next=always on each row, but the last, I would expect the group to be rendered on start of page 3. Please note that there are external references to small SVG glyphs. I also joined the resulting PDF document; the offending page break occurs within the group of rows labeled 16:15, at end of page 2. I tried with FOP 0.20.3, binary distribution, JDK 1.3.1_02 (win2K). Any kind of advice would be greatly appreciated! Kind regards Olivier Lange Some history: For the same document, I first had trouble with this group of rows in a table, were the first cell spanned across a group of 9 rows; the group of rows with the spanned cell crosses the page boundary, but no page break occurred. I found that there was already a bug #6997 Row-spanned row data breaks over a page within a column filled in the Apache bug database, so I added my source document as broken testcase; there is also the resulting broken PDF document: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6997 ?xml version=1.0 encoding=iso-8859-1? !-- HEI Course schedule, Summer 2002 Le Petit Atelier de Génie logiciel, O. Lange [EMAIL PROTECTED] keep-with-next property seems not to be honored for the group of 9 rows between pages two and three. Search for text [BEGIN] below. FOP 0.20.3, binary distribution, JDK 1.3.1_02 (win2k). -- !-- xpg:page -- fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:xpg=urn:petit-atelier.ch:xpg xmlns:svg=http://www.w3.org/2000/svg; xmlns:dcq=http://purl.org/dc/qualifiers/1.0/; xmlns:dc=http://purl.org/dc/elements/1.1/; xmlns:xlink=http://www.w3.org/1999/xlink; !-- Document masters -- fo:layout-master-set fo:simple-page-master margin-right=1cm margin-left=1cm margin-bottom=0.75cm margin-top=0.75cm page-width=21cm page-height=29.7cm master-name=page-a4-first fo:region-before extent=2.25cm/ fo:region-body margin-right=1cm margin-left=1cm margin-bottom=1.25cm margin-top=2.75cm/ fo:region-after extent=0.5cm/ /fo:simple-page-master fo:simple-page-master margin-right=1cm margin-left=1cm margin-bottom=0.75cm margin-top=0.75cm page-width=21cm page-height=29.7cm master-name=page-a4-all-but-first fo:region-body margin-right=1cm margin-left=1cm margin-bottom=1.25cm margin-top=1.25cm/ fo:region-after extent=0.5cm/ /fo:simple-page-master fo:page-sequence-master master-name=all fo:repeatable-page-master-alternatives fo:conditional-page-master-reference page-position=first master-reference=page-a4-first/ fo:conditional-page-master-reference page-position=any master-reference=page-a4-all-but-first/ /fo:repeatable-page-master-alternatives /fo:page-sequence-master /fo:layout-master-set !-- Document content page sequences -- fo:page-sequence master-reference=all !-- region-before reference area -- fo:static-content flow-name=xsl-region-before fo:block text-align=center fo:external-graphic src=..\resources\img\hei-banner-vect.svg/ /fo:block /fo:static-content !-- region-after reference area -- fo:static-content flow-name=xsl-region-after fo:table inline-progression-dimension.maximum=100% inline-progression-dimension=19cm table-layout=fixed border-collapse=collapse fo:table-column number-columns-repeated=3 column-width=proportional-column-width(1)/ fo:table-body fo:table-row font-family=Helvetica color=#00 font-size=9pt fo:table-cell fo:block text-align=starthei-csched-2002-summer.xml/fo:block /fo:table-cell fo:table-cell fo:block text-align=center Page fo:page-number/ de fo:page-number-citation ref-id=lastpage-sentinel/ /fo:block /fo:table-cell fo:table-cell fo:block text-align=end16.05.2002/fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:static-content !-- region-body reference area -- fo:flow flow-name=xsl-region-body fo:block font-family=Helvetica color=#00 background-color=#FF fo:block space-after=10pt keep-with-next=always space-before=0pt fo:block font-family=Helvetica color=#00 font-size=14pt
Examples
On the examples page of the xml.apache.org/fop site, http://xml.apache.org/fop/embedding.html there is this sample: Driver driver = new Driver(new InputSource (args[0]), new FileOutputStream(args[1])); driver.setRenderer(RENDER_PDF); driver.run(); I thought perhaps RENDER_PDF referred to an (imported) constant. But I from Java1.4 am told: C:\PXML\_printing\test.java:33: cannot resolve symbol symbol : variable RENDER_PDF location: class test driver.setRenderer(RENDER_PDF); Could someone please tell me of my error? TIA Lee Lee Goddard perl -e while(1){print rand0.5?chr 47:chr 92}
AW: Examples
Its not an error, its wrong java code RENDER_PDF is s static member variable of the Driver class, so you have to type: driver.setRenderer(Driver.RENDER_PDF); Cheers Mirko -Ursprungliche Nachricht- Von: Lee Goddard [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 16. Mai 2002 16:39 An: [EMAIL PROTECTED] Betreff: Examples On the examples page of the xml.apache.org/fop site, http://xml.apache.org/fop/embedding.html there is this sample: Driver driver = new Driver(new InputSource (args[0]), new FileOutputStream(args[1])); driver.setRenderer(RENDER_PDF); driver.run(); I thought perhaps RENDER_PDF referred to an (imported) constant. But I from Java1.4 am told: C:\PXML\_printing\test.java:33: cannot resolve symbol symbol : variable RENDER_PDF location: class test driver.setRenderer(RENDER_PDF); Could someone please tell me of my error? TIA Lee Lee Goddard perl -e while(1){print rand0.5?chr 47:chr 92}
Newbie: html-like table to fo-table
Hi folks, again we need your help: We are using FOP and XSLT for creating pdf documents which works fine - excepting tables! The dtd contains a table-tag like similar to html: [...] !ENTITY % alignes align (left | center | right) #IMPLIED valign (top | middle | bottom | baseline) #IMPLIED !ENTITY % alignes_span %alignes; rowspan NMTOKEN '1' colspan NMTOKEN '1' [...] !ELEMENT table (title?, thead?, tbody+, tfoot?) !ATTLIST table %id_req; width CDATA #IMPLIED summary CDATA #IMPLIED cellspacing CDATA #IMPLIED cellpadding CDATA #IMPLIED !ELEMENT thead (tr)+ !ATTLIST thead %id_imp; %alignes; !ELEMENT tfoot (tr)+ !ATTLIST tfoot %id_imp; %alignes; !ELEMENT tbody (tr)+ !ATTLIST tbody %id_imp; %alignes; !ELEMENT tr (th | td)+ !ATTLIST tr %id_imp; %alignes; !ELEMENT th (%outer;)* !ATTLIST th %id_imp; %alignes_span; !ELEMENT td (%outer;)* !ATTLIST td %id_imp; %alignes_span; [...] Transforming into html with xslt was no problem as expected, but how could a template look like in fo (a bit heavy for newbies because of counting columns etc.)? The fo:table-markups are a bit confusing, and some of them don't seem to work as expected in the current FOP-version (like table-and-caption). Who has experiences with fo:tables and xslt and could give us a hint? Jens Posingies ___ COMMODORE 64 BASIC V2 64K RAM SYSTEM 38911 BASIC BYTES FREE READY. _ ___
AW: Examples
Hallo Lee, I think RENDER_PDF is an defined public Constant of the Class Driver. If I?m right, the following code must function: driver.setRenderer(Driver.RENDER_PDF); -Ursprungliche Nachricht- Von: Lee Goddard [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 16. Mai 2002 15:39 An: [EMAIL PROTECTED] Betreff: Examples On the examples page of the xml.apache.org/fop site, http://xml.apache.org/fop/embedding.html there is this sample: Driver driver = new Driver(new InputSource (args[0]), new FileOutputStream(args[1])); driver.setRenderer(RENDER_PDF); driver.run(); I thought perhaps RENDER_PDF referred to an (imported) constant. But I from Java1.4 am told: C:\PXML\_printing\test.java:33: cannot resolve symbol symbol : variable RENDER_PDF location: class test driver.setRenderer(RENDER_PDF); Could someone please tell me of my error? TIA Lee Lee Goddard perl -e while(1){print rand0.5?chr 47:chr 92}
unicode problem
hi, i have an java string with an greek alpha letter. i do not know how to convert the java unicode string so that i can display it with fop i need something like: fo:inline font-family=Symbol font-size=7pt#x03B1;/fo:inline
Re: Newbie: html-like table to fo-table
Who has experiences with fo:tables and xslt and could give us a hint? It took me a month to get something passable using Perl and XSL:FO, and I can't really it to you as I sold the copyright. But: there is a very good tutorial on the site of another FOP... www.renderx.com COMMODORE 64 BASIC V2 Then you may recognise my sig from the VIC-20 manual! Always wanted a C64... Lee Goddard perl -e while(1){print rand0.5?chr 47:chr 92}
Re: PDF from FOP to database as BLOB
At 10:51 16/05/2002 -0500, [EMAIL PROTECTED] wrote: ... Since our users can wait for these reports we've decided to run a nightly job to create them and store the PDFs in our database as a BLOB. That way during peak usage hours our servers will only need to deal with returning the PDF to the browser. ...My question is, HOW, using FOP and JDBC can I get my PDF into the database as a BLOB. Any Ideas would be very helpful. I worked on a project like that. One big question: what is wrong with a file system? In other words, why tax a database with such a heavy load, when you can use the Apache HTTPD. Just write a little Perl to convert the docs as they come in, and put them in an obvious place, and add them to an index page in good old HTML. Or, if you really wanna use that DB, index their URI and attributes. Or is there a good reason why not? (Like, you work for Oracle...) Lee Lee Goddard perl -e while(1){print rand0.5?chr 47:chr 92}
Re: foregroundColor
Niki I posted a schema to the dev list last week. The schema is pretty good. Feel free to point it out to the folks at XMLSpy. They can use XMLSPY to generate their own DTD from that. The schema has a few tweaks left before I post it here. Chuck Paussa Niki Dinsey wrote: A note about using XML-SPY for fop development. I used it quite a bit lately and while I found it good, the DTD it uses for XSL:FO is far from complete and sometimes incorrect. That's not to say it isn't very useful, just be careful and have the spec (http://www.w3.org/TR/xsl/) handy as well. [Niki Dinsey] Hi there ppl, I've spoken to XML Spy about this a couple of weeks ago, seems they used a DTD referenced from the XSL W3C Working Draft, 21 Apr 1999. This was the last time w3c brought out a DTD for the fo namespace. They (xmlspy) won't allow you to manually edit the auto complete so I guess we're stuck with this outdated version till W3C get round to bringing something new out. Does anybody have a newer version of the fo DTD/XSD Check the mail from XMLSpy below: Niks _ Dear Niks, I have spoken to our CTO and he has said that we have not implemented the new commands due to the fact that the W3C hasn't brought about a new XSL dtd since the http://www.w3.org/TR/1999/WD-xsl-19990421/#AEN7695 version. Until they bring out a dtd we cannot change the elements in the entry helper list. I am sorry, but you cannot change this manually yourself in XML Spy. Kind regards Birgit
Re: protection
Thanx, Cyril Do you mean, there is noway to do this with FOP today ? Is it planned in a short futur ? Xavier Cyril Rognon wrote: You can use iText after you have generated your PDF. It is a Java PDF API that allows you to manipulate pdf pages by pages and to control PDF document properties like encryption and viewing and printing... it's easy to use and only have a few limitation like some image type not handled. see http://itext.sourceforge.net Cyril At 10:08 16/05/2002 +0200, you wrote: hello all, Is there a way to password protect a pdf ? Xavier
AW: PDF from FOP to database as BLOB
Hello Shawn, you can make FOP write to an ByteArrayOutputStream. By doing something like this: ByteArrayOutputStream os = new ByteArrayOutputStream(); ...(driver+FOP stuff)... driver.setOutputStream(os); InputStream is = new ByteArrayInputStream(os.getBytes()); .. now read from stream... Hope this helps, greetings, Patrick Dipl. Inform. Patrick Chaumette T-Systems ITS GmbH Service Prozesse Retail Hausanschrift: Fasanenweg 9, 70771 Leinfelden-Echterdingen Postanschrift: Postfach 100258, 70746 Leinfelden-Echterdingen Telefon: (0711)972-2437 Telefax: (0711)972-1949 E-Mail: [EMAIL PROTECTED] Internet: http://www.t-systems.de -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 16. Mai 2002 17:52 An: [EMAIL PROTECTED] Betreff: PDF from FOP to database as BLOB Hi, Currently we are dynamically creating our PDF documents using FOP in real-time and displaying them on the browser without a problem. We've handled the CPU intensiveness of FOP by limiting the number of users that can concurrently create a report to 1 or 2 (depending on the server). BUT - As the number of users requesting PDF reports on our application scales up we'll need a better solution. Since our users can wait for these reports we've decided to run a nightly job to create them and store the PDFs in our database as a BLOB. That way during peak usage hours our servers will only need to deal with returning the PDF to the browser. My question is, HOW, using FOP and JDBC can I get my PDF into the database as a BLOB. The java.sql.PreparedStatement method setBinaryStream(int parameterIndex, InputStreamx, int length) requires an input stream - how can I get this from FOP? If I instead us the java.sql.PreparedStatement method setBlob (int i, Blob x) method - how can I create a BLOB from what I have from FOP? Any Ideas would be very helpful. Thank You! Shawn
RES: Newbie: Error trying to convert (standalone) the simple.fo e xampl e after first installation...
Thanks, i tried your first suggestion but i still didn't try rebuilding FOP.jar (i'll to do later).. i received this error. Do you know how resolve it ? Exception in thread main java.lang.NoClassDefFoundError: org/apache/log/format/Formatter at org.apache.fop.apps.Fop.main(Fop.java:16) Thanks in advance. - Mensagem original - De: J.Pietschmann [SMTP:[EMAIL PROTECTED] Enviada em: quarta-feira, 15 de maio de 2002 19:51 Para: [EMAIL PROTECTED] Assunto: Re: Newbie: Error trying to convert (standalone) the simple.fo exampl e after first installation... Gilson Nascimento D Elrei wrote: I have donwloaded and installed FOP, i tried to convert the simple.fo file using it like my first interaction with this tool, but i'm receiving this follow message error: [ERROR]: Don't know what to do with This is a known problem caused either by the DOS command processor or the JVM. It is specific to the 16bit Windows variants. Nobody has yet published a workaround, you'll have to experiment a bit by yourself. You can, for example, try java -jar bin\fop.jar nnn.fo nnn.pdf which might work (or not). If all else fails, get the source distribution, open the file src\org\apache\fop\apps\CommandLineOptions.java, kill the line throwing the exception wih the error message above and rebuild FOP. J.Pietschmann
Re: AW: PDF from FOP to database as BLOB
Thank you! - That's just what I was looking for! I'll give it a try. _ Hello Shawn, you can make FOP write to an ByteArrayOutputStream. By doing something like this: ByteArrayOutputStream os = new ByteArrayOutputStream(); (driver+FOP stuff)... driver.setOutputStream(os); InputStream is = new ByteArrayInputStream(os.getBytes()); ... now read from stream... Hope this helps, greetings, Patrick
AW: Newbie: Error trying to convert (standalone) the simple.fo ex ampl e after first installation...
Hello Gilson, the Exception means that the class org.apache.log.format.Formatter couldnt be found in the Classpath. Maybe you should check this. Greetings, Patrick Dipl. Inform. Patrick Chaumette T-Systems ITS GmbH Service Prozesse Retail Hausanschrift: Fasanenweg 9, 70771 Leinfelden-Echterdingen Postanschrift: Postfach 100258, 70746 Leinfelden-Echterdingen Telefon: (0711)972-2437 Telefax: (0711)972-1949 E-Mail: [EMAIL PROTECTED] Internet: http://www.t-systems.de -Ursprüngliche Nachricht- Von: Gilson Nascimento D Elrei [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 16. Mai 2002 18:22 An: '[EMAIL PROTECTED]' Betreff: RES: Newbie: Error trying to convert (standalone) the simple.fo exampl e after first installation... Thanks, i tried your first suggestion but i still didn't try rebuilding FOP.jar (i'll to do later).. i received this error. Do you know how resolve it ? Exception in thread main java.lang.NoClassDefFoundError: org/apache/log/format/Formatter at org.apache.fop.apps.Fop.main(Fop.java:16) Thanks in advance. - Mensagem original - De: J.Pietschmann [SMTP:[EMAIL PROTECTED] Enviada em: quarta-feira, 15 de maio de 2002 19:51 Para: [EMAIL PROTECTED] Assunto:Re: Newbie: Error trying to convert (standalone) the simple.fo exampl e after first installation... Gilson Nascimento D Elrei wrote: I have donwloaded and installed FOP, i tried to convert the simple.fo file using it like my first interaction with this tool, but i'm receiving this follow message error: [ERROR]: Don't know what to do with This is a known problem caused either by the DOS command processor or the JVM. It is specific to the 16bit Windows variants. Nobody has yet published a workaround, you'll have to experiment a bit by yourself. You can, for example, try java -jar bin\fop.jar nnn.fo nnn.pdf which might work (or not). If all else fails, get the source distribution, open the file src\org\apache\fop\apps\CommandLineOptions.java, kill the line throwing the exception wih the error message above and rebuild FOP. J.Pietschmann
RE: unicode problem
Unicode is Ok in your example. I guess, your issue is with fonts. -Original Message- From: Henrik Holle [mailto:[EMAIL PROTECTED] Sent: Thursday, May 16, 2002 10:46 AM To: [EMAIL PROTECTED] Subject: unicode problem hi, i have an java string with an greek alpha letter. i do not know how to convert the java unicode string so that i can display it with fop i need something like: fo:inline font-family=Symbol font-size=7pt#x03B1;/fo:inline
keep-with-next=always not honored on a group of table rows
I would like to keep together on a same page a group of table rows. I used keep-with-next=always and all except the last fo:table-row elements of the group, but for the attached XFO document (a course schedule), a page-break occurs in the middle of a group of 9 rows (16:15), between pages 2 and 3. Obviously, the group of rows would hold within a single page, so why is this page break occuring? How should the keep-with-next property be specified on a fo:table-row? I saw from previous postings that keep-with-next=always was used; the XLSFO REC 1.0 spec rather mentions keep-with-next.within-page=always. I tried the two but it didn't work either. I did read from J. Pietschmann (http://marc.theaimsgroup.com/?l=fop-userm=101950534709263w=2) that the keep-with-next property should work for table rows. Is this true for FOP 0.20.3 or should I get the latest CVS version? Or did I overlook something? I joined the source XFO, as it is rather lengthy, and marked the group of row which spans across pages 2 and 3 with the '[BEGIN]' and '[END]' text markers. As there is a keep-with-next=always on each row, but the last, I would expect the group to be rendered on start of page 3. Please note that there are external references to small SVG glyphs. I also joined the resulting PDF document; the offending page break occurs within the group of rows labeled 16:15, at end of page 2. I tried with FOP 0.20.3, binary distribution, JDK 1.3.1_02 (win2K). Any kind of advice would be greatly appreciated! Kind regards Olivier Lange Some history: For the same document, I first had trouble with this group of rows in a table, were the first cell spanned across a group of 9 rows; the group of rows with the spanned cell crosses the page boundary, but no page break occurred. I found that there was already a bug #6997 Row-spanned row data breaks over a page within a column filled in the Apache bug database, so I added my source document as broken testcase; there is also the resulting broken PDF document: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6997 ?xml version=1.0 encoding=iso-8859-1? !-- HEI Course schedule, Summer 2002 Le Petit Atelier de Génie logiciel, O. Lange [EMAIL PROTECTED] keep-with-next property seems not to be honored for the group of 9 rows between pages two and three. Search for text [BEGIN] below. FOP 0.20.3, binary distribution, JDK 1.3.1_02 (win2k). -- !-- xpg:page -- fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:xpg=urn:petit-atelier.ch:xpg xmlns:svg=http://www.w3.org/2000/svg; xmlns:dcq=http://purl.org/dc/qualifiers/1.0/; xmlns:dc=http://purl.org/dc/elements/1.1/; xmlns:xlink=http://www.w3.org/1999/xlink; !-- Document masters -- fo:layout-master-set fo:simple-page-master margin-right=1cm margin-left=1cm margin-bottom=0.75cm margin-top=0.75cm page-width=21cm page-height=29.7cm master-name=page-a4-first fo:region-before extent=2.25cm/ fo:region-body margin-right=1cm margin-left=1cm margin-bottom=1.25cm margin-top=2.75cm/ fo:region-after extent=0.5cm/ /fo:simple-page-master fo:simple-page-master margin-right=1cm margin-left=1cm margin-bottom=0.75cm margin-top=0.75cm page-width=21cm page-height=29.7cm master-name=page-a4-all-but-first fo:region-body margin-right=1cm margin-left=1cm margin-bottom=1.25cm margin-top=1.25cm/ fo:region-after extent=0.5cm/ /fo:simple-page-master fo:page-sequence-master master-name=all fo:repeatable-page-master-alternatives fo:conditional-page-master-reference page-position=first master-reference=page-a4-first/ fo:conditional-page-master-reference page-position=any master-reference=page-a4-all-but-first/ /fo:repeatable-page-master-alternatives /fo:page-sequence-master /fo:layout-master-set !-- Document content page sequences -- fo:page-sequence master-reference=all !-- region-before reference area -- fo:static-content flow-name=xsl-region-before fo:block text-align=center fo:external-graphic src=..\resources\img\hei-banner-vect.svg/ /fo:block /fo:static-content !-- region-after reference area -- fo:static-content flow-name=xsl-region-after fo:table inline-progression-dimension.maximum=100% inline-progression-dimension=19cm table-layout=fixed border-collapse=collapse fo:table-column number-columns-repeated=3 column-width=proportional-column-width(1)/ fo:table-body fo:table-row font-family=Helvetica color=#00 font-size=9pt fo:table-cell fo:block text-align=starthei-csched-2002-summer.xml/fo:block /fo:table-cell fo:table-cell fo:block text-align=center Page fo:page-number/ de fo:page-number-citation ref-id=lastpage-sentinel/ /fo:block /fo:table-cell fo:table-cell fo:block text-align=end16.05.2002/fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:static-content !-- region-body reference area -- fo:flow flow-name=xsl-region-body fo:block font-family=Helvetica color=#00 background-color=#FF fo:block space-after=10pt keep-with-next=always space-before=0pt fo:block font-family=Helvetica color=#00 font-size=14pt
Re: unicode problem
Henrik Holle wrote: i have an java string with an greek alpha letter. i do not know how to convert the java unicode string so that i can display it with fop i need something like: fo:inline font-family=Symbol font-size=7pt#x03B1;/fo:inline You have at least two options: 1. Let the Java library write a stream in an encoding which is understood by an XML parser. Look at the documentation for java.io.OutputStreamWriter for this purpose. Create one with UTF-8 or perhaps another UTF encoding, like w=new java.io.OutputStreamWriter(new FileOutputStream(f.xml),UTF-8) w.write(theString,0,theString.length()); Be sure to put an XML declaration in front with either encoding=UTF-8 or no encoding specification at all (UTF-8 can be autodetected). There is an overwiev of character encoding handling in Java on the package summary for java.lang. 2. Print the XML character references yourself. This isn't hard (assuming your default character encoding is ASCII or an ASCII extension like ISO-8859). for( int i=0;itheString.length();i++ ) { char c=theString.charAt(i); int ci=(int)c; if( ci=127 ) { System.out.print(c); } else { System.out.print(#+ci+;); } } J.Pietschmann
Re: AW: Examples
Kondert Uwe wrote: I think RENDER_PDF is an defined public Constant of the Class Driver. If I?m right, the following code must function: driver.setRenderer(Driver.RENDER_PDF); This should work. Look at docs/examples/embedding/FopServlet.java J.Pietschmann
Re: RES: Newbie: Error trying to convert (standalone) the simple.fo e xampl e after first installation...
Gilson Nascimento D Elrei wrote: Thanks, i tried your first suggestion but i still didn't try rebuilding FOP.jar (i'll to do later).. i received this error. Do you know how resolve it ? Exception in thread main java.lang.NoClassDefFoundError: Umm, bad luck. Move or copy fop.jar into the FOP installation directory (where fop.bat and the stuff alreaddy are), and use java -jar fop.jar nnn.fo nnn.pdf This should avoid the problem above. J.Pietschmann
Re: Is it ok to use break-after=page in a table cell
Venu Reddy wrote: Is it ok to use break-after=page attribute on a fo:block which is embedded in a fo:table-cell. This cell is the last one in the fo:table-row. I need to insert a page break after some user defined table-rows, what is the best way to accomplish this. I'd try to set the break on the fo:table-row first. J.Pietschmann