Hi,
I am using the following code snippet to add page numbers to a merged PDF document ( We have multiple PDF’s that are merged into a single PDF document) but I saw that the page numbers are not added to the documents that have an image in it and also if they are scanned documents that are .pdf extension. ( But the number is definitely incremented and the next pages after a scanned document display page numbers again )
PageNumberStamp stamp = new PageNumberStamp()
{
Background = true,
LeftMargin = 1,
RightMargin = 2,
TopMargin = 3,
BottomMargin = 4,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Bottom,
Opacity = 1,
Rotate = Rotation.None,
RotateAngle = 0,
XIndent = 0,
YIndent = 0,
Zoom = 1,
StartingNumber = 1,
Value = "Page #",
};
var response =
pdfApi.PostDocumentPageNumberStamps(destFileName, stamp, startPageNumber: 1);
Please let me know how can I successfully accomplish adding page numbers to all the pages of a merged PDF. Any help is greatly appreciated.
Thank you,
SLS