Hello,
is there any way via scripting to allow users to print a pdf file just one time, and the disable printing?
Thank you
Hello,
is there any way via scripting to allow users to print a pdf file just one time, and the disable printing?
Thank you
It’s possible though HEScript and security profiles: you create a Boolean function that reads a global variable and checks the number of prints. We’ll try to make a sample.
Could you please post in the meantime the name of the global variable to check for the number of prints? I cannot find it in the documentation.
Thank you.
There is no such a global variable. You have to create and manage it yourself thanks to the events available in UserMain:
procedure OnPrintPage;
var
S: String;
i: integer;
begin
// When a user wants to print the current page.
// Store the number of print.
i := strtointdef(GetGlobalVar("myprintcount", "0"),0);
i := i +1;
SetGlobalVar("myprintcount", inttostr(i), True);
if i > 1 Then
SetGlobalVar("printallowed", "0", True);
end;
Then you have a global variable printallowed that you can use to create a security profile that would allow print (or not).