Convert word to PDF and delete empty pages by command line

When converting word to PDF in batch, there will be some empty pages which will cause a kind of waste no matter in saving or printing. In order to avoid wasting, VeryDOC Doc to Any Converter can delete empty pages during conversion. And this function can be applied to convert all the Office file, OpenOffice files to PDF. In the following part, I will show you how to use this function.

Step 1. Download Doc to Any Converter

  • This is command line Windows application, when downloading finishes, there will be a zip file in downloading folder. Please extract it to some folder then you can check the elements and call the executable file in MS Dos Windows.
  • When you run the conversion, please refer to the usage and examples in readme.txt file.

Step 2. Convert Word to PDF and Delete Pages Automatically

  • Here is the usage for your reference. Usage:   DOC2Any [options] <in-file> [<out-file>]
  • When convert word to PDF and delete pages, please refer to the following command line templates.

    doc2any.exe C:\in.doc -useprinter -useoffice 1 –showofficeui -noempty   C:\out.pdf
    By this command line, we can convert doc to PDF using virtual printer and MS Office and delete empty pages in output PDF file. And during the conversion, the MS Office Windows will show. When you use this command line, you need to install MS Office Word application.
    doc2any.exe C:\in.docx -killoffice 1 –useprinter -noempty   C:\out.pdf
    When converting word docx file to PDF and delete empty pages, it is quite necessary to install MS Office 2010 or later version. However, when convert doc to PDF, MS Word application does not need to be installed. Meanwhile, you can use the free Open Office to replace MS Office during the conversion.
    Now  let us check related parameters:
    -useoffice <int>         : Use MS Office to render DOC,DOCX,RTF,TXT,PPT,PPTX,PPTS,PPTSX,XLS,XLSX formats
      -useoffice 0: Don't use MS Office to convert DOC,DOCX,RTF,TXT,PPT,PPTX,XLS,XLSX formats
      -useoffice 1: Use MS Office to convert DOC,DOCX,RTF,TXT,PPT,PPTX,XLS,XLSX formats
    -useprinter              : Convert DOC files to other formats via virtual printer
    -showofficeui            : Show Office Windows during conversion
    -noempty                 : Delete empty pages from PDF file

  • And this software also can help you add watermark to PDF, set password to protect output PDF file. Here are some examples for your reference.

    doc2any.exe -wtext "Watermark %PageNumber% of %PageCount%" -walign 2 -wtype 2 "C:\in.doc" C:\out.pdf
    doc2any.exe -wtext "%Filename% %Date% %Time% %PageNumber% of %PageCount%" "C:\in.doc" C:\out.pdf
    doc2any.exe -ownerpwd 123 -keylen 2 -encryption 3900 C:\in.doc C:\out.pdf

If you need to know more parameters and examples, please check them in readme.txt and website. And those functions are extremely good when you need to convert doc to PDF for printing and then disturbing. For one thing, you can add your company logo to output PDF. And for anther thing, there is no waste when printing as empty pages will be deleted automatically. During the using, if you have any question, please contact us as soon as possible.

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!