Close cropping of images causing in PXCp_ImageGetFromPage

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
scanstore
User
Posts: 17
Joined: Tue Jan 04, 2005 9:48 pm
Contact:

Close cropping of images causing in PXCp_ImageGetFromPage

Post by scanstore » Wed Dec 07, 2005 7:43 pm

My program is attempting to convert PDF files to TIFF and the process usually works fine. However, on some images the border is being cropped and this is causing problems (see sample images).

What I would REALLY like to do is be able to create a perfect TIFF image of the PDF page regardless of whether this page is text or image based. This would solve this problem, as well as many others I encounter. Why can't I find a way to do this very simple thing using PDF-XChange?

If this is not a possibility, then I need the ability to save the TIFF images off without them being cropped. Or, I need the ability to re-create the white space on the border in the TIFF image that is being saved.
Attachments
samples.zip
(34.5 KiB) Downloaded 112 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 » Thu Dec 08, 2005 8:33 am

Hi,

I am afraid your statements/assumptions are incorrect on several key points.

1: The image that is being extracted by PDF-Tools is not being cropped - when analysed the PDF page shows that there is no white space within the image - rather the PDF page when created was set to a specific size and the image then placed upon it, being smaller, gives the impression of the image iteself having white space.

Therefore the image extracted is absolutley correct.

2: PDF-Tools SDK offers no PDF to Image conversion - the function you are using is called "PXCp_ImageGetFromPage" - and as this suggests it is retrieving an image from the page and restoring it to an image based format - not converting a page to an Image.

We have never suggested that our PDF library can convert a PDF page to an Image - it does however offer the ability to extract content such as Images and text and as your example demonstrates - does it well.

3: Converting a PDF page made up potentially multiple content types (Text, Images, Drawings, Shapes etc) is no small or simple task at all - I am sure our development team would be only too pleased to hear from you should you know a simple means of achieving this without utilising a 3rd party library, if so we would be pleased to facilitate this for the benefit of all.

However, once we have our own viewer available early next year this may offer some mechanism to facilitate this - but for now we have no means via the PDF libraries we offer to achieve this.

We do however offer TIFF-XChange SDK and this can do just as you require - there is a VB demo in the evaluation download showing just this
application in process.
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

scanstore
User
Posts: 17
Joined: Tue Jan 04, 2005 9:48 pm
Contact:

More software to buy

Post by scanstore » Thu Dec 08, 2005 4:04 pm

I had already implemented PDF-Tools when the need arised to convert PDF to TIFF. The PXCp_ImageGetFromPage really seemed like it should work for scanned PDF image files, and did work 95% of the time. Had there been something in the help file indicating that PDF to TIFF conversion is implemented in another SDK I would've gone directly to that solution. Having alreay purchased an SDK that can convert TIFF to PDF, it seemed like the same package should be able to do the reverse.

scanstore
User
Posts: 17
Joined: Tue Jan 04, 2005 9:48 pm
Contact:

Can't use a printer driver

Post by scanstore » Thu Dec 08, 2005 4:22 pm

The TIFF-XChange SDK seems to only offer the option of installing a printer driver and interfacing with that to output the TIFF file. This is not a viable solution for me. I only need to convert PDF directly to TIFF and cannot install new printer drivers on the end-user's computer to do it. Is there any way to do this simple, direct conversion without installing a printer driver?

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 » Thu Dec 08, 2005 7:08 pm

Sorry - at this time we offer no alternate method other than that outlined using TIFF-XChange.

As mentioned, once our viewer is complete with an API - we would expect to be able to progress such a method - but until then I am afraid not.
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