fo:basic-link on svg image
Hi, I was trying to set a link on one of the svg images to point out to a bookmark id set on the pdf page. Has anyone tried this before. It works fine for text data. For example, fo:basic-link internal-destination=mark1 Testing link /fo:basic-link For svg images, this doesnt work however. The following lines will not even display the svg rectangle image. fo:basic-link internal-destination=mark1 svg:rect x=100 y=100 width=100 height=200/ fo:basic-link Referring to svg examples, links in svg use a, which apparently works for a standalone svg image, but doesnt work in fop. Any help appreciated. Thanks, Saif. _ Send and receive Hotmail on your mobile device: http://mobile.msn.com
beginner (and windows) question
Hello, I tried to use Microsofts entry point for Java when invoking fop, and thus replaced java by jview in Fop.bat. May be Im doing something stupid here but Im not a developer, just a user of Java/fop, so it should be Ok, isnit? When I ran fop on docs/examples/fo/simple.fo, I got the following problem: jview -cp build\fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\xerces-1.2.3.jar;lib\avalon-framework-4.0.jar;lib\logkit-1.0.jar;lib\jimi-1.0.jar org.apache.fop.apps. Fop docs\examples\fo\simple.fo simple.pdf java.lang.NoSuchMethodError: java/io/File: method getParentFile()Ljava/io/File; not found at org/apache/fop/apps/Options.setCommandLineOptions at org/apache/fop/apps/CommandLineStarter.init at org/apache/fop/apps/CommandLineOptions.getStarter at org/apache/fop/apps/Fop.main ERREUR: java.lang.NoSuchMethodError: java/io/File: method getParentFile()Ljava/ io/File; not found Is it impossible to run fop this way? Is it another example of non portable java application (probably because of issues on Windows side)? Thanks for you help, Joël Conraud image001.gifimage001.gif
Re: fo:basic-link on svg image
The second example is not valid. You cannot simply place some piece of svg inside fo. SVG can only be used in an instream-foreign-object and the xml inside that fo object must be valid for svg. As SVG cannot link internally in the fo document then you cannot do it with svg. On 2002.03.22 03:29 Saif Khaja wrote: Hi, I was trying to set a link on one of the svg images to point out to a bookmark id set on the pdf page. Has anyone tried this before. It works fine for text data. For example, fo:basic-link internal-destination=mark1 Testing link /fo:basic-link For svg images, this doesnt work however. The following lines will not even display the svg rectangle image. fo:basic-link internal-destination=mark1 svg:rect x=100 y=100 width=100 height=200/ fo:basic-link Referring to svg examples, links in svg use a, which apparently works for a standalone svg image, but doesnt work in fop. Any help appreciated. Thanks, Saif.
Re: svg from string
I suggest you read this page: http://xml.apache.org/batik/rasterizerTutorial.html To convert svg to pdf you are simply using the PDF transcoder. On 2002.03.21 16:31 Fischer Tibor wrote: hi, i've got a java class with a method, what generates an svg object and returns it as string. i need fop to generate the svg into pdf, from the string. How? Thanks Fishy
Re: Error: null
I constructed my first xsl document to render a pdf using a singletemplate. This worked fine. However the form was rather large so Idecided to split certain parts of it into separate templates and now I amgetting a null error. Please help I used fop -xml TIPS.xml -xsl TIPS.xsl -pdf TIPS.pdf and get C:\dev\homelet2002\dist\libjava -cpc:\fop-0.20.1\build\fop.jar;c:\fop-0.20.1\lib\batik.jar;c:\fop-0.20.1\lib\xalan.jar;c:\fop-0.20.1\l ib\xerces.jar;c:\fop-0.20.1\lib\jimi-1.0.jar org.apache.fop.apps.Fop -xmlTIPS.xml -xsl TIPS.xsl -pdf TIPS.pdf FOP 0.20.1 ERROR: null snip/ fo:page-sequence snip/ I think you forgot the master-reference attribute on fo:page-sequence. 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
Re: Error: null
I'd put xsl:template select=Contents instead of xsl:template match=Contents which threw up the error: null. Thanks Mihael for telling me about the fop -d option Ian At 09:07 AM 3/22/2002 +0100, you wrote: I constructed my first xsl document to render a pdf using a singletemplate. This worked fine. However the form was rather large so Idecided to split certain parts of it into separate templates and now I amgetting a null error. Please help I used fop -xml TIPS.xml -xsl TIPS.xsl -pdf TIPS.pdf and get C:\dev\homelet2002\dist\libjava -cpc:\fop-0.20.1\build\fop.jar;c:\fop-0.20.1\lib\batik.jar;c:\fop-0.20.1\lib\xalan.jar;c:\fop-0.20.1\l ib\xerces.jar;c:\fop-0.20.1\lib\jimi-1.0.jar org.apache.fop.apps.Fop -xmlTIPS.xml -xsl TIPS.xsl -pdf TIPS.pdf FOP 0.20.1 ERROR: null snip/ fo:page-sequence snip/ I think you forgot the master-reference attribute on fo:page-sequence. 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
AW: Error compiling fop - CodePointMapping.java is empty
OK, thanks for the input, but i deleted the whole thing and unziped into a fresh folder. I also took all CLASSPATHs out of my global(?) Classpath (de-Umgebungsvariablen Win2k) and just added the jimi-1.0.jar to the lib folder. I start the original build.bat and now i get the following error: snip [style] Transforming into C:\fop\src\fop-0.20.3\build\src\org\apache\fop\ren der\pdf [style] Loading stylesheet C:\fop\src\fop-0.20.3\.\build\src\codegen\code-po int-mapping.xsl [style] Processing C:\fop\src\fop-0.20.3\build\src\codegen\encodings.xml to C:\fop\src\fop-0.20.3\build\src\org\apache\fop\render\pdf\CodePointMappi ng.java [style] Failed to process C:\fop\src\fop-0.20.3\build\src\codegen\encodings. xml BUILD FAILED C:\fop\src\fop-0.20.3\build.xml:472: javax.xml.transform.TransformerException: o rg.xml.sax.SAXParseException: File file:///C:/fop/src/fop-0.20.3/C:/fop/src/fop -0.20.3/build/src/codegen/encodings.xml not found. --- Nested Exception --- javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: File f ile:///C:/fop/src/fop-0.20.3/C:/fop/src/fop-0.20.3/build/src/codegen/enc odings.x ml not found. snip where does this Path-doubling come from, file:///C:/fop/src/fop-0.20.3/C:/fop/src/fop-0.20.3/build/src/codegen/en codings.xml i checked the build.xml, it looks all right to me, the property name=encodings.xml-stuff looks exactly as the stuff before. there must happen something strange to the ${build.codegen} Path-variable, so maybe i use the wrong xsl-processor, but that is xalan2, that comes with the whole package. any ideas? I mean if this should work with xalan2 maybe it is because of java 1.4.0? anyway, this is just because i want to use png (jimi.jar), so i think its ok for me to use jpeg or a workaround with svg. -Ursprüngliche Nachricht- Von: Christian Geisert [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 21. März 2002 18:25 An: [EMAIL PROTECTED] Betreff: Re: Error compiling fop - CodePointMapping.java is empty Sam Prokop wrote: Hi, compiling fop-0.20.3 on win2k with java 1.4.0 i get the following message [..] -- [echo] Compiling the sources [javac] Compiling 328 source files to C:\fop\src\fop-0.20.3\build\classes [javac] Note: sun.tools.javac.Main has been deprecated. [javac] error: File C:\fop\src\fop-0.20.3\build\src\org\apache\fop\render\pd f\CodePointMapping.java does not contain type org.apache.fop.render.pdf.CodePoin tMapping as expected. Please adjust the class path so that the file does not app ear in the package org\apache\fop\render\pdf. [javac] [..] Has anyone an idea, what i did wrong? Maybe using xerces2 ? Please try compiling with the jars from the distribution. Christian
possible to specify required spaces?
Does anyone know a way to pass required spaces through FOP from XML to a PDF? The normal processing of x'20' spaces collapses adjacent spaces to eliminate extra white space, which is normally good but not in all cases, and 'white-space-treatment=pre' (which would preserve these) isn't implemented yet. Does anyone know, for example, of another way to preserve these or else another blank non-printing character that we could use in the XML file for spaces we want to preserve? Thanks for any advice!
Re: Subject: text colums
While your on the subject, is there a daily/weekly digest? Thanks, Jeff Sorry for the off topic - Original Message - From: Woods, John T. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 22, 2002 12:47 PM Subject: RE: Subject: text colums | How can I temporarily remove myself from the [EMAIL PROTECTED] mailing | list. | | Thanks, | John | | -Original Message- | From: Joerg Pietschmann [mailto:[EMAIL PROTECTED] | Sent: Thursday, March 21, 2002 8:37 AM | To: FOP User | Subject: Re: Subject: text colums | | | Lauren Commons [EMAIL PROTECTED] wrote: | I am producing pdfs that will have a bullet list that | I want to display in two columns, like newspaper | columns. I won't know in advance how many items will | be in the list. | | I suppose you have | ... | liItem1/li | liItem2/li | liItem3/li | ... | and want to display | o Item1 o Item3 | o Item2 | or perhaps | o Item1 o Item2 | o Item3 | (note the difference) | | This is not easy to achieve. A first shot would be to use | a two column table distribute the list items equally between | the columns. You have also to decide whether you want to use | one row in the table or a row for every pair of items. | A sample XSLT snippet (untested): | fo:table table-layout=fixed | fo:table-column column-width=proportional-column-width()/ | fo:table-column column-width=proportional-column-width()/ | fo:table-body | fo:table-row | xsl:for-each select=li[position() div 2=0] | fo:table-cell | xsl:apply-templates | /fo:table-cell | fo:table-cell | xsl:apply-templates select=following-sibling:li | /fo:table-cell | /xsl:for-each | /fo:table-row | /fo:table-body | /fo:table | This will generate the secont variant, with one row. If you want | multiple rows, move the fo:table-row into the xsl:for-each | The first variant is a bit harder to get. | | Whether the table solution matches your expectations is up to | you. Having two columns with items flowing from the first | to the second column to fill a minimal area seems to be much | harder unless you want to have the whole page in two columns. | | Ask on the XSL list for more ideas. | | J.Pietschmann
Re: AW: possible to specify required spaces?
This works great -- thanks! S. Jayaraman To: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: onsor.chSubject: AW: possible to specify required spaces? 03/22/2002 01:33 PM Please respond to fop-user Try #160; In most fonts, this appears as a space. In some fonts, it gives some funny symbols. Cheers Jay ** [EMAIL PROTECTED] wrote: Does anyone know a way to pass required spaces through FOP from XML to a PDF? The normal processing of x'20' spaces collapses adjacent spaces to eliminate extra white space, which is normally good but not in all cases, and 'white-space-treatment=pre' (which would preserve these) isn't implemented yet. Does anyone know, for example, of another way to preserve these or else another blank non-printing character that we could use in the XML file for spaces we want to preserve? Thanks for any advice!
Re: fo:basic-link on svg image
I have SVG working in FOP, and it works great (except some minor issues, which is out of scope of this mail here). And I didnt post the complete svg code in my previous mail. Here it is what I was trying to achieve. Each rect in this svg image would point to a different bookmark in the same PDF document (as shown in comments in the svg code). !-- SVG code = -- fo:block xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:instream-foreign-object xmlns:svg=http://www.w3.org/2000/svg; svg:svg width=600 height=400 svg:rect x=20 y=20 width=100 height=200 style=stroke:rgb(0,0,0);stroke-width:1/ !-- This RECT links to book mark - 1 -- svg:rect x=15 y=30 width=110 height=50 style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/ !-- This RECT links to book mark - 2 -- svg:rect x=15 y=90 width=110 height=50 style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/ !-- This RECT links to book mark - 3 -- svg:rect x=15 y=150 width=110 height=50 style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/ svg:text x=75 y=50 style=fill:rgb(0,0,0);font-size:10;font-family:Andale MonoLTUE/svg:text /svg:svg /fo:instream-foreign-object /fo:block Now, is there any way I can provide links (either external or internal) to an SVG image inside a pdf document. Thanks, Saif. From: Joerg Pietschmann [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: FOP User [EMAIL PROTECTED] Subject: Re: fo:basic-link on svg image Date: Fri, 22 Mar 2002 11:09:21 +0100 Saif Khaja [EMAIL PROTECTED] wrote: fo:basic-link internal-destination=mark1 svg:rect x=100 y=100 width=100 height=200/ fo:basic-link If you want to embed SVG data into a FO document, you have to use a fo:instream-foreign-object. Furthermore, i vaguely remember that you need a top level svg:svg element. Therefore, try: fo:instream-foreign-object svg:svg width=10mm height=20mm viewBox=0 0 101 201 svg:rect x=0 y=0 width=100 height=200/ /svg:svg /fo:instream-foreign-object I think it would be a good idea to try the embedded SVG code in a SVG viewer first in order to see whether it works and embed it only after you got it working. It may still be tricky to manage the window/viewport issues, documentation is very scarce. Assistance to get your SVG working is more likely to be found on other lists. If you use Batik as standalone viewer, you could try batik-user. J.Pietschmann _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
long word wrapping problem solved in Fop-0.20.1 ???
Title: long word wrapping problem solved in Fop-0.20.1 ??? I have a word 12345678 and the space defined in table-column is 1 inch then it spills over. If the words are spaced out ,then wrapping occurs 1 2 3 4 5 6 7 8. So you see, fo:block wrap-option=wrap in Fop-0.20.1 is still not working ? I would be glad if anyone of you could help me out. Thanks, Jie -Original Message- From: Saif Khaja [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 1:33 PM To: [EMAIL PROTECTED] Subject: Re: fo:basic-link on svg image I have SVG working in FOP, and it works great (except some minor issues, which is out of scope of this mail here). And I didnt post the complete svg code in my previous mail. Here it is what I was trying to achieve. Each rect in this svg image would point to a different bookmark in the same PDF document (as shown in comments in the svg code). !-- SVG code = -- fo:block xmlns:fo=http://www.w3.org/1999/XSL/Format fo:instream-foreign-object xmlns:svg=http://www.w3.org/2000/svg svg:svg width=600 height=400 svg:rect x=20 y=20 width=100 height=200 style=stroke:rgb(0,0,0);stroke-width:1/ !-- This RECT links to book mark - 1 -- svg:rect x=15 y=30 width=110 height=50 style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/ !-- This RECT links to book mark - 2 -- svg:rect x=15 y=90 width=110 height=50 style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/ !-- This RECT links to book mark - 3 -- svg:rect x=15 y=150 width=110 height=50 style=stroke:rgb(0,0,0);stroke-width:1;fill:rgb(60,237,248)/ svg:text x=75 y=50 style=fill:rgb(0,0,0);font-size:10;font-family:Andale MonoLTUE/svg:text /svg:svg /fo:instream-foreign-object /fo:block Now, is there any way I can provide links (either external or internal) to an SVG image inside a pdf document. Thanks, Saif. From: Joerg Pietschmann [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: FOP User [EMAIL PROTECTED] Subject: Re: fo:basic-link on svg image Date: Fri, 22 Mar 2002 11:09:21 +0100 Saif Khaja [EMAIL PROTECTED] wrote: fo:basic-link internal-destination=mark1 svg:rect x=100 y=100 width=100 height=200/ fo:basic-link If you want to embed SVG data into a FO document, you have to use a fo:instream-foreign-object. Furthermore, i vaguely remember that you need a top level svg:svg element. Therefore, try: fo:instream-foreign-object svg:svg width=10mm height=20mm viewBox=0 0 101 201 svg:rect x=0 y=0 width=100 height=200/ /svg:svg /fo:instream-foreign-object I think it would be a good idea to try the embedded SVG code in a SVG viewer first in order to see whether it works and embed it only after you got it working. It may still be tricky to manage the window/viewport issues, documentation is very scarce. Assistance to get your SVG working is more likely to be found on other lists. If you use Batik as standalone viewer, you could try batik-user. J.Pietschmann _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.