VintaSoft PDF .NET Plug-in Discussions

Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.

Board index < VintaSoft Imaging < VintaSoft PDF .NET Plug-in Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

After merging PDF the result is much bigger



After merging PDF the result is much bigger

Post by ArturZigel »

After merging PDF the result is much bigger. Why is it so ? I code it with "imagecollection" because sometimes i want to merge PDF with JPG, TIFF or PNG. When i want to merge PDF with PDF the result is much bigger.
Here is my Code:
	    For Each file In inputFile
                imageCollection.Add(file)
            Next
            
            Dim document As New Vintasoft.Imaging.Pdf.PdfDocument(outputstream, New Vintasoft.Imaging.Pdf.PdfFormat("1.4"))
            For i As Integer = 0 To imageCollection.Count - 1
                 document.Pages.Add(imageCollection(i), Vintasoft.Imaging.Pdf.PdfCompression.Zip)
            Next
            document.SaveChanges()
            imageCollection.Dispose()
            document.Dispose()
I try this code too but nothing work:
For Each file In inputFile
     imageCollection.Add(file)
Next
Using pdfEncoder As New Vintasoft.Imaging.Codecs.Encoders.PdfEncoder(True)
        pdfEncoder.Settings.Conformance = Vintasoft.Imaging.Pdf.PdfDocumentConformance.PdfA_1b
        imageCollection.SaveSync(outputstream, pdfEncoder)
End Using

thank you, for your help

Artur


Re: After merging PDF the result is much bigger

Post by Alex »

Hello Artur,

By default SDK adds changes to PDF document incrementally, i.e. document stores all changes. If you want to get optimized PDF document, you need to pack PDF document using PdfDocument.Pack method.

Please read how to optimize and compress PDF document here: https://www.vintasoft.com/docs/vsimagin ... ument.html

Best regards, Alexander


Page 1 from 1: 1