Loading...

JPEG quality and PDF compression

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

JPEG quality and PDF compression

Postby blagoye » Sat Aug 21, 2010 11:29 pm

Hi,

I have trouble changing PDF compression level, and JPEG quality. Compressing is definitely present but changing it [1..9] i.e. [0..100] has no effect.
We are using GDPicture5 Active-X control - it is bought.

Here is what I am doing...
Since I want clients to have the opportunity to view all scanned pages, reorder them and delete them I have created an array of AxImaging objects and do TwainAcquireToGdPictureImage on each object. I want to save true type scanned color images (i.e. 24bpp) into PDF and be able to change JPEG compression.

What I do is practically this:
Code: Select all
ar(0).TwainPdfStartEx("c:\lala.pdf")
For i = 0 to nCount-1
     If iColor = TWPT_BW then
        ar(i).ConvertTo1Bpp()
        ar(i).PdfSetCompressionLevel(9)
     ElseIf iColor = TWPT_GRAY
        ar(i).ConvertTo8BppQ()
        ar(i).PdfSetCompressionLevel(9)
     Else iColor = TWPT_RGB
        ar(i).ConvertTo24BppRGB()
        ar(i).PdfSetJpegQuality(10)
     End If
     hScan = ar(i).GetNativeImage
     ar(0).TwainAddGdPictureImageToPdf(hScan)
Next
ar(0).TwainPdfStop()
ar(0).CloseNativeImage()


PDF compression is evident, and color images have a slight compression, but no matter how I change PDF compression or JPEG quality in the code above nothing changes! What am I doing wrong?

Thank you in advance!
blagoye
 
Posts: 10
Joined: Sat Oct 31, 2009 11:24 pm

Re: JPEG quality and PDF compression

Postby Loïc » Tue Aug 24, 2010 3:25 pm

Hi,

In the current version PdfSetJpegQuality must be called before TwainPdfStartEx.
For next minor release we will add support for opened PDFs.

Hope this helps !

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4437
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest