DOC to Any Converter

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.

DOC to Any Converter

Convert HTML to PDF and split long HTML by height

   When converting long HTML file to PDF, you may meet two kinds situations: one is that long HTML is totally kept in one PDF page, which will be hard to be printed; another situation is that the long HTML file is cut at random paragraph, some time image will be cut into two parts. In order to convert long HTML to PDF perfectly, we can split long HTML file to small parts by specifying height. In the following part, I will show you how to make it.

I use software VeryDOC DOC to Any Converter, which is a command line Window application. It can convert HTML to PDF and specify width and height. After conversion, if you need to set password to output PDF, this software also can make that for you.

Step 1. Download DOC to Any Converter

  • When downloading finishes, there will be a zip file. Please extract it to some folder then you can call the executable file in MS Dos Windows. And all the parameters and examples are listed in readme.txt.
  • If you need to know more functions of this software, please check them in software homepage.

Step 2. Convert long HTML to PDF and split it by height.

  • When run this software, please refer to the usage and examples.
  • Usage:    DOC2Any [options] <in-file> [<out-file>]
  • Here are some examples for your reference.
    doc2any.exe C:\in.htm C:\out.pdf
    By this command line, we can convert HTML to PDF singly.
    doc2any.exe –emfheight 200 C:\in.html C:\out.pdf
    By this command line, we can split long HTML at 200
  • doc2any.exe C:\in.mhtml C:\out.pdf
    It can help you convert MHTML file PDF too.
    doc2any.exe -ownerpwd 123 -keylen 2 -encryption 3900 C:\in.htm C:\out.pdf
    When conversion from HTML to PDF, we can set password to protect output PDF by owner password and open password.
    doc2any.exe -viewerzoom 1600 -viewpage 10 -viewpagemode 2 -view "C:\in.htm" C:\out.pdf
    After conversion, we can set zoom rate, view page and view page mode.

    for %F in (D:\test\*.htm) do "doc2any.exe" "%F" "%~dpnF.pdf"
    for /r D:\test %F in (*.htm) do "doc2any.exe" "%F" "%~dpnF.pdf
    When you need to do batch conversion, please refer to the above two for modes.
    doc2any.exe -wtext "VeryPDF" -wf "Arial" -walign 3 -wh 20 -wbox "0,770,612,792" "C:\in.doc" C:\out.pdf
    doc2any.exe -wtext "Watermark %PageNumber% of %PageCount%" "C:\in.doc" C:\out.pdf
    This software also allows you to convert HTML to PDF and add watermark in batch.

    Now let us check related parameters:
    -height <int>            : Set page height to PDF file
    -emfheight <int>         : Split a long HTML file by height
    -pageheight <int>        : Split a long HTML page by page height, same as -emfheight
    -pageh <int>             : same as -pageheight
    -ph <int>                : same as –pageheight
    -viewerzoom <string>     : Set viewer zoom ratio to Adobe Reader
    -openpwd <string>        : Set 'open password' to PDF file
    -ownerpwd <string>       : Set 'owner password' to PDF file
    -wtext <string>          : Watermark text on printed document
        -wtext does support following dynamic values:
        %PageCount%, %PageNumber%, %PageCountRoman%, %PageCountRoman2%,
        %PageNumberRoman%, %PageNumberRoman2%, %Author%, %Keywords%,
        %Subject%, %Title%, %Filename%, %Date%, %Time%
      -wtype <int>             : type of watermark
        0 : normal watermark
        1 : watermark on header
        2 : watermark on footer

By this software and those parameters, we can handle long HTML file when converting HTML to PDF. During using, if you have any question, please contact us as soon as possible.

DOC to Any Converter

How to check MS Word password and convert it to PDF?

   In the 2007 Microsoft Office system and later versions, you can use passwords to help prevent other people from opening or modifying your word documents, workbooks, and presentations. And if you forget these password, MS Office can not help you retrieve it. For those word documents which have password and have been lost, we can not do further processing.  When do batch conversion, word with password will effect the whole conversion. In the following part, I will show you how to check MS Word password and then convert word files to PDF.

  I use software VeryDOC DOC to Any Converter Command Line, which is command line Windows application and it can help you batch convert MS Office, OpenOffice files to PDF, Postscript,image, flash,  XML, JPG, TIFF, EMF, etc. formats. If you need to know more about it, please visit its homepage.

Step 1. Download DOC to Any Converter Command Line

  • When downloading finishes, there will be a zip file. Please extract it so some folder then you can check elements and call  it in MS Dos Windows.
  • When run conversion, please refer to usage and examples.

Step 2. Check Word password and convert word to PDF.

  • Usage:  DOC2Any [options] <in-file> [<out-file>]
  • When you need to check word password, please refer to the following command line template.
    doc2any.exe –checkpassword input.doc
  • doc2any.exe –checkpassword C:\*.doc
    Now let us check related parameter:
    -checkpwd                : Check if MS Word document contains an open password
    The following snapshot is from MS Dos real operation. This function also allows you to check password in batch by wild character. And when checking finishes, this software will help you convert doc file to PDF directly if those input doc files are not password protected.
    check password

  • And this function also can be applied when convert other MS Office file OpenOffice files to PDF and check password.
  • Or if you are afraid that the conversion may fail, maybe you can add this parameter:
    -noretry                 : Don't try to re-convert failed office documents
    If you add this parameter, when conversion fails, it will turn to next conversion. The conversion will not be delayed by failed files.
  • Meanwhile this software also can help you set password for Office files.
  • -password <string>       : Set open password for office documents
    doc2any.exe -useprinter -useoffice 1 -noretry -password 123456 D:\test.docx D:\out.pdf
    -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
    But when you use this function, you need to install MS Office Word application.

By this software and this method, we can check MS Word password and convert doc to PDF directly. And this method can be applied to all version MS files.  During the using, if you have any question, please contact us as soon as possible.

DOC to Any Converter

Run doc2any.exe from Windows Service and without MS Office installed

Dear Support!

I'm evaluating Office to Any Converter to our purpose and I have two questions:

- It works in batch mode correctly and I'm satisfied with the result. But if I try to use it in Hot Directories mode, no any file is produced in output directory and return code 4 appears in logs. What could be the problem? (You can find the log at the end of this message.)

- We need to convert office documents to PDF on a server computer without user intervention. Is there any way to run the software as a Windows service without logging on to the computer or execute the conversion in command prompt mode called by other application or scheduled batch script?

[2013-01-26 22:15:20] [System Message] Monitor Start
[2013-01-26 22:16:20] Waiting until file be created completely...
[2013-01-26 22:16:20] Wait finished, time=16ms (0.02s)...
[2013-01-26 22:16:20] "-rotate" "0" -parent 5440298 "C:\__Xls2Pdf\VeryPdf\Input\Book3.xlsx" "C:\__Xls2Pdf\VeryPdf\Output\Book3"
[2013-01-26 22:16:22] [OK] Converter return code = 4
[2013-01-26 22:16:50] Waiting until file be created completely...
[2013-01-26 22:16:50] Wait finished, time=16ms (0.02s)...
[2013-01-26 22:16:50] "-rotate" "0" -parent 5440298 "C:\__Xls2Pdf\VeryPdf\Input\offer wi7682.docx" "C:\__Xls2Pdf\VeryPdf\Output\offer wi7682"
[2013-01-26 22:16:51] [OK] Converter return code = 4
[2013-01-26 22:16:51] Waiting until file be created completely...
[2013-01-26 22:16:51] Wait finished, time=0ms (0.00s)...
[2013-01-26 22:16:51] "-rotate" "0" -parent 5440298 "C:\__Xls2Pdf\VeryPdf\Input\Screen.jpg" "C:\__Xls2Pdf\VeryPdf\Output\Screen"
[2013-01-26 22:16:52] [OK] Converter return code = 4
[2013-01-26 22:16:52] Waiting until file be created completely...
[2013-01-26 22:16:52] Wait finished, time=15ms (0.01s)...
[2013-01-26 22:16:53] "-rotate" "0" -parent 5440298 "C:\__Xls2Pdf\VeryPdf\Input\Specification extension for RU HCPO_Changes.doc" "C:\__Xls2Pdf\VeryPdf\Output\Specification extension for RU HCPO_Changes"
[2013-01-26 22:16:53] [OK] Converter return code = 4
[2013-01-26 22:39:09] [System Message] Monitor Start
[2013-01-26 22:39:39] Waiting until file be created completely...

