Hi there,
how do I lock commands / toolbar / panes?
E.g. I don't allow the users of my application to annotate any PDFs.
Therefore I have to lock the "Comment and markup Toolbar".
Is this possible??
Best regards
cew
Lock command / toolbar / pane
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Lock command / toolbar / pane
Hi,
HTH.
You may set "View.Locked" property to true (using SetProperty function), or use LockedView property of Viewer Ax component.cew wrote: how do I lock commands / toolbar / panes?
For this you may use "General.DenyAllModifyOperations" property.cew wrote: I don't allow the users of my application to annotate any PDFs.
HTH.
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: Lock command / toolbar / pane
This seems to restrict the user to a predefined set of commands and
your 2nd approach means setting the document to readonly, right?
Is it possible to just deny the use of some single commands like "open" and allow the user toolbar customization anyway?
your 2nd approach means setting the document to readonly, right?
Is it possible to just deny the use of some single commands like "open" and allow the user toolbar customization anyway?
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Lock command / toolbar / pane
Hi,
Please see our SDK example named "Commands"...
HTH.
Please see our SDK example named "Commands"...
HTH.
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.
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: Lock command / toolbar / pane
Thanks for you help!
Now I know how to disable commands.
Is it possible to hide or dynamic add/remove commands from toolbars?
Best
cew
Now I know how to disable commands.
Is it possible to hide or dynamic add/remove commands from toolbars?
Best
cew
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Lock command / toolbar / pane
Hi, cew.
Now you may disable command by (example):
You will be able to add/remove/hide commands in the next version V3.
HTH
Now you may disable command by (example):
Code: Select all
ctrl.SetProperty("Commands["Open"].State", "Offline", 0); // to disable "Open..." command in all toolbars and menu
HTH
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.
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: Lock command / toolbar / pane
Are the commands "grouped", so I can disable all comment/annotation-commands with one call or do i have to find out which command allows modifying a document on my own?
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Lock command / toolbar / pane
You may make the document read-only for end-user:
All commands are ungrouped. Look to our SDK help, [Reference/Named Items/Objects/Commands/Commands List] section (first column in table):
AreaTool,
ArrowTool
CalloutTool
CloudTool
CrossOutTextTool
DistanceTool
EraserTool
FileAttachmentTool
LineTool
OvalTool
PencilTool
PerimeterTool
PolygonTool
PolyLineTool
QuadLinkTool
RectangleTool
RectLinkTool
StampTool
StickyNoteTool
TextBoxTool
TypewriterTool
UnderlineTextTool
HighlightTextTool
---------------------------
AddBookmark
AddFileAttachment
AddLink
AddNote
AddNoteToSelText
AddReply
ApplyDefaultProperties
ApplyDefaultTextFormatting
HighlightSelText
CrossOutSelText
DeleteReply
FlattenAnnots
FlipLine
ImportComments
MeasureDeleteLabel
MeasureEditLabel
MeasureRestoreCaptionPos
OpenAllPopups
OpenPopup
ToggleAnnotLockState
UnderlineSelText
---
There are main commands for commenting/editing...
HTH
Code: Select all
ctrl.SetDocumentProperty(docId, "ReadOnly", "true", 0);
AreaTool,
ArrowTool
CalloutTool
CloudTool
CrossOutTextTool
DistanceTool
EraserTool
FileAttachmentTool
LineTool
OvalTool
PencilTool
PerimeterTool
PolygonTool
PolyLineTool
QuadLinkTool
RectangleTool
RectLinkTool
StampTool
StickyNoteTool
TextBoxTool
TypewriterTool
UnderlineTextTool
HighlightTextTool
---------------------------
AddBookmark
AddFileAttachment
AddLink
AddNote
AddNoteToSelText
AddReply
ApplyDefaultProperties
ApplyDefaultTextFormatting
HighlightSelText
CrossOutSelText
DeleteReply
FlattenAnnots
FlipLine
ImportComments
MeasureDeleteLabel
MeasureEditLabel
MeasureRestoreCaptionPos
OpenAllPopups
OpenPopup
ToggleAnnotLockState
UnderlineSelText
---
There are main commands for commenting/editing...
HTH
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.
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: Lock command / toolbar / pane
Thanks a lot!
Great support!
Best regards
cew
Great support!


Best regards
cew
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: Lock command / toolbar / pane
Kudos to Vasyl 
And support is one of the things we do stress on most
Cheers,
Stefan

And support is one of the things we do stress on most

Cheers,
Stefan