Hi, All,
The size of attached file was increased from 406KB to 16260KB after the executing be following code:
Private Sub CleanPageNum(ByVal fileName As String)
Dim contentEditor As New Aspose.Pdf.Facades.PdfContentEditor()
Try
'bind input PDF file
contentEditor.BindPdf(fileName)
'make sure the regular expression strategy is being used
contentEditor.ReplaceTextStrategy.IsRegularExpressionUsed = True
'specify that you want to replace all the matching string
'by default only the first string will be replaced
contentEditor.ReplaceTextStrategy.ReplaceScope = Aspose.Pdf.Facades.ReplaceTextStrategy.Scope.REPLACE_ALL
'replace any string like 5467-3986-7 with new string
contentEditor.ReplaceText("Page [0-9]+ of [0-9]+", String.Empty)
'save output PDF file
contentEditor.Save(fileName)
Catch
Throw
End Try
End Sub
samuelxia71