Convert PPT to PDF and add page number as watermark by command line

   For some reasons, sometimes we need to convert PPT to PDF and add page number. There are many ways to figure out the conversion in the market, but may seldom ones catering to your needs.  Here I will share one method of convert PPT or PPTX to PDF and add page number by command line, which also allows you to do the conversion together with ASP/PHP/C#/.NET/... etc. server side applications.

  I use software VeryDOC DOC to Any Converter, which can help you convert DOC, DOCX, DOCM, RTF, TXT, PPT, PPTX, XLS, XLSX, OpenOffice ODT, HTML, MHTML files to PDF and add page number as watermark. In the following part, I will take converting PPT to PDF and adding page number for example to show you how to use this software.

Step 1. Download DOC to Any Converter

  • All the VeryDOC software are free downloading and trying, so you can rest assured to download it and use it free for hundreds of times.
  • When downloading finishes, there will be a zip file. Please extract it to some folder then we can call the executable file in MS Dos Windows.

Step 2. Convert PPT to PDF and add page number

  • When you run the conversion, please refer to usage and examples.
  • Usage:         DOC2Any [options] <in-file> [<out-file>]
  • When converting PPT to PDF and add page number, please refer to the following command line templates.
  • doc2any.exe -wtext "Watermark %PageNumber% of %PageCount%" -wpagebegin 10 -wpageend 20 -wpageoffset 100 "C:\in.ppt" C:\out.pdf
    By this command line, we can convert PPT to PDF and add page number. Meanwhile, you can control the conversion page range. In the above command line, we set the start page at 10 and the end page is 20.
    doc2any.exe -wtext "Watermark %PageNumberRoman% of %PageCountRoman%" "C:\in.ppt" C:\out.pdf
    By this command line, you still can not convert PPT to PDF but the dynamic page number using fonts of Roman characters.
    doc2any.exe -wtext "Watermark %PageNumberRoman2% of %PageCountRoman2%" "C:\in.pptx" C:\out.pdf
    This command line shows converting PPTX to PDF and add another type of Roman characters as page number.
    Now let us check related parameters:
    -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
    -wpagebegin <int>        : first page to add the watermark
    -wpageend <int>          : last page to add the watermark
    -wpageoffset <int>       : a value to be added to page number

    Now let us check the conversion effect from the following snapshots.

input PPT
                                   Input PPT file.

output PDF from PPT
                    Output PDF file.

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!