Hello,
I want extract a page from an existing document (test based on DelphiPXProSample) for change the scalle of a page. The application crashed on the PXC_GetPage function (ok if i ised a variable created with PXC_NewDocument.
An idea ?
var
res : HRESULT;
page: PXCPage;
pcnt : dword ;
newdoc : HPDF ;
begin
if FormMainMenu.hDocument <> 0 then
res := PXC_GetPage(FormMainMenu.hDocument, 0, @page) ; => Crashed
res := PXC_CS_Scale(page, 0.5, 0.5); // change the scale
PXC_GetPage - Crashed when using with existing document
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
- Lzcat - Tracker Supp
- Site Admin
- Posts: 677
- Joined: Thu Jun 28, 2007 8:42 am
Re: PXC_GetPage - Crashed when using with existing document
This is expected behavior - becuse all our dll's do not allow "mixed" usage: all handles (documents, pages, etc) can be operable only with same library from which you get them, so document handle created using xcpro40.dll cannot be used in functions from pxclib40.dll and vice versa. Same for pxcview.dll. There is only one exclusion - Image-XChange pages handles can be used in functions from another dll, where this is declared.
If you need to add some content to existing page you should create new document with this content, save it to disk, read using xcpro40 and place over existing using PXCp_PlaceContents.
If you need to place contents on several pages it is recommended to do this at once - this will be faster and resulting file will be smaller.
If you need to add some content to existing page you should create new document with this content, save it to disk, read using xcpro40 and place over existing using PXCp_PlaceContents.
If you need to place contents on several pages it is recommended to do this at once - this will be faster and resulting file will be smaller.
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.