Merge documents page number

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v7)  /  Merge documents page number

DynamicPDF CoreSuite for .NET (v7) Forum

 Jul 12 2013 10:51 AM
When I merge 2 documents the page numbers do not get regenerated.  For example: 
  Original Doc 1 has 3 pages
  Original Doc 2 has 2 pages

Merge document has 5 pages and expected, however, the page number are as follows
   Page 1 of 3 (should be Page 1 of 5)
   Page 2 of 3
   Page 3 of 3
   Page 1 of 2 (should be Page 4 of 5)
   Page 2 of 2 (should be Page 5 of 5)
 Jul 12 2013 2:31 PM
Posted by a ceTe Software moderator
Hello,

The DynamicPDF Merger for .Net library does not have the capability to automatically modify or delete the page numbers that already exist on the PDFs that are being merged. You can add new page numbers to the final document as shown in the code below.

            MergeDocument document = new MergeDocument("documentb.pdf");
            document.Append("documenta.pdf");
            PageNumberingLabel pageNumberingLabel = new PageNumberingLabel("Page %%CP%% of %%TP%%", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center);
            Template template = new Template();
            template.Elements.Add(pageNumberingLabel);
            document.Template = template;
            document.Draw("final.pdf");


Thanks,
ceTe Software Support Team
 May 14 2020 3:12 PM
Is this possible in the latest version of the .NET library
 May 15 2020 2:34 PM
Posted by a ceTe Software moderator
Hi,

No, it's not possible to delete page numbering using the latest version (v10) either.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 5:06 AM.