Questions about the HTML to PDF Converter product, feature request for HTML to Word, HTML to RTF, HTML to Excel and HTML to PDF functions

1. To convert HTML to PDF, does the API require a directly accessible, static page or, can generated content be sent for conversion?

I have a password protected site that I want to allow users to convert the html output, which is generated programmatically, to PDF, Word, or Excel formats.
Is this possible?

2. Is there an API for converting arbitrary HTML content to a Word or Excel document?

In reviewing the available interfaces it appears that a two stage conversion would be required HTML > PDF > Word|Excel. Is there a direct conversion API available?

3. Does HTML conversion also apply CSS styles as referenced in the page headers?

4. If a direct conversion from HTML to Word|Excel does not exist, can one be created?

Let me know if you need any further clarification of these questions.

Thank you.
Customer

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

>>1. To convert HTML to PDF, does the API require a directly accessible, static page or, can generated content be sent for conversion?

Our HTML to PDF Converter is not require a static web page, it can convert dynamic web page such as PHP, ASP, C#, etc. web pages to PDF files properly.

>>I have a password protected site that I want to allow users to convert the html output, which is generated programmatically, to PDF, Word, or Excel formats. Is this possible?

At the moment, you should convert your password protected site to directly accessible static web pages, then you can call our HTML to PDF Converter to convert these web pages to PDF files, after conversion is done, you can delete these web pages from your server, this can be done easily.

btw, if you are using "HTML to Any Converter Command Line", you can use following options to access the web pages in a password protected site,

-username <username> : HTTP Authentication username.
-password <password> : HTTP authentication password.

e.g.,

html2any -username test -password 123 https://www.verypdf.com/ out.pdf

>>2. Is there an API for converting arbitrary HTML content to a Word or Excel document?
>>In reviewing the available interfaces it appears that a two stage conversion would be required HTML > PDF > Word|Excel. Is there a direct conversion API available?

You can use "HTML to Any Converter Command Line" to convert from HTML file to Word and Excel documents,

https://www.verypdf.com/app/html-to-any/try-and-buy.html#buy-win

"HTML to Any Converter Command Line" can convert HTML files to Word and Excel documents directly.

>>3. Does HTML conversion also apply CSS styles as referenced in the page headers?

"HTML to Any Converter Command Line" does support text header and footer, it is not support page headers with CSS styles.

Please look at following web pages for more information,

http://www.verydoc.com/blog/how-to-print-html-and-set-html-headerfooter-with-command-line.html

http://www.verydoc.com/blog/can-i-add-page-number-to-pdf-footer-using-html2any-command-line.html

>>4. If a direct conversion from HTML to Word|Excel does not exist, can one be created?

"HTML to Any Converter Command Line" can convert from HTML files to Word and Excel documents directly.

Please look at user manual of "HTML to Any Converter Command Line" at below,

=======================================================

VeryPDF HTML To Any Converter v 2.0

Copyright (C) 2005-2012 VeryPDF.com, Inc.

Web: https://www.verypdf.com/app/htmltoany/

Email: support@verypdf.com

 

VeryPDF HTML to Any Converter is designed to convert HTML files (or webpages)

to PDF; HTML to image formats including JPEG, TIFF, PNG, TGA, PS, EPS, PCX,

BMP, GIF, etc.; HTML to Office document formats including TXT, DOC, RTF, XLS,

CSV, etc.

 

Usage: htmltoany [options] <input file> <output file>

=======================================================

 

  -$ <regcode>                 : Register with a registration code.

 