Best regards,
Customer
---------------------------------------
Thanks for leaving a message for us.

According to your needs, I guess maybe you can have a free trial of this software:

VeryDOC DOC to Any Converter
https://www.verydoc.com/doc-to-any.html

During the using, if you have any question, please contact us as soon as possible.

VeryDOC
---------------------------------------
Hi,

Thank you for your answer.

I'm trying command line and SDK version (C#) of VeryDOC DOC to Any Converter to convert MS Office files to PDF, and I have some further questions:

- In the case of command line version if I try to use the -wtext option to embed custom footer as a watermark, the "Please purchase VeryDOC EMF To Vector Converter on https://www.verydoc.com/ to remove this watermark" message appears in the output PDF file, and the content coming from the input file is missing. (Without -wtext option,the PDF is generated with the appropriate content. Watermark and input file content appears correctly in the case of SDK version.) May I need EMF To Vector Converter to do this?

- Is it possible to use Cyrillic letters in watermarks? I tried it with SDK version from C# and only question marks appeared in the PDF in the place of Cyrillic letters of watermark. (Cyrillic letters coming from input file appeared correctly.)

- Is it possible to convert MS Office .doc, .docx, .xls, .xlsx files to PDF with this component without MS Office installed? (I guess, "-useoffice 0" option should work this way.)

- Is it possible to put more the one line of watermark into the PDF? If yes, how?

Best regards,
Customer
---------------------------------------
>>- In the case of command line version if I try to use the -wtext option to embed custom footer as a watermark, the "Please purchase VeryDOC EMF To
>>Vector Converter on
https://www.verydoc.com/ to remove this watermark"
>>message appears in the output PDF file, and the content coming from the
>>input file is missing. (Without -wtext option,the PDF is generated with the
>>appropriate content. Watermark and input file content appears correctly in
>>the case of SDK version.) May I need EMF To Vector Converter to do this?

This is a limitation in demo version, after you purchased the product, please send to us your Order ID, we will arrange our engineer to send the latest version to you asap, the latest version hasn't this problem.

>>- Is it possible to use Cyrillic letters in watermarks? I tried it with
>>SDK version from C# and only question marks appeared in the PDF in the
>>place of Cyrillic letters of watermark. (Cyrillic letters coming from
>>input file appeared correctly.)

The current version is not support Cyrillic letters in watermarks, however, if you need this function, we can develop it to you at additional cost, please feel free to let us know if you are interest in this solution.

>>- Is it possible to convert MS Office .doc, .docx, .xls, .xlsx files to
>>PDF with this component without MS Office installed? (I guess,
>>"-useoffice 0" option should work this way.)

Yes, you can install OpenOffice to instead of MS Office, our doc2any does support OpenOffice automatically.

>>- Is it possible to put more the one line of watermark into the PDF? If yes, how?

You can use -watermarkfile to add more watermarks, for example,

-watermarkfile <string> : a .ini file which contain information for multiple watermarks

doc2any.exe -watermarkfile "%CD%\watermark.ini" "%CD%\example.doc" "%CD%\_watermark.pdf"

please look at a sample watermark.ini file in doc2any download package.

VeryDOC
---------------------------------------
Dear Support Team,

