Page Numbers
I'm trying to get page numbers to appear in a PDF document using the following code: fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=main page-height=29.7cm page-width=21cm margin-top=2cm margin-bottom=2cm margin-left=2cm margin-right=1.2cm fo:region-body/ /fo:simple-page-master fo:page-sequence-master master-name=single fo:single-page-master-reference master-name=main/ /fo:page-sequence-master /fo:layout-master-set fo:page-sequence master-name=single initial-page-number=1 !--fo:sequence-specification fo:sequence-specifier-alternating page-master-first=main page-master-odd=main page-master-even=main/ /fo:sequence-specification -- fo:static-content flow-name=xsl-region-after fo:block text-align=center font-size=10pt font-family=serif line-height=14pt Test - p. fo:page-number/ /fo:block /fo:static-content fo:flow flow-name=xsl-region-body xsl:apply-templates/ /fo:flow /fo:page-sequence /fo:root But I keep getting the following warning: WARNING: region-name 'xsl-region-after' doesn't exist in the layout-master-set. and no page numbers. How and where do I add xsl-region-after to the fo:layout-master-set in order to get it to work? More importantly, is there a comprehensive tutorial on FOP anywhere which explains what each of the elements and attributes do? So far I've only come across examples and getting anything to work is a 3 hour exercise in banging my head against the desk :) Many thanks in advance, Ben __ CONFIDENTIALITY NOTICE This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you are not the intended recipient, please contact us immediately. The contents of any attachments in this e-mail may contain software viruses, which could damage your own computer system. While Marlborough Stirling has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should carry out your own virus checking procedure before opening any attachment. Marlborough Stirling plc, Registered No. 3008820, Allen Jones House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH Tel: 01242 547000 Fax: 01242 547100 http://www.marlborough-stirling.com The following companies are subsidiaries of Marlborough Stirling plc and are registered in England and Wales at the above address: Marlborough Stirling PLC, Registered No. 3008820 The Marlborough Stirling Group PLC, Registered No. 1855353 Marlborough Stirling Administration Limited, Registered No. 2341195 Metgem Limited, Registered No. 02341195 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Page Numbers - fixed
Thanks for all the help, it's fixed now :) __ CONFIDENTIALITY NOTICE This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you are not the intended recipient, please contact us immediately. The contents of any attachments in this e-mail may contain software viruses, which could damage your own computer system. While Marlborough Stirling has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of software viruses. You should carry out your own virus checking procedure before opening any attachment. Marlborough Stirling plc, Registered No. 3008820, Allen Jones House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH Tel: 01242 547000 Fax: 01242 547100 http://www.marlborough-stirling.com The following companies are subsidiaries of Marlborough Stirling plc and are registered in England and Wales at the above address: Marlborough Stirling PLC, Registered No. 3008820 The Marlborough Stirling Group PLC, Registered No. 1855353 Marlborough Stirling Administration Limited, Registered No. 2341195 Metgem Limited, Registered No. 02341195 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Unexpected page splitting
I've recently just started using FOP and am having great difficulty understanding how margins and space-after influence each other. It's difficult to explain what the problem is without knowing what may be causing it, so I have included an extract from the .fo document For some reason the final block after the table and before the page break gets split over 2 pages, despite the fact that there is very large amounts of space available. This does not occur if the 'space-after' and 'space-before' attributes are removed from the fo:blocks within the fo:table-cells. So my questions are (1) why does the page break occur despite the vast amounts of room remaining on the page? (2) is this the correct way to add padding to table-cells and if not, what is? Many thanks, Ben Here is an extract from the .fo file: / BEGIN EXTRACT /// fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master background-image=draft.jpg margin-right=1.2cm margin-left=2cm margin-bottom=2cm margin-top=2cm page-width=21cm page-height=29.7cm page-master-name=main fo:region-body/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence fo:sequence-specification fo:sequence-specifier-alternating page-master-even=main page-master-odd=main page-master-first=main/ /fo:sequence-specification fo:flow fo:block padding-bottom=10pt padding-top=10pt padding-right=10pt padding-left=10pt font-weight=bold text-align=center line-height=(@Size} font-family=Arial font-size=14pt space-after.optimum=15ptPLANNING AREAS/fo:block fo:block font-weight=Normal text-align=justify space-after.optimum=15pt line-height=15pt font-family=Arial font-size=12ptDetailed below are your responses to the planning areas which were available for discussion: /fo:block fo:block space-after=15pt fo:table fo:table-column column-width=52.5mm/ fo:table-column column-width=37.5mm/ fo:table-body fo:table-row fo:table-cell border=0.5pt solid black fo:block space-after=3pt space-before=3pt text-align=start font-family=Arial font-weight=boldNEED AREA/fo:block /fo:table-cell fo:table-cell border=0.5pt solid black fo:block space-after=3pt space-before=3pt text-align=start font-family=Arial font-weight=boldCLIENT RESPONSE/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border=0.5pt solid black fo:block space-after=3pt space-before=3pt font-size=10pt text-align=start font-family=Arial font-weight=Mortgages amp; Loans/fo:block /fo:table-cell fo:table-cell border=0.5pt solid black fo:block space-after=3pt space-before=3pt font-size=10pt text-align=start font-family=Arial font-weight=Agreed for Discussion/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border=0.5pt solid black fo:block space-after=3pt space-before=3pt font-size=10pt text-align=start font-family=Arial font-weight=Protection - Death/fo:block /fo:table-cell fo:table-cell border=0.5pt solid black fo:block space-after=3pt space-before=3pt font-size=10pt text-align=start font-family=Arial font-weight=Agreed for Discussion/fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border=0.5pt solid black