For PDF only:

  -key40bit                    : Set output PDF encryption strength as 40

                                 bits.

  -key128bit                   : Set output PDF encryption strength as 128

                                 bits.

  -permit <permissions>        : Permissions are applied to the output PDF

                                 only if encryption strength is specified

                                 or an owner or user password is given.

    printing                   : Allow top quality printing.

    lowprinting                : Allow lower quality printing.

    modifycontents             : Allow modifying contents.

    assembly                   : Allow document assembly.

    copying                    : Allow copying.

    screenreader               : Allow screen reader.

    modifyannot                : Allow adding annotation.

    filling                    : Allow filling interactive PDF form.

    allowall                   : Allow all the above permissions and top

                                 quality printing.

  -ownerpassword <pas>         : Set owner password to output PDF file.

  -userpassword <pas>          : Set user password to output PDF file.

  -book                        : Set the options one would usually set when

                                 printing a book.

  -collate                     : Collate when printing multiple copies.

  -cookie <name> <value>       : Set an additional cookie (repeatable).

  -cookie-jar <path>           : Read and write cookies from and to the

                                 supplied cookie jar file.

  -copies <number>             : Number of copies to print into the PDF

                                 file (default 1).

  -cover <url>                 : Use HTML document as cover. It will be

                                 inserted before the toc with no headers

                                 and no footers.

  -custom-header <name> <value>: Set an additional HTTP header (repeatable).

  -debug-javascript            : Show javascript debugging output.

  -default-header              : Add a default header, with the name of the

                                 page to the left, and the page number to

                                 the right, this is short for:

                                   -header-left='[webpage]'

                                   -header-right='[page]/[toPage]' --top 2cm

                                   -header-line

  -disable-external-links      : Remove external links.

  -disable-internal-links      : Remove internal links.

  -disable-javascript          : Do not allow web pages to run JavaScript.

  -disable-pdf-compression     : Do not use lossless compression on PDF

                                 objects.

  -disable-smart-shrinking     : Disable the intelligent shrinking strategy

                                 used by WebKit that makes the pixel/DPI

                                 ratio none constant.

  -allow <path>                : Allow the file or files from the specified

                                 folder to be loaded (repeatable).

  -disallow-local-file-access  : Do not allow a local file to read other

                                 local files during the conversion, unless

                                 the action is allowed by -allow.

  -dpi <DPI>                   : Change the DPI explicitly (this has no

                                 effect on X11 based systems).

  -enable-plugins              : Enable installed plugins (such as flash).

  -encoding <encoding>         : Set the default text encoding, for input.

  -forms                       : Turn HTML form fields into PDF form fields.

  -grayscale                   : PDF will be generated in grayscale.

  -ignore-load-errors          : Ignore pages that claim to have

                                 encountered an error during loading.

  -lowquality                  : Generate lower quality PDF/PS. Useful to

                                 shrink the result document space.

  -margin-bottom <unitreal>    : Set the page bottom margin (default 10mm).

  -margin-left <unitreal>      : Set the page left margin (default 10mm).

  -margin-right <unitreal>     : Set the page right margin (default 10mm).

  -margin-top <unitreal>       : Set the page top margin (default 10mm).

  -minimum-font-size <int>     : Minimum font size (default 5).

  -no-background               : Do not print background.

  -orientation <orientation>   : Set orientation to Landscape or Portrait.

  -page-height <unitreal>      : Page height (default unit millimeter).

  -page-width <unitreal>       : Page width  (default unit millimeter).

  -page-size <size>            : Set paper size to: A4, Letter, etc.

  -password <password>         : HTTP authentication password.

  -post <name> <value>         : Add an additional post field (repeatable).

  -post-file <name> <path>     : Post an additional file (repeatable).

  -print-media-type            : Use print media-type instead of screen.

  -proxy <proxy>               : Use a proxy.

  -quiet                       : Be less verbose.

  -read-args-from-stdin        : Read command line arguments from stdin.

  -redirect-delay <msec>       : Wait some milliseconds for js-redirects

                                 (default 200).

  -replace <name> <value>      : Replace [name] with value in header and

                                 footer (repeatable).

  -stop-slow-scripts           : Stop slow running JavaScript.

  -title <text>                : The title of the generated PDF file (The

                                 title of the first document is used if not

                                 specified).

  -toc                         : Insert a table of content in the beginning

                                 of the document.

  -user-style-sheet <url>      : Specify a user style sheet, to load with

                                 every page.

  -username <username>         : HTTP Authentication username.

  -zoom <float>                : Use this zoom factor (default 1).

  -f <int>                     : First page to print.

 

