PXCLIB40 and XCPRO40 compatibility question

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

ondrejb
User
Posts: 29
Joined: Thu Sep 04, 2008 2:06 pm

PXCLIB40 and XCPRO40 compatibility question

Post by ondrejb »

Hello,

is it possible (and safe) to combine functions from these two libraries: PXCLIB40 and XCPRO40 ?

E.g. if I wish to open an existing PDF document and add an image into it, could I use this sequence?
PXCp_Init
PXCp_ReadDocumentW
PXC_InsertPage
PXC_AddImageFromHBITMAP
PXC_PlaceImage
PXCp_WriteDocumentW

I'm confused, because each of the libraries has its own Init/NewDocument function and I don't know if their output (created PDF object) is equal or differs in some way. Anyway, there are just a few duplicate functions in these libraries - which leads me to suppose that they are designed to be combined. I searched the documentation and this forum but with no luck.

I tried to experiment with combining functions from these libraries and it seems that some functions will proceed OK while others will fail with an error code... I would appreciate some hint about this.

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

Re: PXCLIB40 and XCPRO40 compatibility question

Post by Lzcat - Tracker Supp »

Sorry, but you cannot mix functions from PXCLIB40 and XCPRO40. For now PXCLIB40 can create new documents, but not operate with existing. If you need to place some content on page (or different contents on many pages) in existing document best solution is:
1. Collect required information from existing pdf file using XCPRO40 (if needed).
2. Create new document with required content on pages using PXCLIB40, then save it to temporary file.
3. Open existing and temporary document using XCPRO40.
4. Combine temporary document pages with existing using PXCp_InsertPagesTo (to insert pages) or PXCp_PlaceContents (to place content from one page on another page) function.
5. Save modified document, close and delete temporary.
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.
ondrejb
User
Posts: 29
Joined: Thu Sep 04, 2008 2:06 pm

Re: PXCLIB40 and XCPRO40 compatibility question

Post by ondrejb »

Thank you!
Ondrej Bouda
Tom - Tracker

Re: PXCLIB40 and XCPRO40 compatibility question

Post by Tom - Tracker »

Pleasure :D