xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Including an image as a page
Date Thu, 17 Apr 2008 10:04:58 GMT
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.fo        FO 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: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message