For others except PDF:

  -l <int>                     : Last page to print.

  -r <int>                     : Resolution, in DPI (default 150).

  -xres <int>                  : Xresolution, in DPI (default 150).

  -yres <int>                  : Yresolution, in DPI (default 150).

  -w <int>                     : Set image width, unit is pixel.

  -width <int>                 : Set image width, unit is pixel, same as -w.

  -h <int>                     : Set image height, unit is pixel.

  -height <int>                : Set image height, unit is pixel, same as -h.

  -mono                        : Generate a monochrome image file.

  -gray                        : Generate a grayscale image file.

  -dither <int>                : Enable or disable dithering when reduce the

                                 number of bits per pixel to bit (1, 4 or 8).

    -dither 0                  : Disable dithering.

    -dither 1                  : Floyd & Steinberg error diffusion.

    -dither 2                  : BAYER4x4, Bayer dot dithering (order 2

                                 dithering matrix).

    -dither 3                  : BAYER8x8, Bayer dot dithering (order 3

                                 dithering matrix).

    -dither 4                  : CLUSTER6x6, Clustered dot dithering

                                 (order 3 - 6x6 matrix).

    -dither 5                  : CLUSTER8x8, Clustered dot dithering

                                 (order 4 - 8x8 matrix).

    -dither 6                  : CLUSTER16x16, Clustered dot dithering

                                 (order 8 - 16x16 matrix).

    -dither 7                  : BAYER16x16, Bayer dot dithering (order

                                 4 dithering matrix).

  -compress <int>              : Set compression to TIFF format:

    -compress 1                : NONE compression.

    -compress 2                : CCITT modified Huffman RLE.

    -compress 3                : CCITT Group 3 fax encoding (1d).

    -compress 4                : CCITT Group 4 fax encoding.

    -compress 5                : LZW compression.

    -compress 6                : OJPEG compression.

    -compress 7                : JPEG DCT compression.

    -compress 8                : ADOBE_DEFLATE compression.

    -compress 32773            : PACKBITS compression.

    -compress 32809            : THUNDERSCAN compression.

    -compress 32946            : DEFLATE compression.

    -compress 88880            : 204x98  G4 ClassF TIFF.

    -compress 88881            : 204x196 G4 ClassF TIFF.

    -compress 88882            : 204x98  G3 ClassF TIFF.

    -compress 88883            : 204x196 G3 ClassF TIFF.

    -compress 88884            : CCITT Group 3 fax encoding (2d).

  -quality <int>               : Set quality to JPEG format, from 0 to 100.

  -multipage                   : Create multipage TIFF file.

  -aa <string>                 : Enable font anti-aliasing: yes, no.

  -aavec <string>              : Enable vector anti-aliasing: yes/no, default

                                 is 'yes'.

  -aaVector <string>           : Enable vector anti-aliasing: yes, no.

  -opw <string>                : Owner password (for encrypted files).

  -upw <string>                : User password (for encrypted files).

  -forcebwtif                  : Force to create black and white TIFF files.

  -threshold <int>             : Lightness threshold that is used to convert

                                 image to B&W.

  -forcexdpi <int>             : Force to set X DPI to image file.

  -forceydpi <int>             : Force to set Y DPI to image file.

  -tempname <string>           : Set filename template for output image files.

  -tempname1                   : Apply filename template for single image

                                 file.

  -trimimage                   : Trim output image files, remove margins from

                                 output image files.

  -rotate <int>                : Rotate output image file at special angle.

  -layout                      : Maintain original physical layout in PDF to

                                 Text conversion.

  -fixed <fp>                  : Assume fixed-pitch (or tabular) text.

  -htmlmeta                    : Generate a simple HTML file, including the

                                 meta information.

  -enc <string>                : Output text encoding name.

  -eol <string>                : Output end-of-line convention (unix, dos,

                                 or mac).

  -nopgbrk                     : Don't insert page breaks between pages in

                                 PDF to Text conversion.

 

Examples:

Permissions are applied to the output PDF only if encryption strength is

specified or an owner or user password is given:

html2any -ownerpassword 123 -userpassword 456 -key128bit -permit printing

 modifyannot https://www.verypdf.com/ _permit.pdf

 

Set the options one would usually set when printing a book:

html2any -book https://www.verypdf.com/ _book.pdf

 

Collate when printing multiple copies:

html2any -collate https://www.verypdf.com/ _collate.pdf

 

Number of copies to print into the PDF file (default 1):

html2any -copies 3 https://www.verypdf.com/ _copies.pdf

 

Use HTML document as cover. It will be inserted before the toc with no headers

and no footers:

html2any -cover http://www.google.com/ https://www.verypdf.com/ _cover.pdf

 

Show JavaScript debugging output:

html2any -debug-javascript https://www.verypdf.com/ _debug-javascript.pdf

 

Remove external links:

html2any -disable-external-links https://www.verypdf.com/

 _disable-external-links.pdf

 

Remove internal links:

html2any -disable-internal-links https://www.verypdf.com/

 _disable-internal-links.pdf

 

Do not allow web pages to run javascript:

html2any -disable-javascript https://www.verypdf.com/

 _disable-javascript.pdf

 

Do not use lossless compression on PDF objects:

html2any -disable-pdf-compression https://www.verypdf.com/

 _disable-pdf-compression.pdf

 

Disable the intelligent shrinking strategy used by WebKit that makes the

pixel/dpi ratio none constant:

