Hello
We are using PDF-XChange Editor in browser and using RunJavaScript to interact with pdf document. We are trying to find answers to the following questions. Can somebody help?
1.What event is being referenced when menu item is disabled
2.How do you disable toolbars and menu items
3. what event is triggered when the PDF is Modified (Inserts, Reordering, Deletions).
4. Can we capture the events
If so, What events can be captured.
5.Can we disable reordering pages.
6.Can we disable the context menu (right click)
Thanks
Editor in internet browser.
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- Site Admin
- Posts: 6815
- Joined: Mon Oct 15, 2012 9:21 pm
- Location: London, UK
Re: Editor in internet browser.
Hi Naseem,
Thanks for the post - this isn't something that can be done with JavaScript, the only way that this can be done is with one of our SDKs, through which you will have to compile your own application with the specified parameters. At the moment, we don't have an SDK available for the Editor, due to the fact that it is only a partial release.
This can be done with the Viewer SDKs that we have available from our main site
https://www.pdf-xchange.com
Hope that helps!
Thanks for the post - this isn't something that can be done with JavaScript, the only way that this can be done is with one of our SDKs, through which you will have to compile your own application with the specified parameters. At the moment, we don't have an SDK available for the Editor, due to the fact that it is only a partial release.
This can be done with the Viewer SDKs that we have available from our main site
https://www.pdf-xchange.com
Hope that helps!
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
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
Thank you.
Best regards
Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
-
- User
- Posts: 10
- Joined: Mon May 06, 2013 5:16 pm
Re: Editor in internet browser.
Thanks Will. I have another question.
We use RunJavaScript for annotation and other operations but we cannot read the "out Result" parameter in client javascript. As a workaround we store the result in "Keyword" property inside RunJavaScript, save the document and read the "Keyword" property back in client javascript.
Can we use the "global" static object to achieve this? if possible can you explain a better way of reading the result back in client script?
Thanks
We use RunJavaScript for annotation and other operations but we cannot read the "out Result" parameter in client javascript. As a workaround we store the result in "Keyword" property inside RunJavaScript, save the document and read the "Keyword" property back in client javascript.
Can we use the "global" static object to achieve this? if possible can you explain a better way of reading the result back in client script?
Thanks
-
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Editor in internet browser.
Hi, naseem.
to restore the normal state of command item - set "Online" value to the "State" property of corresponding command.
HTH.
You mean the "PDF-XChange Viewer ActiveX SDK" ? because the Editor's SDK still not published for now..We are using PDF-XChange Editor in browser and using RunJavaScript to interact with pdf document.
I'm afraid there's not any event for this.. The any menu item can be disabled/enabled internally in any moment..1.What event is being referenced when menu item is disabled
It is easy to turn off any command item (doesn't matter where it is: in menu or in toolbar):2.How do you disable toolbars and menu items
Code: Select all
pdfViewer.SetProperty("Commands[#" + ToStr(cmdID) + "].State", "Offline", 0);
//or
pdfViewer.SetProperty("Commands[" + cmdName + "].State", "Offline", 0);
You may handle the changing of special document's property by standard active-X event-handler IPDFXCviewEvents::OnEvent(..). Some pseudocode:3. what event is triggered when the PDF is Modified (Inserts, Reordering, Deletions).
Code: Select all
youreventhandler OnEvent(type, name, ..)
{
if (type == PXCVA_OnPropertyChanged)
{
if (HasSuffix(name, ".Modified")) // name == "Documents[#<docID>].Modified"
{
bool bModified = pdfViewer.Property(name, 0);
...
}
}
}
You may hide (is hidden by default) the "Page Thumbnails" pane (the "Documents[#docID].View.Panes["Thumbnails"].Visible" property). Because in this pane user can reorder pages (if it is allowed by document's security) by simple drag&drop and this feature cannot be disabled in current implementation.5.Can we disable reordering pages.
Yes, by:6.Can we disable the context menu (right click)
Code: Select all
pdfViewer.SetProperty("General.DenyAllContextMenus", "true", 0);
Exists other way for you:We use RunJavaScript for annotation and other operations but we cannot read the "out Result" parameter in client javascript.
Code: Select all
pdfViewer.SetProperty("JavaScript.UseExecResult", "true", 0); // call once only, enables JS-output through special "JavaScript.ExecResult" property
...
pdfViewer.RunJavaScript(...);
string res = pdfViewer.Property("JavaScript.ExecResult", 0);
Vasyl Yaremyn
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software Products
Project Developer
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.