xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hennebert <vhenneb...@gmail.com>
Subject Re: More on external graphics
Date Fri, 16 Dec 2011 11:40:26 GMT
Hi Samuel,

You have already figured out how to avoid the problem, but FYI, what you
are witnessing is the result of a bug in the code that handles pages of
different widths (the infamous Changing IPD feature). That bug appears
to have been fixed in Trunk but I don’t remember when.

Unless you have a good reason for wanting pages of different widths
I advise you to make sure that the widths of the region-body on all your
pages match. That is, make sure that the following operation:
      − margin-left and margin-right on the simple-page-master
      − margin-left and margin-right on the region-body
gives the same result for all your pages.


On 16/12/11 10:53, Samuel Penn wrote:
> On Friday 16 December 2011 10:17:32 Pascal Sancho wrote:
>> Hi Samuel,
>> I don't understand what you mean by "if I take 1mm off the left margin
>> on right hand pages..."
>> Can you provide a short snippet to illustrate, please?
> Take the following definitions for left and right pages (these can be
> plugged into the test.fo that Luis posted):
>     <fo:simple-page-master master-name="leftPage" page-height="297mm" page-
> width="210mm" margin-top="15mm" margin-bottom="15mm" margin-left="15mm" 
> margin-right="30mm">
>         <fo:region-body margin-left="20mm" margin-right="21mm"/>
>         <fo:region-before extent="15mm" region-name="region-before-left"/>
>         <fo:region-after extent="10mm" region-name="region-after-left"/>
>         <fo:region-start extent="20mm"/>
>         <fo:region-end extent="10mm"/>
>     </fo:simple-page-master>
>     <fo:simple-page-master master-name="rightPage" page-height="297mm" page-
> width="210mm" margin-top="15mm" margin-bottom="15mm" margin-left="30mm" 
> margin-right="15mm">
>         <fo:region-body margin-left="21mm" margin-right="20mm"/>
>         <fo:region-before extent="16mm" region-name="region-before-right"/>
>         <fo:region-after extent="10mm" region-name="region-after-right"/>
>         <fo:region-start extent="20mm"/>
>         <fo:region-end extent="10mm"/>
>     </fo:simple-page-master>
> Both are balanced, in that the margin-right/margin-left for both
> the simple-page-master and region-body mirror each other for the
> left and right pages. In this case, images are placed correctly.
> Concentrating on the following lines:
> left:  <fo:region-body margin-left="20mm" margin-right="21mm"/>
> right: <fo:region-body margin-left="21mm" margin-right="20mm"/>
> If I change the margin-right for the left page to be 22mm, then the
> images are incorrectly placed on 2nd and subsequent pages (the problem
> that I was seeing).
> If I also update the margin-left for the right page to be 22mm
> however, then images are correctly placed again.
> There seems to be a similar constraint for the simple-page-master
> margins, in that left page needs to mirror right page. Changing
> the margins on one page (but not the other) breaks the images again.
> Am I making sense?

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message