PXC_AddImageA with a JPG file

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
ken66
User
Posts: 50
Joined: Mon May 16, 2005 5:10 pm

PXC_AddImageA with a JPG file

Post by ken66 » Wed Jun 08, 2005 12:21 am

Does PXC_AddImage work with JPG files?

If it does, here is a copy of some test code I have been trying to get to work.


CString fname = "test.pdf";
if (!Open(fname))
return;

_PXCImage* imageID = NULL;
HRESULT ret = PXC_AddPage(m_pdf_pt, PDF_PAGEWIDTH, PDF_PAGEHEIGHT, &m_page);

CString image = "c:\\test.jpg";

ret = PXC_AddImageA(m_pdf_pt, (LPCTSTR) image, &imageID);
ret = PXC_PlaceImage(m_page, imageID, 25, 25, 100, 50);

ret = PXC_EndPage(m_page);
ret = PXC_WriteDocumentA(m_pdf_pt, (LPCTSTR) fname);
ret = PXC_ReleaseDocument(m_pdf_pt);


PXC_AddImageA returns 0x82030002. I couldn't find this error anywhere.

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 08, 2005 8:16 am

Hi,

0x82030002 = Invalid file format

also it is possible to receive this if you do not have the required fm30base.dll with your app .exe

If this is not the case, could you please zip and upload the file (jpg) so we can take a look

thanks
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

ken66
User
Posts: 50
Joined: Mon May 16, 2005 5:10 pm

Post by ken66 » Wed Jun 08, 2005 2:45 pm

It seems that I was just missing that file. Thanks

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 08, 2005 3:24 pm

;)
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