Help using DoVerb

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

ugradedeveloper
User
Posts: 223
Joined: Wed Aug 22, 2007 4:40 pm

Help using DoVerb

Post by ugradedeveloper »

I am trying to use some Named Operations that were added to the SDK fairly recently, DeletePages and InsertPages. My code isn't working and the documentation is not helping me to figure out what is wrong. I can't find anything in the code examples either. My code looks like this:

Code: Select all

            SetProperty("Operations.DeletePages.RangeType", "Exact");
            SetProperty("Operations.DeletePages.RangeText", "1");

            object vDataIn = nDocumentID;
            object vDataOut;
            axCoPDFXCview1.DoVerb(null, "DeletePages", vDataIn, out vDataOut);
The value of nDocumentID comes from OpenDocument - I do this because the documentation for DeletePages says there is one required argument which is "The unique identifier of the document or full file name of the document."

The call to DoVerb does not generate an error, but it doesn't delete the page either.

Help anyone?

Thank you
Lewis
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Help using DoVerb

Post by Vasyl - PDF-XChange »

Here is bug really, will be fixed in the next build. Please use alternative method for this:

Code: Select all

DoDocumentVerb(docId, "", "DeletePages", dataIn, dataOut, 0);
// or
DoVerb("Documents[#<docId>]", "DeletePages", dataIn, dataOut, 0);
// dataIn - can be empty in both cases.
Cheers
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
ugradedeveloper
User
Posts: 223
Joined: Wed Aug 22, 2007 4:40 pm

Re: Help using DoVerb

Post by ugradedeveloper »

I used the DoDocumentVerb method and now the code is working, sort of... it is actually bringing up the Delete Pages dialog, which is not what I expected. I assumed that having set the values for Operations.DeletePages, it would perform the operation using the supplied parameters rather than invoking the end-user dialog.

Please clarify how these operations work. Thanks -

Lewis
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Help using DoVerb

Post by Vasyl - PDF-XChange »

Use special flag PXCVA_NoUI for this:

Code: Select all

DoDocumentVerb(docId, "", "DeletePages", dataIn, dataOut, PXCVA_NoUI);
Cheers.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.