I have some problem with the file size of pdfs being too large. If I optimize in Acrobat the file size decreases almost 80%. I am using the code below to create them. I've noticed there is a PDFSetCompressionLevel method but it only works with PDFnewPDF. I am having issues converting this code to use PDFnewPDF with the PDFSetCompressionLevel. Can you give me an assist?
- Code: Select all
If Imaging1.TwainOpenDefaultSource() Then
Imaging1.TwainSetAutoFeed(True) 'Set AutoFeed Enabled
Imaging1.TwainSetAutoScan(True) 'To achieve the maximum scanning rate
Imaging1.TwainSetCurrentResolution(300)
Imaging1.TwainSetCurrentPixelType(GdPicturePro5.TwainPixelType.TWPT_RGB) 'RGB
Imaging1.TwainSetCurrentBitDepth(8) ' 24 bpp
Imaging1.TwainPdfStart("output.pdf")
Imaging1.CreateImageFromTwain(Me.Handle.ToInt32)
nImageID = Imaging1.GetNativeImage
Call Imaging1.TwainAddGdPictureImageToPdf(nImageID)
Imaging1.CloseImage(nImageID)
Imaging1.TwainPdfStop()
Call Imaging1.TwainCloseSource()
MsgBox("Done !")
Else
MsgBox("can't open default source, twain state is: " & Trim(Str(Imaging1.TwainGetState)))
End If
Thank You!
