We have been experiencing issues with the OptimizationOptions for PDF documents.
When we tried to use this functionality it altered/removed some of the content and the process took over 15 minutes on a file with around 200 pages. Is this normal, or have we done something wrong? imageQuality was set to 70 when we tried this.
We ran the following code:
Public Sub CompressAndRemoveTitleMeta(ByVal destinationFilePath As String, ByVal imageQuality As Int32)
’ Load source PDF file
Dim document As Aspose.Pdf.Document = New Aspose.Pdf.Document(destinationFilePath)
If (imageQuality < 1) Then
imageQuality = 100
If (imageQuality < 100) Then
Dim optimization As Aspose.Pdf.Document.OptimizationOptions = New Aspose.Pdf.Document.OptimizationOptions()
optimization.CompressImages = True
optimization.ImageQuality = imageQuality
Dim docInfo As New Aspose.Pdf.DocumentInfo(document)
docInfo.Title = “”
’ Save the updated file