Break PDF into 2
Hi, Is there a way using FOP to break a PDF into two after x number of pages...using XSL 2.0? getting the page number? The problem is that we need to break a book after 600 pages into two books with the book number on the front cover. The other problem is that we would need to before hand how many pages there will be when processing the front cover. I guess it is not possible...Anybody has experience with this? tx., -- Raphael
AW: Break PDF into 2
Hi Raphael, Is there a way using FOP to break a PDF into two after x number of pages...using XSL 2.0? getting the page number? The problem is that we need to break a book after 600 pages into two books with the book number on the front cover. The other problem is that we would need to before hand how many pages there will be when processing the front cover. I guess it is not possible...Anybody has experience with this? Do you really want to break after exactly 600 pages, no matter if you are for example in the middle of a text block or so? If yes, I'd guess it would be possible to define a page-master-sequence consisting of the front page, 599 times the data page (with a data region), the second front page containing only static content (no data region) and 599 times the data page again. Then a flow into the data region should fill 599 pages, the generate the second front page without filling in data from the flow, the go on filling data pages. Regards, Georg Datterl -- Kontakt -- Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH:www.irs-nbg.de Willmy PrintMedia GmbH:www.willmy.de Willmy Consult Content GmbH: www.willmycc.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Break PDF into 2
Georg, Thanks for this i will experiment with your suggestion...looks like a way forward. Tx(!) Raphael On Fri, Nov 21, 2008 at 11:08 AM, Georg Datterl [EMAIL PROTECTED]wrote: Hi Raphael, Is there a way using FOP to break a PDF into two after x number of pages...using XSL 2.0? getting the page number? The problem is that we need to break a book after 600 pages into two books with the book number on the front cover. The other problem is that we would need to before hand how many pages there will be when processing the front cover. I guess it is not possible...Anybody has experience with this? Do you really want to break after exactly 600 pages, no matter if you are for example in the middle of a text block or so? If yes, I'd guess it would be possible to define a page-master-sequence consisting of the front page, 599 times the data page (with a data region), the second front page containing only static content (no data region) and 599 times the data page again. Then a flow into the data region should fill 599 pages, the generate the second front page without filling in data from the flow, the go on filling data pages. Regards, Georg Datterl -- Kontakt -- Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH:www.irs-nbg.de Willmy PrintMedia GmbH:www.willmy.de Willmy Consult Content GmbH: www.willmycc.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Raphael Parree CTO SOA Evangelist phone +33 683 468663 Disclaimer... The information contained in this message may be confidential and is intended to be exclusively for the addressee. Sender's written permission is needed prior to forwarding or otherwise using the content of the message, whether completely or partially. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. Please rely on your own virus checking, no responsibility is taken by the sender for any damage rising out of any bug or virus infection.
SVG1.2 and flowRoot in PDF
Hi, I would like to use the flowing text abilities of SVG1.2 with FOP but i can't get FOP to switch to SVG1.2 mode and i get this error: GRAVE: Exception org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot). at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) - org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot). at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source) at org.apache.batik.dom.svg.SVGDOMImplementation.createElementNS(Unknown Source) at org.apache.batik.dom.svg.SVGOMDocument.createElementNS(Unknown Source) at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:182) at org.apache.fop.util.DOMBuilderContentHandlerFactory$Handler.startElement(DOMBuilderContentHandlerFactory.java:124) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) I found a thread in the archives which is exactly what i'm trying to do: http://fop-users.markmail.org/search/?q=flowroot#query:flowroot+page:1+mid:h2oak7zhcds6tvje+state:results Unfortunately, the answer given by Jeremias (writing version=1.2 in the svg root tag) didn't help. Here is the .fo file (the svg part comes from the W3C): ?xml version=1.0 encoding=utf-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master margin-bottom=10mm margin-top=10mm margin-right=10mm margin-left=10mm page-width=210mm page-height=297mm master-name=A4-portrait fo:region-body margin-bottom=10mm margin-top=10mm / /fo:simple-page-master /fo:layout-master-set fo:page-sequence font-size=10pt font-family=times master-reference=A4-portrait fo:flow flow-name=xsl-region-body fo:block fo:instream-foreign-object svg xmlns=http://www.w3.org/2000/svg; version=1.2 width=100mm height=150mm flowRoot font-size=16 flowRegion path d=M100,50L50,300L250,300L300,50z/ /flowRegion flowParaTomorrow, and tomorrow, and tomorrow; creeps in this petty pace from day to day, until the last syllable of recorded time. And all our yesterdays have lighted fools the way to dusty death. /flowPara /flowRoot /svg /fo:instream-foreign-object /fo:block /fo:flow /fo:page-sequence /fo:root However, when i use fo:external-graphic to include the same svg, it works, or maybe should i say it doesn't crash... The PDF rendering is working, but the result is just a black parallelogram instead of the text (exactly the same result as in Firefox 3 for instance). There is only InkScape which renders the svg correctly. What am I missing here ? Thanks for your help ;)
Re: SVG1.2 and flowRoot in PDF
I forgot: you also need to enclose the flowPara with a flowDiv element. I believe the example in the SVG 1.2 working draft is actually wrong (it doesn't conform to the schema given further above in the document). On 21.11.2008 16:16:30 Jeremias Maerki wrote: I have a pretty good idea why it doesn't work. For i-f-o the basic SVG 1.1 DOMImplementation is currently hard-coded but it actually needs to be selected based on the version attribute like for the e-g variant. I'm looking into that. As for the black parallelogram, I may have to send you over to [EMAIL PROTECTED] since the same output appears when looking at the SVG in Batik's Squiggle Browser. Setting visibility=false fixes that problem. Please note that the SVG 1.2 flowText feature is not finalized. The spec is still in draft mode. The semantics may not be clearly enough defined, yet, and Batik might also not do everything correctly, yet. I will report back when I've fixed the first problem above. Shouldn't be a biggy. On 21.11.2008 14:48:15 Sebastien wrote: Hi, I would like to use the flowing text abilities of SVG1.2 with FOP but i can't get FOP to switch to SVG1.2 mode and i get this error: GRAVE: Exception org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot). at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) - org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot). at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source) at org.apache.batik.dom.svg.SVGDOMImplementation.createElementNS(Unknown Source) at org.apache.batik.dom.svg.SVGOMDocument.createElementNS(Unknown Source) at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:182) at org.apache.fop.util.DOMBuilderContentHandlerFactory$Handler.startElement(DOMBuilderContentHandlerFactory.java:124) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) I found a thread in the archives which is exactly what i'm trying to do: http://fop-users.markmail.org/search/?q=flowroot#query:flowroot+page:1+mid:h2oak7zhcds6tvje+state:results Unfortunately, the answer given by Jeremias (writing version=1.2 in the svg root tag) didn't help. Here is the .fo file (the svg part comes from the W3C): ?xml version=1.0 encoding=utf-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master margin-bottom=10mm margin-top=10mm margin-right=10mm margin-left=10mm page-width=210mm page-height=297mm master-name=A4-portrait fo:region-body margin-bottom=10mm margin-top=10mm / /fo:simple-page-master /fo:layout-master-set fo:page-sequence font-size=10pt font-family=times master-reference=A4-portrait fo:flow flow-name=xsl-region-body fo:block fo:instream-foreign-object
Re: SVG1.2 and flowRoot in PDF
On Fri, Nov 21, 2008 at 4:16 PM, Jeremias Maerki [EMAIL PROTECTED]wrote: I have a pretty good idea why it doesn't work. For i-f-o the basic SVG 1.1 DOMImplementation is currently hard-coded but it actually needs to be selected based on the version attribute like for the e-g variant. I'm looking into that. Ok, thank you very much. As for the black parallelogram, I may have to send you over to [EMAIL PROTECTED] since the same output appears when looking at the SVG in Batik's Squiggle Browser. Setting visibility=false fixes that problem. Please note that the SVG 1.2 flowText feature is not finalized. The spec is still in draft mode. The semantics may not be clearly enough defined, yet, and Batik might also not do everything correctly, yet. Actually, i'm just trying to get word wrapping in SVG without using known hacks such as dividing my text in substrings, each in one in a tspan, or using tbreak. I can't use them because my text is dynamicaly generated and the algorythm to find out how it should be split will just be a real pain in the ass... So, any other solution allowing me to have word wrapping would be fine for me ;)
Re: SVG1.2 and flowRoot in PDF
On Fri, Nov 21, 2008 at 4:37 PM, Jeremias Maerki [EMAIL PROTECTED]wrote: I forgot: you also need to enclose the flowPara with a flowDiv element. I believe the example in the SVG 1.2 working draft is actually wrong (it doesn't conform to the schema given further above in the document). Yes, the example is clearly wrong (on the webpage, the source code doesn't even end the flowRoot tag correctly...) On 21.11.2008 16:16:30 Jeremias Maerki wrote: I have a pretty good idea why it doesn't work. For i-f-o the basic SVG 1.1 DOMImplementation is currently hard-coded but it actually needs to be selected based on the version attribute like for the e-g variant. I'm looking into that. As for the black parallelogram, I may have to send you over to [EMAIL PROTECTED] since the same output appears when looking at the SVG in Batik's Squiggle Browser. Setting visibility=false fixes that problem. Please note that the SVG 1.2 flowText feature is not finalized. The spec is still in draft mode. The semantics may not be clearly enough defined, yet, and Batik might also not do everything correctly, yet. I will report back when I've fixed the first problem above. Shouldn't be a biggy. On 21.11.2008 14:48:15 Sebastien wrote: Hi, I would like to use the flowing text abilities of SVG1.2 with FOP but i can't get FOP to switch to SVG1.2 mode and i get this error: GRAVE: Exception org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot). at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) - org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot). at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source) at org.apache.batik.dom.svg.SVGDOMImplementation.createElementNS(Unknown Source) at org.apache.batik.dom.svg.SVGOMDocument.createElementNS(Unknown Source) at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:182) at org.apache.fop.util.DOMBuilderContentHandlerFactory$Handler.startElement(DOMBuilderContentHandlerFactory.java:124) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) I found a thread in the archives which is exactly what i'm trying to do: http://fop-users.markmail.org/search/?q=flowroot#query:flowroot+page:1+mid:h2oak7zhcds6tvje+state:results Unfortunately, the answer given by Jeremias (writing version=1.2 in the svg root tag) didn't help. Here is the .fo file (the svg part comes from the W3C): ?xml version=1.0 encoding=utf-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master margin-bottom=10mm margin-top=10mm margin-right=10mm margin-left=10mm page-width=210mm page-height=297mm master-name=A4-portrait
Re: SVG1.2 and flowRoot in PDF
Ok, you can now use SVG 1.2 in FOP Trunk: http://svn.apache.org/viewvc?rev=719616view=rev On 21.11.2008 16:43:27 Sebastien wrote: On Fri, Nov 21, 2008 at 4:37 PM, Jeremias Maerki [EMAIL PROTECTED]wrote: I forgot: you also need to enclose the flowPara with a flowDiv element. I believe the example in the SVG 1.2 working draft is actually wrong (it doesn't conform to the schema given further above in the document). Yes, the example is clearly wrong (on the webpage, the source code doesn't even end the flowRoot tag correctly...) On 21.11.2008 16:16:30 Jeremias Maerki wrote: I have a pretty good idea why it doesn't work. For i-f-o the basic SVG 1.1 DOMImplementation is currently hard-coded but it actually needs to be selected based on the version attribute like for the e-g variant. I'm looking into that. As for the black parallelogram, I may have to send you over to [EMAIL PROTECTED] since the same output appears when looking at the SVG in Batik's Squiggle Browser. Setting visibility=false fixes that problem. Please note that the SVG 1.2 flowText feature is not finalized. The spec is still in draft mode. The semantics may not be clearly enough defined, yet, and Batik might also not do everything correctly, yet. I will report back when I've fixed the first problem above. Shouldn't be a biggy. On 21.11.2008 14:48:15 Sebastien wrote: Hi, I would like to use the flowing text abilities of SVG1.2 with FOP but i can't get FOP to switch to SVG1.2 mode and i get this error: GRAVE: Exception org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot). at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) - org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot). at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source) at org.apache.batik.dom.svg.SVGDOMImplementation.createElementNS(Unknown Source) at org.apache.batik.dom.svg.SVGOMDocument.createElementNS(Unknown Source) at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:182) at org.apache.fop.util.DOMBuilderContentHandlerFactory$Handler.startElement(DOMBuilderContentHandlerFactory.java:124) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) I found a thread in the archives which is exactly what i'm trying to do: http://fop-users.markmail.org/search/?q=flowroot#query:flowroot+page:1+mid:h2oak7zhcds6tvje+state:results Unfortunately, the answer given by Jeremias (writing version=1.2 in the svg root tag) didn't help. Here is the .fo file (the svg part comes from the W3C): ?xml version=1.0 encoding=utf-8? fo:root
Re: SVG1.2 and flowRoot in PDF
Actually, it doesn't seem to work in all cases. I have to revise my fix. My current solution causes a ClastCastException inside Batik. On 21.11.2008 17:10:29 Jeremias Maerki wrote: Ok, you can now use SVG 1.2 in FOP Trunk: http://svn.apache.org/viewvc?rev=719616view=rev On 21.11.2008 16:43:27 Sebastien wrote: On Fri, Nov 21, 2008 at 4:37 PM, Jeremias Maerki [EMAIL PROTECTED]wrote: I forgot: you also need to enclose the flowPara with a flowDiv element. I believe the example in the SVG 1.2 working draft is actually wrong (it doesn't conform to the schema given further above in the document). Yes, the example is clearly wrong (on the webpage, the source code doesn't even end the flowRoot tag correctly...) On 21.11.2008 16:16:30 Jeremias Maerki wrote: I have a pretty good idea why it doesn't work. For i-f-o the basic SVG 1.1 DOMImplementation is currently hard-coded but it actually needs to be selected based on the version attribute like for the e-g variant. I'm looking into that. As for the black parallelogram, I may have to send you over to [EMAIL PROTECTED] since the same output appears when looking at the SVG in Batik's Squiggle Browser. Setting visibility=false fixes that problem. Please note that the SVG 1.2 flowText feature is not finalized. The spec is still in draft mode. The semantics may not be clearly enough defined, yet, and Batik might also not do everything correctly, yet. I will report back when I've fixed the first problem above. Shouldn't be a biggy. On 21.11.2008 14:48:15 Sebastien wrote: Hi, I would like to use the flowing text abilities of SVG1.2 with FOP but i can't get FOP to switch to SVG1.2 mode and i get this error: GRAVE: Exception org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot). at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) - org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot). at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source) at org.apache.batik.dom.svg.SVGDOMImplementation.createElementNS(Unknown Source) at org.apache.batik.dom.svg.SVGOMDocument.createElementNS(Unknown Source) at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:182) at org.apache.fop.util.DOMBuilderContentHandlerFactory$Handler.startElement(DOMBuilderContentHandlerFactory.java:124) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at org.apache.fop.cli.Main.startFOP(Main.java:166) at org.apache.fop.cli.Main.main(Main.java:197) I found a thread in the archives which is exactly what i'm trying to do:
Re: SVG1.2 and flowRoot in PDF
Found a solution that works: http://svn.apache.org/viewvc?rev=719646view=rev On 21.11.2008 17:47:22 Jeremias Maerki wrote: Actually, it doesn't seem to work in all cases. I have to revise my fix. My current solution causes a ClastCastException inside Batik. On 21.11.2008 17:10:29 Jeremias Maerki wrote: Ok, you can now use SVG 1.2 in FOP Trunk: http://svn.apache.org/viewvc?rev=719616view=rev snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SVG1.2 and flowRoot in PDF
It works just the way i want, you rock ! Thanks a lot, again ;) P.S: visibility=hidden does the trick indeed On Fri, Nov 21, 2008 at 6:26 PM, Jeremias Maerki [EMAIL PROTECTED]wrote: Found a solution that works: http://svn.apache.org/viewvc?rev=719646view=rev On 21.11.2008 17:47:22 Jeremias Maerki wrote: Actually, it doesn't seem to work in all cases. I have to revise my fix. My current solution causes a ClastCastException inside Batik. On 21.11.2008 17:10:29 Jeremias Maerki wrote: Ok, you can now use SVG 1.2 in FOP Trunk: http://svn.apache.org/viewvc?rev=719616view=rev snip/ Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Break PDF into 2
Sean , Thanks i will look into that as well, as it might allow me to make a cleaner cut... tx., On Fri, Nov 21, 2008 at 10:14 PM, Griffin,Sean [EMAIL PROTECTED] wrote: Another option may be to use iText to split the entire PDF into multiple PDFs and then insert your own page at the split. I don't know if it's possible or not, but iText can do some pretty powerful things. Sean Griffin *From:* Raphael Parree [mailto:[EMAIL PROTECTED] *Sent:* Friday, November 21, 2008 4:57 AM *To:* fop-users@xmlgraphics.apache.org *Subject:* Re: Break PDF into 2 Georg, Thanks for this i will experiment with your suggestion...looks like a way forward. Tx(!) Raphael On Fri, Nov 21, 2008 at 11:08 AM, Georg Datterl [EMAIL PROTECTED] wrote: Hi Raphael, Is there a way using FOP to break a PDF into two after x number of pages...using XSL 2.0? getting the page number? The problem is that we need to break a book after 600 pages into two books with the book number on the front cover. The other problem is that we would need to before hand how many pages there will be when processing the front cover. I guess it is not possible...Anybody has experience with this? Do you really want to break after exactly 600 pages, no matter if you are for example in the middle of a text block or so? If yes, I'd guess it would be possible to define a page-master-sequence consisting of the front page, 599 times the data page (with a data region), the second front page containing only static content (no data region) and 599 times the data page again. Then a flow into the data region should fill 599 pages, the generate the second front page without filling in data from the flow, the go on filling data pages. Regards, Georg Datterl -- Kontakt -- Georg Datterl Geneon media solutions gmbh Gutenstetter Straße 8a 90449 Nürnberg HRB Nürnberg: 17193 Geschäftsführer: Yong-Harry Steiert Tel.: 0911/36 78 88 - 26 Fax: 0911/36 78 88 - 20 www.geneon.de Weitere Mitglieder der Willmy MediaGroup: IRS Integrated Realization Services GmbH:www.irs-nbg.de Willmy PrintMedia GmbH:www.willmy.de Willmy Consult Content GmbH: www.willmycc.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Raphael Parree CTO SOA Evangelist phone +33 683 468663 Disclaimer... The information contained in this message may be confidential and is intended to be exclusively for the addressee. Sender's written permission is needed prior to forwarding or otherwise using the content of the message, whether completely or partially. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. Please rely on your own virus checking, no responsibility is taken by the sender for any damage rising out of any bug or virus infection. -- CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024. -- Raphael Parree CTO SOA Evangelist phone +33 683 468663 Disclaimer... The information contained in this message may be confidential and is intended to be exclusively for the addressee. Sender's written permission is needed prior to forwarding or otherwise using the content of the message, whether completely or partially. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. Please rely on your own virus checking, no responsibility is taken by the sender for any damage rising out of any bug or virus infection.