Providing footer in abcpdf on different oriented pages

I am following the example of adding a footer with a page number to the Headers and Footers Example page on the abcpdf documentation site.

The problem is that my pdf document has multiple pages with different orientations and different page sizes.

Most of the pages are either portrait or A4 or landscape and A3, but there is a possibility that A3 could be in portrait.

Is there a way to easily place the footer in the correct part of the document for each of these pages, especially considering that once the document has been added, it seems that I can't easily tell which orientation / page size is being used.

Currently I am creating separate documents for each section and setting the orientation and then adding them to the main document.

I need to put the page number in the "Page X of Y" format, I can get the page numbers correctly if I do this for each document, but I need it for the general document

+3


source to share


1 answer


When you read a document / PDF, you access properties such as pdf width and pdf height. the location to add the object to the header is x: 0, y: 0 the footer is just the height of the document - the height of the footer object with again X of 0.

see here: http://www.websupergoo.com/helppdf8net/source/2-getting_started/3-coordinates.htm

what a good example of how to put your rectangle, inside your rectangle goes your text ie Page 2 of 16



http://www.websupergoo.com/helppdf8net/default.htm?page=source%2F2-getting_started%2F3-coordinates.htm

cropbox is a way to get the actual size of the document and therefore know what coordinates to enter for your text box.

however, it will be easier for you if you count in percentages rather than in fixed numbers, 10% from below is always 10% regardless of document size!

0


source







All Articles