html2any -disable-smart-shrinking https://www.verypdf.com/

 _disable-smart-shrinking.pdf

 

Do not allowed conversion of a local file to read in other local files,

unless explecitily allowed with -allow:

html2any -disallow-local-file-access https://www.verypdf.com/

 _disallow-local-file-access.pdf

 

Change the DPI explicitly (this has no effect on X11 based systems):

html2any -dpi 400 https://www.verypdf.com/ _dpi.pdf

 

Enable installed plugins (such as flash):

html2any -enable-plugins https://www.verypdf.com/ _enable-plugins.pdf

 

Set the default text encoding, for input:

html2any -encoding UTF-8 https://www.verypdf.com/ _encoding.pdf

 

PDF will be generated in grayscale:

html2any -grayscale https://www.verypdf.com/ _grayscale.pdf

 

Set the page bottom margin (default 10mm):

html2any -margin-bottom 10 https://www.verypdf.com/ _margin-bottom.pdf

 

Set the page left margin (default 10mm):

html2any -margin-left 10 https://www.verypdf.com/ _margin-left.pdf

 

Set the page right margin (default 10mm):

html2any -margin-right 10 https://www.verypdf.com/ _margin-right.pdf

 

Set the page top margin (default 10mm):

html2any -margin-top 10 https://www.verypdf.com/ _margin-top.pdf

 

Do not print background:

html2any -no-background https://www.verypdf.com/ _no-background.pdf

 

Page height (default unit millimeter):

html2any -page-height 100 https://www.verypdf.com/ _page-height.pdf

 

Page width  (default unit millimeter):

html2any -page-width 100 https://www.verypdf.com/ _page-width.pdf

 

Wait some milliseconds for js-redirects (default 200):

html2any -redirect-delay 20 https://www.verypdf.com/ _redirect-delay.pdf

 

Insert a table of content in the beginning of the document:

html2any -toc https://www.verypdf.com/ _toc.pdf

 

Use this zoom factor (default 1):

html2any -zoom 4 https://www.verypdf.com/ _zoom.pdf

 

Resolution, in DPI (default 150):

html2any -r 200 https://www.verypdf.com/ _r.jpg

 

Xresolution, in DPI (default 150):

html2any -xres 150 https://www.verypdf.com/ _xres.jpg

 

Set image width, unit is pixel:

html2any -w 100 https://www.verypdf.com/ _w.jpg

 

Set image height, unit is pixel:

html2any -h 100 https://www.verypdf.com/ _h.jpg

 

Generate a grayscale image file:

html2any -gray https://www.verypdf.com/ _gray.jpg

 

Enable or disable dithering when reduce the number of bits per pixel to bit

(1, 4 or 8):

Html2any -dither 1 https://www.verypdf.com/ _dither.jpg

 

Set compression to TIFF format:

html2any -compress 2 https://www.verypdf.com/ _compress.tif

 

Create multipage TIFF file:

html2any -multipage https://www.verypdf.com/ _multipage.tif

 

Enable font anti-aliasing: yes, no:

html2any -aa yes https://www.verypdf.com/ _aa.jpg

 

Enable vector anti-aliasing: yes/no, default is 'yes':

html2any -aavec yes https://www.verypdf.com/ _aavec.jpg

 

Force to create black and white TIFF files:

html2any -forcebwtif https://www.verypdf.com/ _forcebwtif.tif

 

Force to set X DPI to image file:

html2any -forcexdpi 200 https://www.verypdf.com/ _forcexdpi.jpg

 

Force to set Y DPI to image file:

html2any -forceydpi 200 https://www.verypdf.com/ _forceydpi.jpg

 

Set filename template for output image files:

html2any -tempname tempname https://www.verypdf.com/ _tempname.jpg

 

Apply filename template for single image file:

html2any -tempname1 https://www.verypdf.com/ _tempname1.jpg

 

Trim output image files, remove margins from output image files:

html2any -trimimage https://www.verypdf.com/ _trimimage.jpg

 

Rotate output image file at special angle:

html2any -rotate 45 https://www.verypdf.com/ _rotate.jpg

 

Maintain original physical layout in PDF to Text conversion:

html2any -layout https://www.verypdf.com/ _layout.txt

 

Output text encoding name:

html2any -enc UTF-8 https://www.verypdf.com/ _enc.jpg

 

Don't insert page breaks between pages in PDF to Text:

html2any -nopgbrk https://www.verypdf.com/ _nopgbrk.jpg

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: -1 (from 1 vote)

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!