Hello Bob,
Thanks for the swift response. I tried some debugging using the methods you described but I can't figure it out. Attached you can find a fileout of a class which reproduces the problem, starting from page 4. I also discovered a second minor problem. The alignment in the footer is 'right', but apparently there still some extra space on the right side of the page numbering. If you could find the time to look into this, it would mean a lot to me. kindest regards, Ivo Roefs Op 15/08/2012 14:52, bobn@xxxxxxxxxx schreef:
|
<?xml version="1.0"?> <st-source> <time-stamp>From VisualWorks®, 7.8.1 of 4 januari 2012 on 15 augustus 2012 at 19:50:49</time-stamp> <class> <name>Report4PDF_ReconstructionOfUnwantedPageBreaks</name> <environment>Smalltalk</environment> <super>Core.Object</super> <private>false</private> <indexed-type>none</indexed-type> <inst-vars></inst-vars> <class-inst-vars></class-inst-vars> <imports></imports> <category>Model</category> <attributes> <package>Nectar-BookKeeping</package> </attributes> </class> <!-- - - - - - - - - - - - - - - - - - - --> <methods> <class-id>Report4PDF_ReconstructionOfUnwantedPageBreaks class</class-id> <category>instance creation</category> <body package="Nectar-BookKeeping" selector="start">start self new start</body> </methods> <!-- - - - - - - - - - - - - - - - - - - --> <methods> <class-id>Report4PDF_ReconstructionOfUnwantedPageBreaks</class-id> <category>services</category> <body package="Nectar-BookKeeping" selector="footerOn:">footerOn: page page footer text: [:text | text right; fontSize: 8; string: 'page <page>/<total>']</body> <body package="Nectar-BookKeeping" selector="headerOn:">headerOn: page (page header) marginTop: 10; table: [:table | table row: [:row | row cell: [:cell | cell widthPercent: 50; text: [:text | text fontSize: 12; bold; string: 'Reconstruct unwanted page breaks']]. row cell: [:cell | cell right; widthPercent: 50; text: [:text | text fontSize: 12; string: 'PDF4Smalltalk & Report4PDF Rocks!!!!']]]]</body> <body package="Nectar-BookKeeping" selector="start">start "Report4PDF_ReconstructionOfUnwantedPageBreaks start" | report | report := Report4PDF.R4PReport new. report A4Portrait. report margin: 0. report page: [:page | page margin: 10. self headerOn: page. 1 to: 50 do: [:index1 | page text: [:text | text string: 'customer nr: ' , index1 displayString]. page table: [:table | table cellPadding: 2. 1 to: index1 \\ 20 do: [:docNr | table row: [:row | row fontSize: 6. row cell string: 'cell1OfDocNr' , docNr displayString. row cell string: 'cell2OfDocNr' , docNr displayString. row cell string: 'cell3OfDocNr' , docNr displayString. row cell string: 'cell4OfDocNr' , docNr displayString]]]]. self footerOn: page]. ^report saveAndShowAs: 'test.pdf'</body> </methods> </st-source>