inseting pages

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

moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

inseting pages

Post by moke@napconet.com »

I'd like to insert pages into an open doc without showing the UI. It seems this can't be done with

Code: Select all

Call CoPDFXCview1.DoVerb("", "ExecuteCommand", 36037, 0, PXCVA_NoUI)
So I trying javascript but can't seem to get it to work

Code: Select all

Call CoPDFXCview1.RunJavaScript(this.insertpages("c:\temp\a.pdf"), 0, 4096, 0)
gives me an object required error. I know this isn't a java support site but a clear example would be very helpful.
Any help would be appreciated.
ugradedeveloper
User
Posts: 223
Joined: Wed Aug 22, 2007 4:40 pm

Re: inseting pages

Post by ugradedeveloper »

moke@napconet.com wrote:So I trying javascript but can't seem to get it to work

Code: Select all

Call CoPDFXCview1.RunJavaScript(this.insertpages("c:\temp\a.pdf"), 0, 4096, 0)
gives me an object required error. I know this isn't a java support site but a clear example would be very helpful.
Any help would be appreciated.
Your code doesn't follow the Adobe Javascript specification for how this function is to be called. An example of valid syntax would be:
this.insertPages({nPage:this.numPages-1, cPath:"InsertExampleSource.pdf"});

I grabbed this example from the following page:
http://www.acrobatusers.com/tutorials/i ... javascript

You may have been confused by the fact that the PDF-XChange documentation doesn't specify how the function parameters are to be passed. That's because they follow the Adobe specifications. You need to have a copy of the Adobe Javascript programming reference, which you can get here:
http://www.adobe.com/devnet/acrobat/javascript.html
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: inseting pages

Post by John - Tracker Supp »

Thnaks for your help 'U...D...'

:)
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
moke@napconet.com
User
Posts: 60
Joined: Fri Oct 24, 2008 5:17 pm

Re: inseting pages

Post by moke@napconet.com »

got it thanks for the help! :)
ugradedeveloper
User
Posts: 223
Joined: Wed Aug 22, 2007 4:40 pm

Re: inseting pages

Post by ugradedeveloper »

Happy to help :)