iTextSharp PDF Merging and adding page number in one go
问题 I use this code to merge and add page number to the document: Using stream As FileStream = New FileStream(targetPDF, FileMode.Create) Dim myDoc As Document If (ExportOption.Orientation = Global.GenerateReport.GenerateReport.Orientation.Portrait) Then myDoc = New Document(New iTextSharp.text.Rectangle(PAGE_WIDTH, PAGE_HEIGHT), MARGIN_LEFT, MARGIN_RIGHT, MARGIN_TOP, MARGIN_BOTTOM) myDoc.SetPageSize(PageSize.A4) Else myDoc = New Document(New iTextSharp.text.Rectangle(PAGE_WIDTH, PAGE_HEIGHT),