After the insert of new pages or pdf documents I want to renumber the resulting document.
I also want to remove the existing page numbers.
1st - How can I remove existing HeaderAndFooterParams?
2nd - Renumbering with my Code:
PDFXCoreAPI.IBitSet bs = PDFCoreSDK.m_PDFCoreAPI_IAUXInst.CreateBitSet(numPages);
bs.Set(0, numPages - 1);
PDFXCoreAPI.IPXC_HeaderAndFooterParams hfParams = PDFCoreSDK.GetPDFInst().CreateHeaderAndFooterParams();
hfParams.Start = 0;
hfParams.End = (int)(numPages - 1);
hfParams.StartPageNumber = 1;
// hfParams.CenterHeaderText = "1 of n";
hfParams.RightHeaderText = "<<1 of n>>";
m_IDocument.PlaceHeadersAndFooters(bs, hfParams);
I am using the PDF XChange Editor to check the resulting changes in the document:
- hfParams.CenterHeaderText = "<<1 of n>>" results in ">" as the macro text
hfParams.CenterHeaderText = "1 of n" results in "1 of n" as the macro text
Thanks four your help in advance
Bernhard