Page 1 of 1

PXC_AddImageA with a JPG file

Posted: Wed Jun 08, 2005 12:21 am
by ken66
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.

Posted: Wed Jun 08, 2005 8:16 am
by John - Tracker Supp
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

Posted: Wed Jun 08, 2005 2:45 pm
by ken66
It seems that I was just missing that file. Thanks

Posted: Wed Jun 08, 2005 3:24 pm
by John - Tracker Supp
;)