Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8400667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:37:01+00:00 2026-06-09T21:37:01+00:00

Does anyone know of a FREE command line tool that can lock a pdf

  • 0

Does anyone know of a “FREE” command line tool that can lock a pdf from a user being able to print it. I need to be able to put this in a batch to loop through a folder and disable printing from adobe standard and reader. Is this possible to do it from command line with any tool?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:37:03+00:00Added an answer on June 9, 2026 at 9:37 pm

    First, pdftk:

    You can use pdftk for (available for Linux, Unix, Mac OS X and Windows) to set an "owner password":

    pdftk \
      input.pdf \
      output semi-protected.pdf \
      owner_pw "supersecret" 
    

    Result is this, for example:

    pdfinfo semi-protected.pdf | grep Encrypted:
    
      Encrypted:      yes (print:no copy:no change:no addNotes:no)
    

    You can modify the command to additionally require a user password to open the PDF:

    pdftk \
      input.pdf \
      output semi-semi-protected.pdf \
      owner_pw "supers3cr3t" \
      user_pw "s3cr3t"
    

    You can modify the command to (selectively) "allow" other user actions:

    pdftk \
      input.pdf \
      output semi-semi-protected.pdf \
      owner_pw "supers3cr3t" \
      allow ModifyContents \
      allow CopyContents \
      allow ScreenReaders \
      allow ModifyAnnotations
    

    Result may be this, for example:

    pdfinfo semi-semi-protected.pdf | grep Encrypted:
    
      Encrypted:      yes (print:no copy:yes change:yes addNotes:yes)
    

    Second, podofoencrypt:

    Commandline example:

    podofoencrypt \
       --rc4v2 \
       -o "supers3cr3t" \
       -u "s3cr3t" \
       --edit \
       --copy \
       --editnotes \
       --fillandsign \
       --accessible \
       --assemble \
         input.pdf \
         semi-protected.pdf 
    

    Big, fat caveat:

    You should be aware, that this way of ‘protecting’ PDF files is by no means super-secure. There are quite a lot of PDF cracker software utilities out there which easily un-protect your PDF files. This method is only a very basic means to prevent most noobie computer users to mess with your files.


    In addition, see also

    Third, qpdf:

    in Martin Schröder’s answer!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of a free online tool that can crawl any given website
Does anyone know of a free tool that I can use to get website
Does anyone know of a good (read: Free) Eclipse UML plugin that can also
Does anyone know of a free Perl program (command line preferable), module, or anyway
Does anyone know of any free tools that can assist in converting an SQL2005
Does anyone know of a free decompiler that can decompile an entire Jar file
Does anyone know of a free tool, similar to what is built into Visual
Does anyone know of any (free) tools that will convert an old Delhi 5
Does anyone know of an open source/free tool for converting pl/sql code to a
Does anyone know of any websites, or (preferably) downloadable packages that you can use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.