Convert documents of ODT to PDF and encrypt PDF by command line

If you create a new PDF document, you may not want it to be copied, printed, modified or others and so on. So you may want to encrypt PDF document from different aspects. When you want to convert the document of ODT to PDF document, you can encrypt PDF document at the same time by using the command line application doc2pdf.exe.

The application doc2pdf.exe is a kind of command line application and it can convert any printable documents to image formats. You just need to download the free trial version of it at https://www.verypdf.com/artprint/docprint_pro_setup.exe and install on your computer for using it.

The application doc2pdf.exe is the internal application of Document Converter which is a powerful document converter. It also has two other applications—GUI application which can be used in the batch conversion and virtual printer application which can be used to save paper and ink.

You need to use three steps to convert ODT to PDF and encrypt PDF. Please see the following contents.

1. Open MS-DOS prompt window.

You should click “Start”—“Run” to open “Run” dialog box in which you are able to input “cmd” or “CMD” in “Open” combo box. Then please click “OK” button. You can also use the hot key “Window”+ “R” to open “Run” dialog box.

2. Input command line

You should follow the command line below to write your own one.

doc2pdf -s permission=XXX –i C:\in-file.odt –o C:\out-file.pdf

  • doc2pdf indicates called program.
  • -s permission=XXX encrypts PDF document.
  • –i C:\in-file.odt stands for the input file.
  • –o C:\out-file.pdf stands for the output file.

You need to use the path of each file in the command line. The command line will be like the following one.

"C:\Program Files\docPrint Pro v5.0\doc2pdf.exe" -s permission=0 –i C:\in-file.odt –o C:\out-file.pdf

In which,

  • "C:\Program Files\docPrint Pro v5.0\doc2pdf.exe" is the path of doc2pdf.exe.
  • -s permission=0 is for encrypting PDF document, which means encrypting the file only.
  • –i C:\in-file.odt is the path of source file.
  • –o C:\out-file.pdf is the path of target file.

3. Run the conversion.

Then you need to click “Enter” button on the keyboard to run the conversion from the document of ODT to PDF.

For encrypting PDF document, you can also use the following commands:

-s permission=3900 : Deny anything
-s permission=4    : Deny printing
-s permission=8    : Deny modification of contents
-s permission=16   : Deny copying of contents
-s permission=32   : No commenting

-s permission=256  : Deny FillInFormFields
-s permission=512  : Deny ExtractObj
-s permission=1024 : Deny Assemble
-s permission=2048 : Disable high res. printing
-s permission=4096 : Do not encrypt metadata

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!