PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 23 → protect a PDF (viewing) ?
protect a PDF (viewing) ?
Débuté par Markus R., 30 mai 2018 11:29 - 4 réponses
Posté le 30 mai 2018 - 11:29
Is there any way to protect a pdf document for viewing: to open or view the pdf, the user must enter a password.

any suggestion welcome.

BR
MArkus
Membre enregistré
21 messages
Posté le 05 juin 2018 - 15:42
Hi Markus,

See iParameterPDF.

For example:
iParameterPDF(iProtectionComment+iProtectionModification+iProtectionSelection,"MyPassword",iMaximumQuality)

or
iParameterPDF(iProtectionNone,"MyPassword",iMaximumQuality)


I think you need to use it before iDestination, but also set this code before iPrintReport of cource.
Posté le 05 juin 2018 - 21:23
I know this. But there is no way to protect the pdf for viewing. I need to ask a password, each time when the pdf will be open.
Membre enregistré
21 messages
Posté le 06 juin 2018 - 08:35
If you enter the password (in my example at first post "MyPassword" it should ask for a password when opening. I just tried it again with this code:

iParameterPDF(iProtectionComment+iProtectionModification+iProtectionSelection,"123",iMaximumQuality)





Message modifié, 06 juin 2018 - 08:35
Posté le 08 juin 2018 - 12:23
You are absolut right, was my mistake. Thanks again!