PDFXCp_SaveImageFromPage ignores yDPI?

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
neilpitman
User
Posts: 39
Joined: Fri Jun 17, 2005 8:38 am

PDFXCp_SaveImageFromPage ignores yDPI?

Post by neilpitman » Fri Jun 17, 2005 10:03 am

We find that using PDFXCp_SaveImageFromPage seems to ignore yDPI and use xDPI for both x and y resolutions. Hence the code below results in a TIFF file with 204 x 204 resolution. Is this a bug or is there a way round this?

Options.yDPI = 98;
Options.xDPI = 204;

Options.CompressionMethod = ImCompression_CCITT4;

hr = PDFXCp_SaveImageFromPage(pdf, 0, index, &Options, pictureFileName);

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri Jun 17, 2005 2:20 pm

Hi,

just to clarify - you do mean the DPI and the image Height and Width - as obviously these are different items - please supply the PDF and the image extracted if you are 100% sure it is the DPI that is wrong.

Please zip any files sent
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

neilpitman
User
Posts: 39
Joined: Fri Jun 17, 2005 8:38 am

Post by neilpitman » Fri Jun 17, 2005 2:43 pm

Yes, it is the DPI that is being saved in the TIFF file incorrectly. Attached is the source PDF file with embedded image, and the resulting TIFF file :

Code used is :
Options.yDPI = 98;
Options.xDPI = 204;
Options.CompressionMethod = ImCompression_CCITT4;
hr = PDFXCp_SaveImageFromPage(pdf, pagenum, index, &Options, pictureFileName);

Resulting file header :

TIFF INFO for C:\dev\PDF-XChange PRO 3 SDK\Examples\Bin\sampleout.tif
TIFF Directory at offset 0x83e8
Subfile Type: (0 = 0x0)
Image Width: 1728 Image Length: 1063
Resolution: 204, 204 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-white
Samples/Pixel: 1
Rows/Strip: 1063
Planar Configuration: single image plane
Completed File:C:\dev\PDF-XChange PRO 3 SDK\Examples\Bin\sampleout.tif
Job Complete. Total time taken : 0.453 s
Attachments
sample.zip
PDF Sample and extracted TIFF
(64.82 KiB) Downloaded 105 times

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Sat Jun 18, 2005 8:17 am

Thanks will look into and advise.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Wed Jun 22, 2005 8:09 am

Issue located and fix available in Build 3.4084 released later this week.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply