The documentation is designed for a specific purpose to help you to apply the features on your side. Want to optimize pdf with pdf extractor sdk in your VB.NET app? ByteScout Data Extraction Suite is designed for it. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.
The following code snippet for ByteScout Data Extraction Suite works best when you need to quickly optimize pdf with pdf extractor sdk in your VB.NET application. Follow the instructions from scratch to work and copy the VB.NET code. Check VB.NET sample code samples to see if they respond to your needs and requirements for the project.
ByteScout provides the free trial version of ByteScout Data Extraction Suite along with the documentation and source code samples.
Imports Bytescout.PDFExtractor Module Program Sub Main() Try Using docOptimizer As New DocumentOptimizer("demo", "demo") 'Set Optimization Options Dim OptimizationOptions = New OptimizationOptions 'This will resize high resolution images OptimizationOptions.ResampleImages = True ''Set image optimization format 'OptimizationOptions.ImageOptimizationFormat = ImageOptimizationFormat.JPEG ''Control Optimized image quality, for further fine grained control 'OptimizationOptions.JPEGQuality = 10 'Perform Optimization docOptimizer.OptimizeDocument("sample.pdf", "sample_optimized.pdf", OptimizationOptions) ''Get Optimized file info Dim fileInfo_Sample = New System.IO.FileInfo("sample.pdf") Dim fileInfo_SampleOptimized = New System.IO.FileInfo("sample_optimized.pdf") 'Write Stats Console.WriteLine("Source File Size: " + fileInfo_Sample.Length.ToString() + " bytes") Console.WriteLine("Source File Optimized to Size: " + fileInfo_SampleOptimized.Length.ToString() + " bytes") End Using Catch ex As Exception Console.WriteLine(ex.Message) End Try Console.WriteLine("Press any key to exit...") Console.ReadLine() End Sub End Module