Set page orientation and convert XLS to PDF via command line

If you want to set page orientation and convert XLS to PDF via command line, you are strongly recommended to use the command line version of VeryPDF Document Converter (docPrint Pro). VeryPDF Document Converter provides a GUI version as well as a command line version. Both can be used to quickly convert XLS to PDF and set page orientation. This article will only focus on the command line version, which requires only three steps to get the task done.

1. Download VeryPDF Document Converter

Please download VeryPDF Document Converter , double clicking the installation executable file and follow the instruction to install VeryPDF Document Converter on your computer. Then, you can find the executable file named doc2pdf.exe in the installation folder docPrint Pro v5.0. And this doc2pdf.exe file is the command application we are going to use in the third step.

2. Open the command prompt window

Different ways might be employed to open the command prompt window. For example, if you are a Windows XP user, you should click Start on the screen. >Click Run on the Start menu. > Type cmd in the Run dialog box. > Press Enter.

3. Use the command line application

To use the command line application, you need to type a command line in the command prompt window. According to the basic usage of doc2pdf.exe, and the option which can be used to set page orientation, you should type a command line as the following examples.

  • 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 1 -i C:\in.xls -o D:\out.pdf
      • "C:\docPrint Pro v5.0\doc2pdf.exe" -O 2 -i C:\in.xls -o D:\out.pdf
      • "C:\docPrint Pro v5.0\doc2pdf.exe" -O 2 -i C:\*.xls -o D:\*.pdf

To set page orientation as portrait, you should add the option -O 1, while to set page orientation as landscape, you need to use the option -O 2. The first two examples are used to convert single XLS to PDF, and the last example is used to do batch conversion. After typing a command line, please press Enter.

This is the method set page orientation when you convert XLS to PDF via command line. If you are interested in other versions of this product, please visit the following website: http://verypdf.com/artprint/index.html

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!