Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

GhostScript Encryption parameters

2012-05-08
2013-03-21
  • Howard Webb
    Howard Webb
    2012-05-08

    Hi,

    I am struggling to find documentation on the parameters to pass ghostscript to enable encryption/permissions. For example if I send:

    "-dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOwnerPassword=password1 -sUserPassword=password2 -dKeyLength=128 -dEncryptionR=3 -dPermissions=-3904 -sOutputFile=C:\\temp\\output.pdf 1.pdf"

    I get a fully restricted PDF with a password. However what if I wanted to restrict just editing and allow printing etc. Can you point me to a resource that explains how to turn on or off these permissions - what value to pass as dPermissions?

    Thanks
    -Howard webb