PDF Optimization

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v11)  /  PDF Optimization

DynamicPDF CoreSuite for .NET (v11) Forum

 Jun 29 2021 6:01 AM
Hello,

I would like to reduce the size of my merged pdf file.
I'm I right that I need for this the "ceTe.DynamicPDF.DocumentOptimization"?

My code:
Dim ceTeMergedPdfDoc As ceTe.DynamicPDF.Merger.MergeDocument = New ceTe.DynamicPDF.Merger.MergeDocument()
Dim mergeOptions As ceTe.DynamicPDF.Merger.MergeOptions = ceTe.DynamicPDF.Merger.MergeOptions.Append
mergeOptions.Outlines = False
ceTeMergedPdfDoc.Optimization = New ceTe.DynamicPDF.DocumentOptimization(True)
ceTeMergedPdfDoc.CompressionLevel = 9
ceTeMergedPdfDoc.Append(Util.GetResourcePath(MyPdfFiles), mergeOptions)
ceTeMergedPdfDoc.Draw(MyFullMergedPdfName)

When I execute the above code, on the ceTeMergedPdfDoc.Draw I get an "System.IndexOutOfRangeExecption" (Index was outside the bounds of the array).
This error message I only get when ceTeMergedPdfDoc.Optimization = New ceTe.DynamicPDF.DocumentOptimization(True) is activated. When this line is comment out, I have no problems.

Any ideas?

Kind regards!
 Jun 29 2021 11:04 AM
Posted by a ceTe Software moderator
Hello,

Please try using the latest version (v11) in your application and see it works. You can download latest product from NuGet (Package ID: ceTe.DynamicPDF.CoreSuite.NET) or from our website here.

If you continue facing issues after using the latest version, please send the following information to support@dynamicpdf.com so we can look into it further.

•        Source PDFs which gives the error.
•        Full error message along with stack trace.
•        Exact version and build number of the DynamicPDF DLL file used in your application. You can find this information by right clicking on the DLL file>>Properties>>Details tab>>Product version. Take a screenshot of Details tab and send it over to us.

Please include a link for this forum post in your email.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 11:03 AM.