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
PXCLIB40 and XCPRO40 compatibility question
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
-
- User
- Posts: 29
- Joined: Thu Sep 04, 2008 2:06 pm
-
- Site Admin
- Posts: 677
- Joined: Thu Jun 28, 2007 8:42 am
Re: PXCLIB40 and XCPRO40 compatibility question
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.
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.
Tracker Software
Project manager
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 29
- Joined: Thu Sep 04, 2008 2:06 pm
Re: PXCLIB40 and XCPRO40 compatibility question
Thank you!
Ondrej Bouda
Ondrej Bouda