IMG_PageGetDPI and IMG_PageGetSize functions fail

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

IMG_PageGetDPI and IMG_PageGetSize functions fail

Post by neilpitman » Thu Sep 06, 2007 10:26 am

When using 3.6021 processing the attached PDF file IMG_PageGetDPI and IMG_PageGetSize functions fail with

Error code is: 0x82030001
Severity is: Error
Facility is: ImagesCore
Error is: Invalid argument

There must be an issue specific to this PDF file as we have successfully processed PDFs from many different sources.

Our processing is as follows

hr = PXCp_ReadDocumentW(pObject,CA2W(PDF_FileName),0);
hr=PXCp_GetPagesCount(pObject,&pages);

Thanks

Neil Pitman
Aquaforest
hr=PXCp_PageGetBox(pObject,pagenum,PB_MediaBox,&rect);
hr=PXCp_ImageGetCountOnPage(pObject,pagenum,&imageCount);
hr= PXCp_ImageGetFromPage(pObject,pagenum,DWORD(0)&pImageHandle,&pMatrix);
PXCp_GetDocImageAsXCPage(pObject, pImageHandle, &hPage);
IMG_PageGetFormat(hPage,&format);

The hr=IMG_PageGetDPI(hPage,&xdpi,&ydpi); which fails. If we skip that function we then move on to
hr=IMG_PageGetSize(hPage,&width,&height); which also fails.
Attachments
sample.zip
(33.65 KiB) Downloaded 139 times

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

Post by neilpitman » Wed Sep 12, 2007 3:04 pm

Have I posted this to the correct forum? Just wondered why there wasn't any reply yet - usually you guys are very responsive.

Thanks

Ivan - Tracker Software
Site Admin
Posts: 3630
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Post by Ivan - Tracker Software » Thu Sep 13, 2007 6:17 am

Sorry, forgot to inform -- there was trouble, but it is fixed now -- please update your SDK to the latest available build (0122). Sorry for delay.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

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

This fix seems to have introduced a new problem

Post by neilpitman » Tue Sep 25, 2007 9:32 am

This fix seems to have introduced a new problem.

When processing the PDF and extracting the image we now find that IMG_PageGetSize returns an incorrect value for height. It always appears to be the same value as width.

Let me know if you need more detailed information.

Thanks

Neil

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

Post by John - Tracker Supp » Tue Sep 25, 2007 3:30 pm

Hi,

yes this is replicated - a new build will be urgently released later today or tomorrow to resolve this.

Thanks for your patience
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