[ 
https://issues.apache.org/jira/browse/FOP-2731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16138510#comment-16138510
 ] 

Chris Bowditch commented on FOP-2731:
-------------------------------------

Hi [~dc33],

Thanks for the suggested patch. In order for this to be consider, please can 
you do the following:

1. Attach an XSL-FO File (not XSLT) that demonstrates the issue
2. Attach the suggested code change as a .patch or .diff file
3. Update the changes to include a Unit Test. I suggest a Layout test, since 
this affects the layout.

Thank you

> Position:fixed uses a bad reference area
> ----------------------------------------
>
>                 Key: FOP-2731
>                 URL: https://issues.apache.org/jira/browse/FOP-2731
>             Project: FOP
>          Issue Type: Bug
>          Components: layout/block
>    Affects Versions: 2.2
>            Reporter: Dan Caprioara
>         Attachments: position-fixed-bad-reference-area.png
>
>
> When trying to place some elements to the corners of the page, it seems that 
> FOP uses some wrong dimensions. Take a look at the attached screenshot, 
> showing the difference between FOP and AntennaHouse.
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <fo:root
>     xml:lang="dflt"
>     xmlns:css="http://www.w3.org/1998/CSS";
>     xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>     <fo:layout-master-set>
>         <!-- Page: css2fo-default-->
>         <fo:page-sequence-master
>             master-name="css2fo-default">
>             <fo:repeatable-page-master-alternatives>
>                 <fo:conditional-page-master-reference
>                     blank-or-not-blank="any"
>                     master-reference="spm-css2fo-default"
>                     odd-or-even="any"
>                     page-position="any"/>
>             </fo:repeatable-page-master-alternatives>
>         </fo:page-sequence-master>
>         <fo:simple-page-master
>             master-name="spm-css2fo-default"
>             page-height="8.27in"
>             page-width="5.83in">
>             <fo:region-body
>                 border-bottom-color="orange"
>                 border-bottom-style="solid"
>                 border-bottom-width="2pt"
>                 border-left-color="orange"
>                 border-left-style="solid"
>                 border-left-width="2pt"
>                 border-right-color="orange"
>                 border-right-style="solid"
>                 border-right-width="2pt"
>                 border-top-color="orange"
>                 border-top-style="solid"
>                 border-top-width="2pt"
>                 margin-bottom="1in"
>                 margin-left="1in"
>                 margin-right="1in"
>                 margin-top="1in"/>
>             <fo:region-before
>                 extent="1in"
>                 region-name="sc-before"/>
>             <fo:region-after
>                 extent="1in"
>                 region-name="sc-after"/>
>             <fo:region-start
>                 extent="1in"
>                 region-name="sc-start"/>
>             <fo:region-end
>                 extent="1in"
>                 region-name="sc-end"/>
>         </fo:simple-page-master>
>     </fo:layout-master-set>
>     <fo:declarations>
>         <x:xmpmeta
>             xmlns:x="adobe:ns:meta/">
>             <rdf:RDF
>                 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
>                 <rdf:Description>
>                     <xmp:CreatorTool
>                         xmlns:xmp="http://ns.adobe.com/xap/1.0/";>oXygen PDF 
> Chemistry</xmp:CreatorTool>
>                 </rdf:Description>
>             </rdf:RDF>
>         </x:xmpmeta>
>     </fo:declarations>
>     <fo:page-sequence
>         force-page-count="no-force"
>         id="last-page-sequence"
>         line-height-shift-adjustment="disregard-shifts"
>         master-reference="css2fo-default">
>         <fo:flow
>             flow-name="xsl-region-body">
>             <fo:block
>                 font-family="serif"
>                 font-size="12pt">
>                 <fo:block
>                     font-size="larger"
>                     font-style="oblique">An element with position: fixed is 
> positioned relative to its
>                     page.</fo:block>
>                 <fo:block>1. Normal div.</fo:block>
>                 <fo:block-container
>                     border-bottom-color="red"
>                     border-bottom-style="solid"
>                     border-bottom-width="3pt"
>                     border-left-color="red"
>                     border-left-style="solid"
>                     border-left-width="3pt"
>                     border-right-color="red"
>                     border-right-style="solid"
>                     border-right-width="3pt"
>                     border-top-color="red"
>                     border-top-style="solid"
>                     border-top-width="3pt"
>                     height="100pt"
>                     left="10pt"
>                     position="fixed"
>                     top="10pt"
>                     width="100pt">
>                     <fo:block
>                         end-indent="0"
>                         start-indent="0">Fixed top left.</fo:block>
>                 </fo:block-container>
>                 <fo:block-container
>                     border-bottom-color="red"
>                     border-bottom-style="solid"
>                     border-bottom-width="3pt"
>                     border-left-color="red"
>                     border-left-style="solid"
>                     border-left-width="3pt"
>                     border-right-color="red"
>                     border-right-style="solid"
>                     border-right-width="3pt"
>                     border-top-color="red"
>                     border-top-style="solid"
>                     border-top-width="3pt"
>                     height="100pt"
>                     position="fixed"
>                     right="10pt"
>                     top="10pt"
>                     width="100pt">
>                     <fo:block
>                         end-indent="0"
>                         start-indent="0">Fixed top right.</fo:block>
>                 </fo:block-container>
>                 <fo:block-container
>                     border-bottom-color="red"
>                     border-bottom-style="solid"
>                     border-bottom-width="3pt"
>                     border-left-color="red"
>                     border-left-style="solid"
>                     border-left-width="3pt"
>                     border-right-color="red"
>                     border-right-style="solid"
>                     border-right-width="3pt"
>                     border-top-color="red"
>                     border-top-style="solid"
>                     border-top-width="3pt"
>                     bottom="10pt"
>                     height="100pt"
>                     left="10pt"
>                     position="fixed"
>                     width="100pt">
>                     <fo:block
>                         end-indent="0"
>                         start-indent="0">Fixed bottom left.</fo:block>
>                 </fo:block-container>
>                 <fo:block-container
>                     border-bottom-color="red"
>                     border-bottom-style="solid"
>                     border-bottom-width="3pt"
>                     border-left-color="red"
>                     border-left-style="solid"
>                     border-left-width="3pt"
>                     border-right-color="red"
>                     border-right-style="solid"
>                     border-right-width="3pt"
>                     border-top-color="red"
>                     border-top-style="solid"
>                     border-top-width="3pt"
>                     bottom="10pt"
>                     height="100pt"
>                     position="fixed"
>                     right="10pt"
>                     width="100pt">
>                     <fo:block
>                         end-indent="0"
>                         start-indent="0">Fixed bottom right.</fo:block>
>                 </fo:block-container>
>                 <fo:block>2. Normal div.</fo:block>
>                 <fo:block>3. Normal div.</fo:block>
>             </fo:block>
>         </fo:flow>
>     </fo:page-sequence>
> </fo:root>
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to