pdf:importサンプル2
ドキュメントレイアウトを用いて複数のページを取り込むサンプルです。
複数のページ指定はドキュメントレイアウトとページレイアウトを組み合わせてご使用ください。
<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:pdf="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:bs="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" version="5.0.0">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4" page-height="297mm" page-width="210mm">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4" bs:local-page-control="none">
<fo:flow flow-name="xsl-region-body">
<bs:block-container>
<bs:include href="${base-dir}/sample/xml/pdf-import/pdf-importSample2-include1.xml"/>
</bs:block-container>
</fo:flow>
</fo:page-sequence>
<fo:page-sequence master-reference="A4" bs:local-page-control="none">
<fo:flow flow-name="xsl-region-body">
<bs:block-container>
<bs:include href="${base-dir}/sample/xml/pdf-import/pdf-importSample2-include2.xml"/>
</bs:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Name="pdf-importSample2-include2" Width="21cm" Height="29.7cm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
<!-- 頁番号を指定するとそのページを取り込む -->
<pdf:import href="${base-dir}/sample/xml/pdf-import/sample.pdf" page="2,4,5-8,10"/>
</Layout>
<?xml version="1.0" encoding="UTF-8"?>
<!-- XML file created by biz-Stream Designer -->
<!-- biz-Stream Copyright BrainSellers.com Corp. -->
<Layout Name="pdf-importSample2-include2" Width="21cm" Height="29.7cm" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:bs="http://www.brainsellers.com/schema" xmlns:svg="http://www.brainsellers.com/schema" xmlns:form="http://www.brainsellers.com/schema" xmlns:pdf="http://www.brainsellers.com/schema" version="5.0.0">
<!-- 頁番号にallを指定すると全てのページを取り込む -->
<pdf:import href="${base-dir}/sample/xml/pdf-import/sample2.pdf" page="all"/>
</Layout>
生成されるPDF(『<biz-Stream_home>/sample/xml/pdf-import/pdf-importSample2.pdf
』)
取り込み元のPDF(sample2.pdf)は20ページです。
pdf-importSample2-1.xmlの指定では 2,4,5,6,7,8,10 の合計7ページが対象となります。
pdf-importSample2-2.xmlの指定はallなので20ページ全てが対象となります。
よって生成されるpdf-importSample2.pdfは合計27ページとなります。
