prevent PDFXVwer from editing pdf inside iframe.
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 15
- Joined: Wed Apr 03, 2013 12:43 pm
prevent PDFXVwer from editing pdf inside iframe.
hi
In my application I open a pdf file inside iframe with PDFXVwer.
I need the file to open as read only , not allowing the user to edit/save it until he press a button.
how can I prevent this editing and later permit it?
thanks
Tami
In my application I open a pdf file inside iframe with PDFXVwer.
I need the file to open as read only , not allowing the user to edit/save it until he press a button.
how can I prevent this editing and later permit it?
thanks
Tami
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: prevent PDFXVwer from editing pdf inside iframe.
Hello Tami,
Please take a look at the "How to Disable a Command" section of the Viewer AX manual. You can effectively forbid the user from doing anything to the document, and intercept any mouse + KB combination used by them and either tell the Viewer to ignore them or perform a custom action.
Best,
Stefan
Please take a look at the "How to Disable a Command" section of the Viewer AX manual. You can effectively forbid the user from doing anything to the document, and intercept any mouse + KB combination used by them and either tell the Viewer to ignore them or perform a custom action.
Best,
Stefan
-
- User
- Posts: 15
- Joined: Wed Apr 03, 2013 12:43 pm
Re: prevent PDFXVwer from editing pdf inside iframe.
can you please post the link where to Viewer AX manual .
I didn't found it.
thanks
Tami
I didn't found it.
thanks
Tami
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: prevent PDFXVwer from editing pdf inside iframe.
Hi Tami,
It should be invcluded as part of the Viewer AX SDK isntallation pacakge, and located in
<<Path to>>\Tracker Software\PDF-XChange Viewer SDK\SDKHelp
Best,
Stefan
It should be invcluded as part of the Viewer AX SDK isntallation pacakge, and located in
<<Path to>>\Tracker Software\PDF-XChange Viewer SDK\SDKHelp
Best,
Stefan
-
- User
- Posts: 15
- Joined: Wed Apr 03, 2013 12:43 pm
Re: prevent PDFXVwer from editing pdf inside iframe.
hi
I downloaded PDF-XChange Viewer SDK.
I am looking for a tutorial / explanation how to merge it in my web-project.
I read the manuals but I didn't understand how to do it .
can you please explain what files I need to import to my project and how to use them .
thanks
Tami
I downloaded PDF-XChange Viewer SDK.
I am looking for a tutorial / explanation how to merge it in my web-project.
I read the manuals but I didn't understand how to do it .
can you please explain what files I need to import to my project and how to use them .
thanks
Tami
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: prevent PDFXVwer from editing pdf inside iframe.
Hello Tami,
Have you checked the AspNetPDFXChangeAXSample sample that comes with the Viewer AX SDK?
Cheers,
Stefan
Have you checked the AspNetPDFXChangeAXSample sample that comes with the Viewer AX SDK?
Cheers,
Stefan
-
- User
- Posts: 15
- Joined: Wed Apr 03, 2013 12:43 pm
Re: prevent PDFXVwer from editing pdf inside iframe.
Hello Stefan
I looked at the example but I couldn't understand how to use it in my project.
I am creating web-application using java , on SpringSource Tool Suite 2.9.1.
I don't know witch part of the sdk I need to import to my project, do I need to change web.xml or any other configuration files etc..
Is there any project example or tutorial that explain how to use it in java web project ?
thanks
Tami
I looked at the example but I couldn't understand how to use it in my project.
I am creating web-application using java , on SpringSource Tool Suite 2.9.1.
I don't know witch part of the sdk I need to import to my project, do I need to change web.xml or any other configuration files etc..
Is there any project example or tutorial that explain how to use it in java web project ?
thanks
Tami
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: prevent PDFXVwer from editing pdf inside iframe.
Hi Tami,
I've passed this to a colleague of mine dealing with those samples, and if such a solution is possible we will let you know.
Best,
Stefan
I've passed this to a colleague of mine dealing with those samples, and if such a solution is possible we will let you know.
Best,
Stefan
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: prevent PDFXVwer from editing pdf inside iframe.
Hi again Tamih,
I spoke with one of my colleagues and he recommended that you should check the "WebExamples" folder inside the Viewer SDK - which includes the PDFXChangeViewer.html sample showing some simple script to control our AX.
Best,
Stefan
I spoke with one of my colleagues and he recommended that you should check the "WebExamples" folder inside the Viewer SDK - which includes the PDFXChangeViewer.html sample showing some simple script to control our AX.
Best,
Stefan
-
- User
- Posts: 15
- Joined: Wed Apr 03, 2013 12:43 pm
Re: prevent PDFXVwer from editing pdf inside iframe.
Hi
Tanks for all the help so far...
I used the example you told me , but I still have few questions.
How can I disable/enable the user from editing the file ?
I need the file to be in 'read only' mode in the beginning , and only after some button is pressed and some checked are done I need to permit it's editing.
I saw there is 'DenyAllModifyOperations ' but I couldn't find any javascript example how to use it .
I tried but it didn't work.
any javaScript code example would be great .
Thanks
Tami
Tanks for all the help so far...
I used the example you told me , but I still have few questions.
How can I disable/enable the user from editing the file ?
I need the file to be in 'read only' mode in the beginning , and only after some button is pressed and some checked are done I need to permit it's editing.
I saw there is 'DenyAllModifyOperations ' but I couldn't find any javascript example how to use it .
I tried
Code: Select all
PDFView.DenyAllModifyOperations(0);
any javaScript code example would be great .
Thanks
Tami
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: prevent PDFXVwer from editing pdf inside iframe.
Hello Tami,
Try to use this:
HTH.
Try to use this:
Code: Select all
PDFView.SetProperty("General.DenyAllModifyOperations", 1, 0);
-
- User
- Posts: 15
- Joined: Wed Apr 03, 2013 12:43 pm
Re: prevent PDFXVwer from editing pdf inside iframe.
hi
I used and it works o.k .
when I tried to use the same code example and put it in html 4.01 it doesn't work .
why doesn't it work with html 4.01 ? how can I make it work ?
thanks for your help
Tami
I used
Code: Select all
PDFView.SetDocumentProperty(docID, "ReadOnly", "true", 0); // disables editing for specified document
when I tried to use the same code example and put it in html 4.01 it doesn't work .
why doesn't it work with html 4.01 ? how can I make it work ?
thanks for your help
Tami
-
- User
- Posts: 15
- Joined: Wed Apr 03, 2013 12:43 pm
Re: prevent PDFXVwer from editing pdf inside iframe.
I found my problem .
Thanks for all your help.
your support is great !!!
Thanks for all your help.
your support is great !!!
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: prevent PDFXVwer from editing pdf inside iframe.
Excellent 
Pleased all is well.

