New Document

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

Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

New Document

Post by Rad1 »

Hello,

I want to create a new document From Blank Page using JS function. How to do this ? Can I change the default name "New Document" ?

thanks for help.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: New Document

Post by Corwin - Tracker Sup »

Next JS function allows creating new blank document:

Code: Select all

app.newDoc(420,595);
You can easily change document name by using "DispFileName" document property in Viewer ActiveX. Next code will change name for active document.

Code: Select all

CoPDFXCview1.SetDocumentProperty(0, "DispFileName", "Some new document name",0);
Also in new build will be available new method "CreateNewBlankDocument" which allows you to create new document just as it can be done with "New Empty Document" dialog in PDF-XChange Viewer (File->New document->From blank page...)
Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

Re: New Document

Post by Rad1 »

:wink: :wink: