Extract pages

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
Tom Princen
User
Posts: 83
Joined: Wed Mar 25, 2015 10:15 am

Extract pages

Post by Tom Princen »

this code generates errror E_FAIL (errorcode -2147467259) on line
MyDocExtract.Pages.InsertPagesFromDoc(MydocSource, 0, 1, 1, 0);

What am I doing wrong?

This is my code
InitPDFX(MyKey);
CDocAuthCallback clbk = new CDocAuthCallback();
clbk.m_pxsInst = MyIPXS;

IPXC_Document MydocSource = MyPXC.OpenDocumentFromFile(lsSourceFile, clbk);
IPXC_Document MyDocExtract = MyPXC.NewDocument();
MyDocExtract.Pages.InsertPagesFromDoc(MydocSource, 0, 1, 1, 0);

MyDocExtract.WriteToFile(lsOutput);
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17908
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Extract pages

Post by Tracker Supp-Stefan »

Hello Tom,

This has already been discussed and answered here:
https://forum.pdf-xchange.com/ ... 66&t=25278
So please do take a look at the above forum topic.

Regards,
Stefan
Tom Princen
User
Posts: 83
Joined: Wed Mar 25, 2015 10:15 am

Re: Extract pages

Post by Tom Princen »

OK after update it works
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17908
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Extract pages

Post by Tracker Supp-Stefan »

Glad to hear that!

We will consider this resolved!

Cheers,
Stefan
Post Reply