How to convert Web URL to PDF and set watermark through command line?

   In this article, VeryDOC will show you how to convert URL to PDF through command line and set watermark on output PDF file. The software I use here is VeryDOC DOC to Any Converter, by which we can also convert local website, HTML, MHTML to PDF. If you need to run the conversion through Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc. there is also corresponding version available for you. For more information about DOC to Any Converter, please visit its homepage. In the following part, I will show detail steps about converting URL to PDF and set watermark.

Step 1. Download DOC to Any Converter

  • Please note this is Window application, it can not work under Mac or Linux system. But it supports most of Window system both of 32-bit and 64-bit.
  • When downloading finishes, there will be a zip file. Please extract it to some folder then we can find the executable file in MS Dos Windows.

Step 2. Convert URL to PDF and set watermark

  • When you run the conversion, please refer to the usage of this software and follow examples.
  • Usage:    DOC2Any [options] <in-file> [<out-file>]
  • When you need to convert URL to PDF and set watermark, please refer to the following command line templates.
  •    doc2any.exe -wtext "VeryDOC" https://www.verydoc.com C:\out.pdf
       doc2any.exe -wtext "VeryDOC" -wc "0000FF" "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "DOC to Any Converter" -wx 100 -wy 100 "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "DOC to Any Converter" -wtype 1 "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "DOC to Any Converter" -wtype 2 "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "DOC to Any Converter" -wtype 0 -wa 45 "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "DOC to Any Converter" -wf "Arial" "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "DOC to Any Converter" -wf "Arial" -wh 20 "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "VeryDOC" -wf "Arial" -wh 20 -wb -wi -wu -ws "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "VeryDOC" -wf "Arial" -walign 3 -wh 20 -wbox "0,770,612,792" "https://www.verydoc.com/oc" C:\out.pdf
    By above command line, we can convert online URL to PDF and add various watermark. When you need to add page number for the output PDF file as watermark.
       doc2any.exe -wtext "Watermark %PageNumber% of %PageCount%" "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "Watermark %PageNumber% of %PageCount%" -wpagebegin 10 -wpageend 20 -wpageoffset 100 "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "Watermark %PageNumberRoman% of %PageCountRoman%" "https://www.verydoc.com/" C:\out.pdf
       doc2any.exe -wtext "Watermark %PageNumberRoman2% of %PageCountRoman2%" "https://www.verydoc.com/" C:\out.pdf

Now let us check related parameters about adding watermark.
-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
  -wf <string>             : font name of watermark
  -wh <int>                : font size of watermark
  -wb                      : specify bold font
  -wi                      : specify an italic font
  -wu                      : specify an underlined font
  -ws                      : specify a strikeout font
  -wa <int>                : angle of watermark
  -wbox <string>           : a rectangle to output formatted text, it is only useful for "-walign"

Please check more parameters in readme.txt file as I can not list all of them here. Now let us check the conversion effect from the following snapshot. During the using, if you have any question, please contact us as soon as possible.

output PDF from doc2any website
                  This is from Doc to Any Website.

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!