Set page orientation and convert Excel to PDF via command line

Do you want to use command line to set page orientation when you convert Excel to PDF? Why not try VeryPDF Document Converter (docPrint Pro)? You know, VeryPDF Document Converter (docPrint Pro) provides a command line version and a GUI version. I think the command line version can help you solve your problem.

As an all-to-all document converter, the command line application of VeryPDF Document Converter (docPrint Pro) is powerful. It supports batch conversion, all printable input file formats, and output setting. You can use it free for 50 times. If you want to try now, please click VeryPDF Document Converter to download this command line application. The following will explain how to use it to set page orientation and convert Excel to PDF.

Firstly, you should open the command prompt window. This article will introduce two ways to open the command prompt window. If you are a Vista or Windows 7 user, you should do as follows: click Start on the screen, type CMD or cmd in the edit box you will see on the Start menu, and press Enter. If you are in Windows XP, please do as follows: click Start, click Run, type CMD or cmd in the Run dialog box, and press Enter. When you see the command prompt on your screen, please proceed to the next step.

The second step is to type a command line and then press Enter. Before you type a command line in the command prompt window, you should take a look at the following usage, options and examples as below:

  • Usage : doc2pdf [options] <-i Document Files> [-o Output]
  • Option : -O <orientation>   : set page orientation
            -O 1           : PORTRAIT mode, default
            -O 2           : LANDSCAPE mode
  • Examples:
    • “C:\docPrint Pro v5.0\doc2pdf.exe” -O 2 -i D:\in.xls -o E:\out.pdf
    • “C:\docPrint Pro v5.0\doc2pdf.exe” -O 2 -i D:\*.xls -o E:\*.pdf

The first example can set page orientation for the PDF file as landscape; the second example can convert multiple Excel files to PDF files, and set all the pages as portrait. I you are careful, you may want to ask why the path of the executable file in every example is enclosed by quotation marks such as “C:\docPrint Pro v5.0\doc2pdf.exe”. This is because the words in the path are separated by spaces. Now, please type a command line in the command prompt window, and press Enter.

These are the two steps you need to take if you want to use VeryPDF Document Converter (docPrint Pro) to set page orientation and convert Excel to PDF via command line. Do you know any better methods to solve this problem? Please share it with me!

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!