problem with PXCp_PlaceContents VB

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
wesallen
User
Posts: 32
Joined: Wed Oct 03, 2007 9:15 pm
Location: Georgia

problem with PXCp_PlaceContents VB

Post by wesallen » Thu Oct 18, 2007 4:03 pm

I am trying to create a header for a pdf document and then merge an existing document with the new one. I am able to create the new document, transfrom the existing document to shrink the first page, but can't merge the 2 using PXCp_PlaceContents. I do not receive an error message, and all I end up with in the end is the new document with no data from the exisiting doc. Here is code I am trying to use

res = PXCp_Init(NewPDF, InitPDF, InitPDFDevCode)
If IS_DS_FAILED(res) Then GoTo Error
res = PXCpVB_ReadDocumentW(NewPDF, CurrentProjectFolder$ & PdfFileName$, 0)
If IS_DS_FAILED(res) Then GoTo Error
Dim placeInfo As PXCp_ContentPlaceInfo
placeInfo.Alignment = 0
placeInfo.DestPage = NewPDF
placeInfo.SrcPage = ptrpdf
res = PXCp_PlaceContents(NewPDF, ptrpdf, 1, placeInfo, 0)
If IS_DS_FAILED(res) Then GoTo Error

res = PXCpVB_WriteDocumentW(NewPDF, CurrentProjectFolder$ & PdfFileName$, PXCp_CreationDisposition_Overwrite, PXCp_Write_Release)

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 » Thu Oct 18, 2007 4:27 pm

Oops - looks like you have misread the function documentation ...

placeInfo.DestPage = NewPDF // here shoud be the page index in the destination file, NOT the destination file handle


placeInfo.SrcPage = ptrpdf // and here - page index in the source file


HTH
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

wesallen
User
Posts: 32
Joined: Wed Oct 03, 2007 9:15 pm
Location: Georgia

Post by wesallen » Thu Oct 18, 2007 4:31 pm

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 » Thu Oct 18, 2007 4:34 pm

No Problem :)
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

wesallen
User
Posts: 32
Joined: Wed Oct 03, 2007 9:15 pm
Location: Georgia

Post by wesallen » Thu Oct 18, 2007 8:06 pm

I still have the same problem, but now I get an error when I try to open the document in adobe. The error is An Unrecognized token "cm1" was found. I probably still have something wrong with the PXCp_PlaceContents function. I have zipped the code I am trying to use along with one of the exisiting pdf files. Thanks
Attachments
placecontent.zip
zip file contains text file of vb code and 1 pdf file.
(100.54 KiB) Downloaded 121 times

Ivan - Tracker Software
Site Admin
Posts: 3609
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Post by Ivan - Tracker Software » Fri Oct 19, 2007 7:26 am

I'm afraid we need both source files and a result file. Please post them here or send me on Ivan@tracker-software.com
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

wesallen
User
Posts: 32
Joined: Wed Oct 03, 2007 9:15 pm
Location: Georgia

Post by wesallen » Fri Oct 19, 2007 1:07 pm

Files b4 and after PXCp_PlaceContents
Attachments
Files.zip
(103.93 KiB) Downloaded 126 times

Ivan - Tracker Software
Site Admin
Posts: 3609
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Post by Ivan - Tracker Software » Fri Oct 19, 2007 1:42 pm

Thanks for the files. We found where the problem is and now it is fixed. The fix will be available into the next build.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

wesallen
User
Posts: 32
Joined: Wed Oct 03, 2007 9:15 pm
Location: Georgia

Post by wesallen » Fri Oct 19, 2007 2:25 pm

When will the next build be available?

Ivan - Tracker Software
Site Admin
Posts: 3609
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Post by Ivan - Tracker Software » Fri Oct 19, 2007 2:46 pm

It should be available next week
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

Post Reply