We would like to convert doc, docx, xls, xlsx, rtf and txt files to PDF without MS Office installed. According to readme.txt of doc2any_cmd.zip (demo version downloaded from https://www.verydoc.com/doc-to-any.html ): "-useoffice 0: Don't use MS Office to convert DOC,DOCX,RTF,TXT,PPT,PPTX,XLS,XLSX formats", so if I understand correctly, doc2any.exe should be able to do this.

I did some tests on a computer without MS Office installed using the "-useoffice 0" option and without it and I found the followings:

- Doc file was converted successfully regardless "-useoffice 0" was specified or not. A warning message appeared in both cases: "Please install MS Office product in order to convert MS Office documents!!!"

- Conversion of docx file had to be aborted in both cases because 15 minutes was not enough for it on a very simple document. ("Please install MS Office product in order to convert MS Office documents!!!" appeared as well.)

- xls, xslx files: Conversion failed in all cases with "result=ERROR TickCount = 0ms(0.00s), Result = 0".

- Rtf file was converted successfully regardless "-useoffice 0" was specified or not.

- Txt file was converted successfully without "-useoffice 0" but it failed with "-useoffice 0".

(All of the files were converted successfully on a computer with MS Office installed without "-useoffice 0".)

- What can be the cause of the problems experienced?

- Will the commercial version be able to convert all these files to PDF without MS Office installed?

- What are the pros and cons of using the service mode? Could you send some details about it?

Best regards,
Customer
---------------------------------------
>>I did some tests on a computer without MS Office installed using the "-useoffice 0" option and without it and I found the followings:
>>- Doc file was converted successfully regardless "-useoffice 0" was specified or not. A warning message appeared in both cases: "Please install MS Office product in order to convert MS Office documents!!!"
>>- Rtf file was converted successfully regardless "-useoffice 0" was specified or not.

Yes, our doc2any.exe does support DOC and RTF document formats without MS Word installed.

>>- Txt file was converted successfully without "-useoffice 0" but it failed with "-useoffice 0".

Our doc2any.exe does support txt format too, we will research the problem why it is failed with "-useoffice 0" parameter.

>>- Conversion of docx file had to be aborted in both cases because 15 minutes was not enough for it on a very simple document. ("Please install MS Office product in order to convert MS Office documents!!!" appeared as well.)
>>- xls, xslx files: Conversion failed in all cases with "result=ERROR TickCount = 0ms(0.00s), Result = 0".

If you wish convert DOCX, XLS, XLSX, PPT, PPTX document formats to PDF files, you need install OpenOffice, once you installed OpenOffice application, our doc2any.exe will call OpenOffice to render these document formats to PDF files silently.

>>- What can be the cause of the problems experienced?
>>- Will the commercial version be able to convert all these files to PDF without MS Office installed?

You need install OpenOffice to your server, our doc2any.exe will call OpenOffice to render these document formats to PDF files at background.

>>- What are the pros and cons of using the service mode? Could you send some details about it?

Yes, you can call doc2any.exe from your service to do the batch conversion, that's no problem. But you need set your service work at interactive mode.

VeryDOC

Remark

>>Can DocToAny work without the need for user to install MS Office?

Yes, our DOC to Any Converter Command Line does convert office documents to PDF files without MS Office installed. DOC to Any Converter Command Line will work by following solutions:

1. If your system has MS Office 2007 + PDF&XPS addon installed, DocToAny will use PDF&XPS addon to save MS Office documents to PDF and XPS files,

2. If your system has MS Office installed but without PDF&XPS addon, DocToAny will use MS Office to print documents to PDF and XPS files,

3. If your system hasn't MS Office installed, but have OpenOffice installed, DocToAny will use OpenOffice to convert documents,

4. If your system hasn't both MS Office and OpenOffice installed, DocToAny will use ourselves’ DOC/RTF render to convert DOC and RTF formats to other formats, but doc2any will not support PPT and XLS formats at this time.

In general, you can do following conversions if your system hasn't MS Word and OpenOffice installed,

1. RTF to HTML without MS Word or OpenOffice,
2. RTF to DOC without MS Word or OpenOffice,
3. RTF to PDF without MS Word or OpenOffice,
4. DOC to HTML without MS Word or OpenOffice,
5. DOC to RTF without MS Word or OpenOffice,
6. DOC to PDF without MS Word or OpenOffice,

If you need convert DOCX, PPT, PPTX, XLS, XLSX document formats to PDF or XPS format, you need install MS Office or OpenOffice.

VeryPDF

---------------------------------------

We have installed a fresh Windows XP system just now, tested doc2any.exe with OpenOffice application, we can convert all office documents (DOC, DOCX, XLS, XLSX, PPT, PPTX, RTF) to PDF files without any problem,

DOC -> PDF, OK, with only OpenOffice installed
RTF -> PDF, OK, with only OpenOffice installed
XLS -> PDF, OK, with only OpenOffice installed
PPT -> PDF, OK, with only OpenOffice installed
XLSX-> PDF, OK, with only OpenOffice installed
PPTX-> PDF, OK, with only OpenOffice installed
DOCX-> PDF, OK, with only OpenOffice installed

We are using following command line,

doc2any.exe Z:\doc2any_cmd\example.rtf Z:\doc2any_cmd\example.rtf.pdf
doc2any.exe Z:\doc2any_cmd\example.doc Z:\doc2any_cmd\example.doc.pdf
doc2any.exe Z:\doc2any_cmd\example.docx Z:\doc2any_cmd\example.docx.pdf
doc2any.exe Z:\doc2any_cmd\example.xls Z:\doc2any_cmd\example.xls.pdf
doc2any.exe Z:\doc2any_cmd\example.xlsx Z:\doc2any_cmd\example.xlsx.pdf
doc2any.exe Z:\doc2any_cmd\example.ppt Z:\doc2any_cmd\example.ppt.pdf
doc2any.exe Z:\doc2any_cmd\example.pptx Z:\doc2any_cmd\example.pptx.pdf

We noticed the Java is not installed in your system,

Run doc2any.exe from Windows Service and without MS Office installed

you may download and install JRE from following web page,

http://java.com/en/download/manual.jsp

after you installed JRE, you can run doc2any.exe to convert office documents to PDF files with OpenOffice properly.

VeryPDF

DOC to Any Converter

Convert text to PDF and control column & layout

  Most often, when working with columns you will want to add multiple columns for text layout, similar to a newspaper. However, printing text file and designing columns is a little hard. But when converting text file to PDF, all those matter can be solved. In this article, I will show you how to convert text to PDF and control column & layout. The following snapshots are about PDF column layout effect, please have a check. When converting text to PDF, you can choose layout as I showed in the following snapshot.

effect of layout

Step 1. Download VeryDOC DOC to Any Converter

  • I use this software to run the conversion. By this software, you can convert most of the printable file to PDF, image and others. If you need to know more about it, please visit its homepage.
  • As this is command line version software when downloading finishes, there will be an zip file. Please extract it to some folder then you can check the elements in it and call executable file in MS Dos Windows.
  • When use this software, please refer to usage and examples.

Step 2. Convert text to PDF and specify layout

  • Usage:   DOC2Any [options] <in-file> [<out-file>]
  • When converting text to PDF by command line, please refer to the following command line templates.
    doc2any.exe C:\input.txt C:\output.pdf
    doc2any.exe C:\*.txt C:\*.pdf
    for %F in (D:\test\*.txt) do "doc2any.exe" "%F" "%~dpnF.pdf"
    By those command line, you can either convert text file single or in batch to PDF file. But for mode, you can write bat file for do the conversion automatically in batch.
  • When you need to convert text to PDF and control column and layout, please add the following parameters in the command line. This software provides 7 modes of layout for you to choose.
     
  • -pagelayout <int>        : Set page layout which is used when opening the document in PDF Readee
      -pagelayout 0: When you need to use viewer's default settings, please add this parameter.
      -pagelayout 1: when you need to convert text to single page, please add this parameter.
      -pagelayout 2: When you need One Column PDF, please use value 2.
      -pagelayout 3: When you need Two Column Left layout, please add value 3.
      -pagelayout 4: When you need  Two Column Right, please add value 4.
      -pagelayout 5: When you need Two Page Left, please add value 5.
      -pagelayout 6: When you need Two Page Right, please use value 6.

Now let us check the conversion effect from the following snapshot. And this PDF file is converted from readme.txt file, you can compare them. 

output PDF file

By this software, you can convert text, MS Dos Windows and other files to PDF and control page layout. During the using, if you have any question, please contact us as soon as possible.