Convert OpenOffice to PDF and set PDF password by command line

In this article, you will see how to convert the document of OpenOffice to PDF document and set PDF password with the help of the command line application doc2pdf.exe at first, then you will see the introduction to it in the end. doc2pdf.exe is recommended for its powerful function of converting any printable documents to image formats.

  • Open MS-DOS interface

The command line application doc2pdf.exe is a MS-DOS oriented application and you need to open MS-DOS interface to call the application. Please click “Start”—“Run” to open “Run” dialog box in which you need to input “cmd” in “Open” combo box and click “OK” button. The other way for opening “Run” dialog box is using the hot key “Window”+ “R”.

  • Input command line in MS-DOS interface

You should input the command line into MS-DOS interface for converting the document of OpenOffice to PDF file. The command line is consisted of four necessary sections:called program, parameter for setting PDF password, source file and target file. For finishing the conversion smoothly, please refer to the template command line below.

doc2pdf -s openpwd=123 -s ownerpwd=456 -i C:\test.doc -o C:\out.pdf

doc2pdf stands for the called program.

-s openpwd=123 is for set the open password for PDF document.

-s ownerpwd=456 is for set the owner password for PDF document.

-i C:\test.doc stands for the source file.

-o C:\out.pdf stands for the target file.

The specific command line is as below one:

"C:\Program Files\docPrint Pro v5.0\doc2pd.exe" -s openpwd=123 -s ownerpwd=456 -i C:\test.doc -o C:\out.pdf

"C:\Program Files\docPrint Pro v5.0\doc2pd.exe" stands for the path of doc2pdf.exe.

-s openpwd=123 means you have set the open password of the PDF document as “123”.

-s ownerpwd=456 means you have set the owner password of the PDF document as “456”.\

-i C:\test.doc is the path of source file.

-o C:\out.pdf is the path of target file.

(Note: You can also set the open password or owner password only in the command line)

  • Run the conversion

Then please click “Enter” button to run the conversion from the document of OpenOffice to PDF.

The application doc2pdf.exe is one application of Document Converter which is a professional document converter. It supports three internal applications—GUI application, command line application and virtual printer application. The GUI application can be used to make batch conversion for its friendly user interface and the virtual printer application can be used to save paper and ink by scaling page size and combining the pages on one single sheet.

The free trial version download website of doc2pdf.exe is https://www.verypdf.com/artprint/docprint_pro_setup.exe. If you are interested in this application, please download it and experience it.

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!