PXC_AddImageW() returning "Invalid Image"

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 or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
jeffnordquist
User
Posts: 3
Joined: Fri Feb 25, 2011 8:55 pm

PXC_AddImageW() returning "Invalid Image"

Post by jeffnordquist »

Greetings,

I'm trying to embed some images in the PDFs I'm creating. Following the example in the docs, I'm doing something like this:

_PXCImage* pxcImage = NULL;
HRESULT result = PXC_AddImageW( pdfDoc, L"C:\\image.jpg", &pxcImage );

"Result" is coming back as 0x82030002, which is getting formatted as "Invalid file format". And pxcImage is still NULL. I know the pdfDoc is valid, and the image is valid as well. Does anyone know what the problem might be? Is there a way to get more specifics about the problem?

FWIW, I'm still evaluating the software; is it possible that it's restricted by the fact that it's unregistered?

Thanks,
Jeff Nordquist
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: PXC_AddImageW() returning "Invalid Image"

Post by Lzcat - Tracker Supp »

Hi Jeff.
Looks like fm40base.dll is missing (it must be located in same folder as ixclib40.dll) - it is required to support jpeg, png and may other formats except bmp (bilt-in support in ixclib40.dll) and tiff (requires fm40tiff.dll).
HTH.
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
jeffnordquist
User
Posts: 3
Joined: Fri Feb 25, 2011 8:55 pm

Re: PXC_AddImageW() returning "Invalid Image"

Post by jeffnordquist »

Thanks! That did the trick.

While we're on the subject, I notice that my transparent PNGs are coming through opaque. I'm not seeing any settings that would let me change that. Is that just how it is? Certainly not the end of the world; just wanted to be sure I'm not missing anything.

Thanks again,
Jeff
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXC_AddImageW() returning "Invalid Image"

Post by Tracker Supp-Stefan »

Hello Jeff,

I just spoke with Victor and he said that there is some code in the SDK that is prepared to work with transparent images, but it is not accessible at the higher level. I have created a ticket for this to be "fixed" but when or if it will actually happen is not yet clear, as we are hard working on the new major versions of all our products and this might be postponed for after the new versions have been released.
The ticket name and number are:
#894: Support for Transparent PNGs in Image XChange SDK

Best,
Stefan
jeffnordquist
User
Posts: 3
Joined: Fri Feb 25, 2011 8:55 pm

Re: PXC_AddImageW() returning "Invalid Image"

Post by jeffnordquist »

Gotcha. I know how it goes. Thanks for the quick reply!

Jeff
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXC_AddImageW() returning "Invalid Image"

Post by Tracker Supp-Stefan »

That's the least I could do Jeff,

And thanks for the understanding.

We will also keep you updated both here in the topic and via e-mails (I took the e-mail visible in your forum profile) with how the ticket develops.

Regards,
Stefan
Post Reply