xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
Subject Text alignment
Date Sun, 02 Mar 2003 17:11:44 GMT
Hello all,
I just tried to fix the old page number expansion+alignment problem,
which was bugging me for a looooooong time. I more or less made it.
Well, here is my test file, and the problems are below:

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
   xmlns:svg="http://www.w3.org/2000/svg">
   <fo:layout-master-set>
     <fo:simple-page-master master-name="content"
       page-width="300pt" page-height="350pt">
       <fo:region-body margin-left="30pt" margin-right="30pt"/>
     </fo:simple-page-master>
   </fo:layout-master-set>
   <fo:page-sequence master-reference="content">
     <fo:flow flow-name="xsl-region-body">
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="justify">A1<fo:leader
           leader-pattern="dots" 
leader-length.maximum="20mm"/><fo:page-number-citation
           ref-id="A"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="justify">A<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="A"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="justify">B<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="B"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="justify">C<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="C"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="justify">D<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="D"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="justify">E<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="E"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="justify">F<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="F"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="justify">G<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="G"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="justify">superduperlongG<fo:leader
           leader-pattern="dots" leader-length.maximum="100%"
           leader-length.minimum="55%"
           leader-length.optimum="60%"/><fo:page-number-citation
           ref-id="G"/></fo:block>
     </fo:flow>
   </fo:page-sequence>
   <fo:page-sequence master-reference="content">
     <fo:flow flow-name="xsl-region-body">
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="end">A<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="A"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="end">B<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="B"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="end">C<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="C"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="end">D<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="D"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="end">E<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="E"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="end">F<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="F"/></fo:block>
       <fo:block border-end-width="1pt" border-end-style="solid" 
text-align-last="end">G<fo:leader
           leader-pattern="dots"/><fo:page-number-citation
           ref-id="G"/></fo:block>
     </fo:flow>
   </fo:page-sequence>
   <fo:page-sequence master-reference="content" initial-page-number="10">
     <fo:flow flow-name="xsl-region-body">
       <fo:block id="A">A</fo:block>
       <fo:block><fo:page-number/></fo:block>
     </fo:flow>
   </fo:page-sequence>
   <fo:page-sequence master-reference="content" initial-page-number="100">
     <fo:flow flow-name="xsl-region-body">
       <fo:block id="B">B</fo:block>
       <fo:block><fo:page-number/></fo:block>
     </fo:flow>
   </fo:page-sequence>
   <fo:page-sequence master-reference="content" initial-page-number="1000">
     <fo:flow flow-name="xsl-region-body">
       <fo:block id="C">C</fo:block>
       <fo:block><fo:page-number/></fo:block>
     </fo:flow>
   </fo:page-sequence>
   <fo:page-sequence master-reference="content" initial-page-number="1">
     <fo:flow flow-name="xsl-region-body">
       <fo:block id="D">D</fo:block>
       <fo:block><fo:page-number/></fo:block>
     </fo:flow>
   </fo:page-sequence>
   <fo:page-sequence master-reference="content" initial-page-number="111">
     <fo:flow flow-name="xsl-region-body">
       <fo:block id="E">E</fo:block>
       <fo:block><fo:page-number/></fo:block>
     </fo:flow>
   </fo:page-sequence>
   <fo:page-sequence master-reference="content" initial-page-number="90000">
     <fo:flow flow-name="xsl-region-body">
       <fo:block id="F">F</fo:block>
       <fo:block><fo:page-number/></fo:block>
     </fo:flow>
   </fo:page-sequence>
   <fo:page-sequence master-reference="content" initial-page-number="1111111">
     <fo:flow flow-name="xsl-region-body">
       <fo:block id="G">G</fo:block>
       <fo:block><fo:page-number/></fo:block>
     </fo:flow>
   </fo:page-sequence>
</fo:root>

The page numbers are still slightly misaligned, or at least seem to be.
This is more visible with roman page numbers (format="i", BTW have fun
with 1111111 formatted as roman number). It is not a purely optical
effect. However, the offset of the word area end for the page number is
exactly what was expected (270000 millipoints). Its this an odd Acrobat
Reader 4.0 effect or what?

Umm, now that I think of it, shouldnt' the offset be 269999 millipoints,
due to the 1pt block border?

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Mime
View raw message