Hi,
Have you any idea how to set document as no printable ?
An other question is how to intercept the chnage active document event. I want to get a notification when I change the current active document in the view.
Thanks for help.
printable Document
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: printable Document
On changing active document you will receive "Documents.Active" propery changed event.
So in _IPDFXCviewEvents::OnEvent if Type = PXCVA_OnPropertyChanged and Name = "Documents.Active" that indicates that active document was changed. For more information, pleese see Help or provided samples.
To restrict printing document from Viewer UI you can turn off "Print" (57607) command.
So in _IPDFXCviewEvents::OnEvent if Type = PXCVA_OnPropertyChanged and Name = "Documents.Active" that indicates that active document was changed. For more information, pleese see Help or provided samples.
To restrict printing document from Viewer UI you can turn off "Print" (57607) command.
Code: Select all
PDFView.SetProperty("Commands[#57607].state", "Offline", 0);
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: printable Document
I work on MDI Mode, I have different documents opned with different permissions. I want to make one document no printable like Readonly for no change. Like this :
How can I intercept this the change active document in th JavaScript ?
Thanks.
Code: Select all
PDFView.SetProperty("Documents[#"+DocID+"].Printable", 0, 0)
How can I intercept this the change active document in th JavaScript ?
Thanks.
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: printable Document
I look for this preperty :

I want to deny it for one or more document that I choose.
Thanks.

I want to deny it for one or more document that I choose.
Thanks.
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: printable Document
In JavaScript for web pages you can use the following code to receive document changed event
Code: Select all
<script>
..........
function PDFXCviewEvent(Type, Name, DataIn, DataOut, Flags)
{
if ((Type == 1) && (Name == "Documents.Active"))
alert("Changed active document");
}
..........
</script>
.................
<object id="PDFView" classid="CLSID:FE36F0F3-F082-41B7-9EED-772505A7C054" width="100%" height="90%">
</object>
<script language=javascript for="PDFView" event="OnEvent(Type, Name, DataIn, DataOut, Flags)">
PDFXCviewEvent(Type, Name, DataIn, DataOut, Flags);
</script>
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: printable Document
Sorry, I don't think that PDF-XChange ActiveX will ever support such property. But you can easily disable or enable "Print" command when you receive "Documents.Active" event.PDFView.SetProperty("Documents[#"+DocID+"].Printable", 0, 0)
-
- User
- Posts: 108
- Joined: Wed May 13, 2009 2:21 pm
Re: printable Document
yes, it's what I do.
Thanks for help
Thanks for help
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: printable Document

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