我正在處理需要首頁(帶有圖像例如'Letterhead.jpg')的雙面文檔,該頁面的支持者(例如支持者圖像,例如'Backer.jpg'),並且如果該首頁的信息流過頁面邊界,則它將流入'延續'頁面(圖像'延續')。這個連續頁面還需要在後面使用相同的'continuation.jpg'圖片,然後信息纔會流入該反向頁面。XSL-FO:如何添加可變頁面主引用
我遇到了正確設置的問題。 我目前有我的主頁工作正常,但從那裏沒有格式化,因爲我希望。 如果主頁面沒有溢出,則默認情況下,相反會拉動延續圖形。然後當溢出時,數據流入支持者(連續圖形),然後流入後續頁面。
對不起,如果這個職位混淆,和IM不解釋得非常好,即時總結,我需要的是:
主要頁面:與letterhead.jpg圖形流量數據。
主頁面反轉:沒有數據流到這裏。只有backer.jpg圖形。 (如果從主頁溢出頁面邊界流數據然後..)
續頁:從一次流數據的延續,continuation.jpg圖形。
反向續頁的:延續從續頁面流數據的,與continuation.jpg圖形。
結束頁面:最後去的空白頁。
這裏是我當前的代碼:
<fo:layout-master-set>
<fo:page-sequence-master master-name="document">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="continuation-even" page-position="first" odd-or-even="even"/>
<fo:conditional-page-master-reference master-reference="letter" page-position="first"/>
<fo:conditional-page-master-reference master-reference="continuation-odd" odd-or-even="odd"/>
<fo:conditional-page-master-reference master-reference="continuation-rest" odd-or-even="even"/>
<fo:conditional-page-master-reference master-reference="last" page-position="last" odd-or-even="even"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
<fo:simple-page-master master-name="letter" page-height="32.0cm" page-width="22.5cm" margin-top="1.15cm" margin-bottom="2.15cm" margin-left="0.75cm" margin-right="0.75cm">
<fo:region-body margin-top="10.3cm" margin-bottom="2cm" margin-left="1.6cm" margin-right="2.5cm" />
<fo:region-before region-name="letterhead graphic" extent="29.7cm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="continuation-odd" page-height="32.0cm" page-width="22.5cm" >
<fo:region-body margin-top="4.5cm" margin-bottom="1.8cm" margin-left="2.3cm" margin-right="2.0cm" />
<fo:region-before region-name="continuation graphic" extent="29.7cm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="continuation-even" page-height="32.0cm" page-width="22.5cm" >
<fo:region-body margin-top="32.0cm" margin-bottom="0cm" margin-left="2.5cm" margin-right="2.0cm" />
<fo:region-before region-name="backer" extent="29.7cm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="continuation-rest" page-height="32.0cm" page-width="22.5cm" >
<fo:region-body margin-top="4.5cm" margin-bottom="1.8cm" margin-left="2.3cm" margin-right="2.0cm" />
<fo:region-before region-name="continuation graphic" extent="29.7cm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="last" page-height="32.0cm" page-width="22.5cm" >
<fo:region-body margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.5cm" margin-right="2.0cm" />
<fo:region-before region-name="end-page" extent="29.7cm"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="separator" page-height="32.0cm" page-width="22.5cm" margin-top="2.15cm" margin-bottom="1.15cm" margin-left="1.75cm" margin-right="0.75cm">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
我認爲你最好的/唯一的賭注可能是玩最大重複屬性。我自己努力了一下(請參閱https://stackoverflow.com/questions/22100352/manipulate-first-or-last-page-with-content)。您可能需要進行設置,以便您的前兩頁以其最大值爲2的自己的可重複頁面主設備備選項開始。然後你需要確定剩餘頁面的邏輯。 – Christina