We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problems with OptimizationOptions

Hello.


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
End If

If (imageQuality < 100) Then
Dim optimization As Aspose.Pdf.Document.OptimizationOptions = New Aspose.Pdf.Document.OptimizationOptions()
optimization.CompressImages = True
optimization.ImageQuality = imageQuality
document.OptimizeResources(optimization)
End If

Dim docInfo As New Aspose.Pdf.DocumentInfo(document)
docInfo.Title = “”

’ Save the updated file
document.Save(destinationFilePath)
End Sub

Hi Jorn,


Thanks for contacting support.

I will appreciate if you please share your input PDF file. It will help us to understand your requirement exactly and address it accordingly.


We are sorry for the inconvenience.


Best Regards,

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; -webkit-text-stroke: #000000} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; -webkit-text-stroke: #000000; min-height: 14.0px} span.s1 {font-kerning: none}