Stefan Hegny created FOP-2618:
---------------------------------

             Summary: Table break PDF/A-1a by adding XRef
                 Key: FOP-2618
                 URL: https://issues.apache.org/jira/browse/FOP-2618
             Project: FOP
          Issue Type: Bug
          Components: renderer/pdf
    Affects Versions: 2.1
         Environment: java version "1.7.0_95"
Linux: OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-1~deb7u1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
 as well as Linux:
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)
            Reporter: Stefan Hegny
            Priority: Minor
             Fix For: 1.1


When running fop 2.1 with {{-a -pdfprofile 'PDF/A-1a'}} then the pdf output of 
the following file will not validate on various engines (e.g. pdfbox preflight) 
with an  error {{1.4 : Trailer Syntax error, /XRef cross reference streams are 
not allowed}}

If the table is taken out of the fo then it gives (more) valid output (i.e. not 
the xref error). It also avoids the xref error when specifying {{-pdfprofile 
'PDF/A-1b'}} and no {{-a}} flag with fop 2.1.  Using fop 1.1 with {{-a 
-pdfprofile 'PDF/A-1a'}}  will give other issues (that can be fixed e.g. with 
exiftool) but will NOT produce the XRef Trailer syntax error. 

{{<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; 
xmlns:h="http://xmlns.dummycompany.com/letters"; 
xmlns:hx="http://xmlns.dummycompany.com/letters/intern"; 
xmlns:l="http://www.w3.org/1999/xhtml"; 
xmlns:xalan="http://xml.apache.org/xalan"; xml:lang="de">
    <fo:layout-master-set>
        <fo:simple-page-master master-name="first" margin-right="20mm" 
margin-left="10mm" margin-bottom="20mm" margin-top="32mm" page-width="21cm" 
page-height="29.6984848098cm">
            <fo:region-body margin-left="15mm" margin-bottom="20mm"/>
            <fo:region-start extent="10mm"/>
        </fo:simple-page-master>
        <fo:page-sequence-master master-name="psmA">
            <fo:repeatable-page-master-alternatives>
                <fo:conditional-page-master-reference master-reference="first"/>
            </fo:repeatable-page-master-alternatives>
        </fo:page-sequence-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="psmA">
        <fo:flow flow-name="xsl-region-body">
            <fo:block-container border-color="black" border-style="solid" 
border-width="0pt" padding="0mm">
                <fo:block text-align="start" line-height="14pt" 
font-family="serif" font-size="11pt" space-before="28pt" font-weight="bold">
                    <fo:inline>Rechnung Nr. 2016-413</fo:inline>
                </fo:block>
                <fo:block space-before="7pt" line-height="14pt" 
font-family="serif" font-size="11pt">
                    <fo:table>
                        <fo:table-column column-width="9cm"/>
                        <fo:table-column column-width="1.4cm"/>
                        <fo:table-column column-width="2.3cm"/>
                        <fo:table-header>
                            <fo:table-row>
                                <fo:table-cell>
                                    <fo:block 
font-weight="bold">Leistung</fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:block 
font-weight="bold">Anzahl</fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:block font-weight="bold" 
text-align="end">Betrag</fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                        </fo:table-header>
                        <fo:table-body>
                            <fo:table-row>
                                <fo:table-cell margin-top="10pt">
                                    <fo:block>Spaxschrauben 2,5x5mm</fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:block text-align="center">100</fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:block text-align="end">
                                        <fo:inline>33,75 €</fo:inline>
                                    </fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                            <fo:table-row border-top-width="0.1pt" 
border-top-style="solid" position="relative" margin-top="10pt">
                                <fo:table-cell>
                                    <fo:block>Nettosumme</fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:block> </fo:block>
                                </fo:table-cell>        
                                <fo:table-cell>
                                    <fo:block text-align="end">
                                        <fo:inline>33,75 €</fo:inline>
                                    </fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                        </fo:table-body>
                    </fo:table>
                </fo:block>
            </fo:block-container>
        </fo:flow>
    </fo:page-sequence>
</fo:root>}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to