Re: Including an image as a page
On the block containing the fo:external-graphic add these properties: font-size=0 line-height=0 break-before=page break-after=page The breaks are necessary to work around a current limitation of FOP. The other two properties make sure that half-leading effects are eliminated thus nicely fitting the image in the page. A better solution might be to investigate if you can create a custom extension for DocBook so you could still use fox:external-document from inside DocBook. But I don't know enough about DocBook to know if that is even doable. HTH On 17.04.2008 02:02:32 John Brown wrote: The fox:external-document extension works. Since it seems that I will probably have to post-process the fo file, I need to decide whether it is easier to: 1) insert the fox:external-document at an appropriate place, so that the table of contents and any other hyperlinks still work 2) Fix the FO so that I do not get the following warnings: Apr 16, 2008 6:29:20 PM org.apache.fop.layoutmgr.PageBreakingAlgorithm updateData2 WARNING: Part/page 0 overflows the available area in block-progression dimension. (fo:block-container, location: 317/58) Apr 16, 2008 6:29:20 PM org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2 WARNING: Line 1 of a paragraph overflows the available area by more than 50 points. (fo:block, location: 324/52) Apr 16, 2008 6:29:20 PM org.apache.fop.layoutmgr.PageBreaker$1 notifyOverflow WARNING: Content of the region-body on page 2 overflows the available area in block-progression dimension. (fo:page-sequence, location: 65/312) I have created extdoc.tar.bz2 and uploaded it to: http://download.yousendit.com/4487E58200672F10 The archive contains: Bytes Filename Description 28823 doc1-page1.pdf External document that I am trying to import 18854 extdoc.foFO produced by DocBook stylesheets + xsltproc trimmed as much as possible 39827 extdoc.pdf Result of fop extdoc.fo extdoc.pdf. You will note the result is not correct. 16150 images/draft.png Background image in document I did what I thought was necessary to set all borders to 0 in the DocBook XML file. Can you tell me how to fix the FO so that all the space on the 8in X 11in page is available for the external document? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Including an image as a page
Jeremias Maerki dev at jeremias-maerki.ch writes: On the block containing the fo:external-graphic add these properties: font-size=0 line-height=0 break-before=page break-after=page When I made the changes, I saw that the page seemed to be indented, so I added 'start-indent=0 end-indent=0' also. The appearance seems to be perfect now, but I still get one warning (I got 2 originally): WARNING: Part/page 0 overflows the available area in block-progression dimension. (fo:block-container, location: 317/58) How can I avoid this warning? Can I ignore it? The relevant block now looks like this: fo:block id=id2489196 text-align=center line-height=0 font-size=0 break-before=page break-after=page start-indent=0 end-indent=0 fo:external-graphic src=url(doc1-page1.pdf) width=8.5in height=11in content-width=8.5in content-height=11in text-align=center display-align=center/ /fo:block snip/ A better solution might be to investigate if you can create a custom extension for DocBook so you could still use fox:external-document from inside DocBook. But I don't know enough about DocBook to know if that is even doable. Now that I know the FO that works, I will probably try to see if I can extend my custom stylesheet to add the necessary attributes. I think that this way is easier because it does not disturb the structure of the DocBook document. The DocBook docs explain how to add elements to the Docbook DTD, but considering that I don't really know what I am doing, I would not want to take on that task. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Including an image as a page
On 17.04.2008 14:12:47 John Brown wrote: Jeremias Maerki dev at jeremias-maerki.ch writes: On the block containing the fo:external-graphic add these properties: font-size=0 line-height=0 break-before=page break-after=page When I made the changes, I saw that the page seemed to be indented, so I added 'start-indent=0 end-indent=0' also. The appearance seems to be perfect now, but I still get one warning (I got 2 originally): WARNING: Part/page 0 overflows the available area in block-progression dimension. (fo:block-container, location: 317/58) How can I avoid this warning? Can I ignore it? The relevant block now looks like this: fo:block id=id2489196 text-align=center line-height=0 font-size=0 break-before=page break-after=page start-indent=0 end-indent=0 fo:external-graphic src=url(doc1-page1.pdf) width=8.5in height=11in content-width=8.5in content-height=11in text-align=center display-align=center/ /fo:block That's not the relevant block. Look closer: the warning is about the block-container further up in your file. The height of the block-container is set to 0.01in and its contents (the fo:leader) grow beyond that. Just remove the leader. snip/ A better solution might be to investigate if you can create a custom extension for DocBook so you could still use fox:external-document from inside DocBook. But I don't know enough about DocBook to know if that is even doable. Now that I know the FO that works, I will probably try to see if I can extend my custom stylesheet to add the necessary attributes. I think that this way is easier because it does not disturb the structure of the DocBook document. The DocBook docs explain how to add elements to the Docbook DTD, but considering that I don't really know what I am doing, I would not want to take on that task. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Including an image as a page
Jeremias Maerki dev at jeremias-maerki.ch writes: snip/ the warning is about the block-container further up in your file. The height of the block-container is set to 0.01in and its contents (the fo:leader) grow beyond that. Just remove the leader. All warnings are gone now. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Including an image as a page
The fox:external-document extension works. Since it seems that I will probably have to post-process the fo file, I need to decide whether it is easier to: 1) insert the fox:external-document at an appropriate place, so that the table of contents and any other hyperlinks still work 2) Fix the FO so that I do not get the following warnings: Apr 16, 2008 6:29:20 PM org.apache.fop.layoutmgr.PageBreakingAlgorithm updateData2 WARNING: Part/page 0 overflows the available area in block-progression dimension. (fo:block-container, location: 317/58) Apr 16, 2008 6:29:20 PM org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2 WARNING: Line 1 of a paragraph overflows the available area by more than 50 points. (fo:block, location: 324/52) Apr 16, 2008 6:29:20 PM org.apache.fop.layoutmgr.PageBreaker$1 notifyOverflow WARNING: Content of the region-body on page 2 overflows the available area in block-progression dimension. (fo:page-sequence, location: 65/312) I have created extdoc.tar.bz2 and uploaded it to: http://download.yousendit.com/4487E58200672F10 The archive contains: Bytes Filename Description 28823 doc1-page1.pdf External document that I am trying to import 18854 extdoc.foFO produced by DocBook stylesheets + xsltproc trimmed as much as possible 39827 extdoc.pdf Result of fop extdoc.fo extdoc.pdf. You will note the result is not correct. 16150 images/draft.png Background image in document I did what I thought was necessary to set all borders to 0 in the DocBook XML file. Can you tell me how to fix the FO so that all the space on the 8in X 11in page is available for the external document? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Including an image as a page
Please take a look at: http://xmlgraphics.apache.org/fop/0.95/extensions.html#external-document Of course, you can create the same effect by setting up the page-master accordingly and using line-height=0 to avoid half-leading effects. The above extension is simpler but renders your XSL-FO incompatible with other FO implementations. On 13.04.2008 22:40:17 John Brown wrote: Hello all, Is it possible to include an image as a page? That is, if I have an image that is 8.5in X 11in, and set my letter-sized page borders to 0 so that the printable area is 8.5in X 11in, can I add the image to a blank page without cropping or scaling, or convert the image into a page by itself? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]