Acrobat 中多页文档中的页码 Reader

Page number in multiple pages document in Acrobat Reader

使用 ApacheFop 2.2 我得到了一个多页文档。该文档由多个部分组成,每个部分都以页码 1 开头。 形成PDF后需要打印文档的第5页。当指定打印页面时,将打印文档的第 11 页(它是其部分的第 5 页)。 如何正确生成PDF,使第5页正好是文档的第5页,而不是文档的一部分?

fo:

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink"  font-size="30pt">
    <fo:layout-master-set>
        <fo:simple-page-master master-name="page">
            <fo:region-body region-name="body" margin-top="22mm" margin-bottom="34mm"/>
            <fo:region-after region-name="footer" extent="31mm"/>
        </fo:simple-page-master>
        <fo:simple-page-master master-name="blank-page">
            <fo:region-body region-name="body-blank" margin-top="22mm" margin-bottom="34mm"/>
            <fo:region-after region-name="footer" extent="31mm"/>
        </fo:simple-page-master>
        <fo:page-sequence-master master-name="document">
            <fo:repeatable-page-master-alternatives>
                <fo:conditional-page-master-reference blank-or-not-blank="not-blank" master-reference="page"/>
                <fo:conditional-page-master-reference blank-or-not-blank="blank" odd-or-even="even" master-reference="blank-page"/>
            </fo:repeatable-page-master-alternatives>
        </fo:page-sequence-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="document" initial-page-number="1" force-page-count="end-on-even">
        <fo:static-content flow-name="footer">
            <fo:block>
                <fo:page-number/>
            </fo:block>
        </fo:static-content>
        <fo:flow flow-name="body">
            <fo:block break-after="page">Text1</fo:block>
        </fo:flow>
    </fo:page-sequence>
    <fo:page-sequence master-reference="document" initial-page-number="1" force-page-count="end-on-even">
        <fo:static-content flow-name="footer">
            <fo:block>
                <fo:page-number/>
            </fo:block>
        </fo:static-content>
        <fo:flow flow-name="body">
            <fo:block break-after="page">Text3</fo:block>
            <fo:block break-after="page">Text4</fo:block>
            <fo:block break-after="page">Text5</fo:block>
        </fo:flow>
    </fo:page-sequence>
    <fo:page-sequence master-reference="document" initial-page-number="1" force-page-count="end-on-even">
        <fo:static-content flow-name="footer">
            <fo:block>
                <fo:page-number/>
            </fo:block>
        </fo:static-content>
        <fo:flow flow-name="body">
            <fo:block break-after="page">Text7</fo:block>
            <fo:block break-after="page">Text8</fo:block>
            <fo:block break-after="page">Text9</fo:block>
            <fo:block break-after="page">Text10</fo:block>
            <fo:block break-after="page">Text11</fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>

AdobeReader Page Numbering

在这种情况下,页码不是告诉用户要打印哪一页的最佳方式,因为它无论如何都会造成混淆。例如,您的文档中可能有不止一页页码为 5 的页面。 备选方案:

  • 在文档的第一页,包括指向必须打印的页面的超链接
  • 为必须打印的页面创建书签