Pleased all is well.
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
Best regards
Tracker Support
http://www.tracker-software.com
-
- User
- Posts: 15
- Joined: Wed Apr 03, 2013 12:43 pm
Re: prevent PDFXVwer from editing pdf inside iframe.
Hi
I am trying to use "ShowAllBars" "HideAllBars" but it trow an error , I think my syntax is wrong .
I tried :
both of them don't work .
please write me the right syntax.
Thanks
Tami
I am trying to use "ShowAllBars" "HideAllBars" but it trow an error , I think my syntax is wrong .
I tried :
Code: Select all
PDFView.DoVerb("", "ShowAllBars",0, 0, 0);
PDFView.DoVerb("", "ExecuteCommand", "ShowAllBars", 0, 0);
both of them don't work .
please write me the right syntax.
Thanks
Tami
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: prevent PDFXVwer from editing pdf inside iframe.
Hello Tami,
Please try something like the following: There's a "ShowAllBars" command in the Viewer AX manual but no ShowAllToolbars - maybe that's causing your problem.
Best,
Stefan
Please try something like the following:
Code: Select all
function btnToolbars_onclick() {
try {
document.all.PDFView.DoVerb("", "ExecuteCommand", "ToggleAllToolbars", 0, 0);
}
catch (err) { }
}
Best,
Stefan
-
- User
- Posts: 15
- Joined: Wed Apr 03, 2013 12:43 pm
Re: prevent PDFXVwer from editing pdf inside iframe.
Hi
the command 'ToggleAllToolbars' works o.k , but before I use it I must check is it on Hide/Show mode .
I tried
just like suggested in
Is there a nice way to check if ToggleAllToolbars is on Hide/Show mode before toggling it ?
Tanks
the command 'ToggleAllToolbars' works o.k , but before I use it I must check is it on Hide/Show mode .
I tried
Code: Select all
var num ;
PDFView1.DoVerb(NULL, "HasVisibleBars", num, 0, 0);
if(num == 0 ){...}
but it trow error that num is undefined.
Is there a nice way to check if ToggleAllToolbars is on Hide/Show mode before toggling it ?
Tanks
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: prevent PDFXVwer from editing pdf inside iframe.
Hi, Tami.
Please try to use it:
If this does not work (because in java script can be problem with getting output by normal out-arguments, a known restriction of java-script) then please try this altrenative:
further - you may also check the visibility of a document's toolbars (such as "PagesNavigation", "PagesLayout") using path:
HTH
Please try to use it:
Code: Select all
var stub = 0;
var num = 0;
PDFView1.DoVerb(NULL, "HasVisibleBars", stub, num, 0, 0);
Code: Select all
var count = document.all.PDFView.Property("View.Bars.Count", 0);
var hasVisibleToolbars = 0;
for (i = 0; i < count; i++)
{
var baseName = "View.Bars.Bars[" + i + "]";
var barName = document.all.PDFView.Property(baseName + ".Name", 0);
if (barName == "Menu" || barName == "Status" || barName == "Tab")
continue; // to skip non-toolbars
var vis = document.all.PDFView.Property(baseName+".Visible", 0);
if (vis != 0)
{
hasVisibleToolbars = 1;
break;
}
};
Code: Select all
var basePath = "Documents[#" + activeDocID + "].View.Bars";
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.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.