PDF file size increases 40 times after clean the page number

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

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code and template file.

We have found your mentioned issue after an initial test. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-30225. We will further investigate the issue and will update you through this forum thread.

Sorry for the inconvenience caused,

The issues you have found earlier (filed as PDFNEWNET-30225) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.