Welcome Guest Search | Active Topics | Sign In | Register

EO.pdf - Update page x of y after deleting a page Options
Bill
Posted: Monday, June 6, 2016 10:17:24 AM
Rank: Newbie
Groups: Member

Joined: 10/14/2015
Posts: 7
Hello - I'm working with an existing pdf document which has page information in the footer (<<Page 1 of n>>).

Using a 5 page document as an example:

Page 1 of 5
Page 2 of 5
Page 3 of 5
Page 4 of 5
Page 5 of 5

If I delete page using this function:

Quote:
myPDFDoc.Pages.RemoveAt(2);


But now the page footers are:

Page 1 of 5
Page 2 of 5
Page 4 of 5
Page 5 of 5

How can I refresh the footer information so it correctly shows:

Page 1 of 4
Page 2 of 4
Page 3 of 4
Page 4 of 4



eo_support
Posted: Monday, June 6, 2016 10:59:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

You will not be able to do that directly. PDF file does not have the notion of header/footer. Header/footer in PDF file is just output at a specific position X and Y as output at any other position. So there is no way for you to update that directly. The only way you can achieve this is to add some additional output on top of those output thus obscures the old footer information. You can do this with AcmRender. For example, you can use an AcmBlock with a solid white background color to obscure the existing footer, then use AcmText to render the new footer text. The old footer is never removed/updated. It's just been covered up by the new footer.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.