README_WKHTMLTOIMAGE 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. ======================> wkhtmltoimage 0.10.0 rc1 Manual <=======================
  2. This file documents wkhtmltoimage, a program capable of converting HTML
  3. documents into images.
  4. ==================================> Contact <===================================
  5. If you experience bugs or want to request new features please visit
  6. <http://code.google.com/p/wkhtmltopdf/issues/list>, if you have any problems or
  7. comments please feel free to contact me: <uuf6429@gmail.com>
  8. ==================================> License <===================================
  9. Copyright (C) 2010 wkhtmltopdf/wkhtmltoimage Authors.
  10. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
  11. This is free software: you are free to change and redistribute it. There is NO
  12. WARRANTY, to the extent permitted by law.
  13. ==================================> Authors <===================================
  14. Written by Jan Habermann, Christian Sciberras and Jakob Truelsen. Patches by
  15. Mehdi Abbad, Lyes Amazouz, Pascal Bach, Emmanuel Bouthenot, Benoit Garret and
  16. Mário Silva.
  17. ==================================> Synopsis <==================================
  18. wkhtmltoimage [OPTIONS]... <input file> <output file>
  19. ==============================> General Options <===============================
  20. --allow <path> Allow the file or files from the specified
  21. folder to be loaded (repeatable)
  22. --checkbox-checked-svg <path> Use this SVG file when rendering checked
  23. checkboxes
  24. --checkbox-svg <path> Use this SVG file when rendering unchecked
  25. checkboxes
  26. --cookie <name> <value> Set an additional cookie (repeatable)
  27. --cookie-jar <path> Read and write cookies from and to the
  28. supplied cookie jar file
  29. --crop-h <int> Set height for croping
  30. --crop-w <int> Set width for croping
  31. --crop-x <int> Set x coordinate for croping
  32. --crop-y <int> Set y coordinate for croping
  33. --custom-header <name> <value> Set an additional HTTP header (repeatable)
  34. --custom-header-propagation Add HTTP headers specified by
  35. --custom-header for each resource request.
  36. --no-custom-header-propagation Do not add HTTP headers specified by
  37. --custom-header for each resource request.
  38. --debug-javascript Show javascript debugging output
  39. --no-debug-javascript Do not show javascript debugging output
  40. (default)
  41. --encoding <encoding> Set the default text encoding, for input
  42. -H, --extended-help Display more extensive help, detailing
  43. less common command switches
  44. -f, --format <format> Output file format (default is jpg)
  45. -h, --help Display help
  46. --htmldoc Output program html help
  47. --images Do load or print images (default)
  48. --no-images Do not load or print images
  49. -n, --disable-javascript Do not allow web pages to run javascript
  50. --enable-javascript Do allow web pages to run javascript
  51. (default)
  52. --javascript-delay <msec> Wait some milliseconds for javascript
  53. finish (default 200)
  54. --load-error-handling <handler> Specify how to handle pages that fail to
  55. load: abort, ignore or skip (default
  56. abort)
  57. --disable-local-file-access Do not allowed conversion of a local file
  58. to read in other local files, unless
  59. explecitily allowed with --allow
  60. --enable-local-file-access Allowed conversion of a local file to read
  61. in other local files. (default)
  62. --manpage Output program man page
  63. --minimum-font-size <int> Minimum font size
  64. --password <password> HTTP Authentication password
  65. --disable-plugins Disable installed plugins (default)
  66. --enable-plugins Enable installed plugins (plugins will
  67. likely not work)
  68. --post <name> <value> Add an additional post field (repeatable)
  69. --post-file <name> <path> Post an additional file (repeatable)
  70. -p, --proxy <proxy> Use a proxy
  71. --quality <int> Output image quality (between 0 and 100)
  72. (default 94)
  73. --radiobutton-checked-svg <path> Use this SVG file when rendering checked
  74. radiobuttons
  75. --radiobutton-svg <path> Use this SVG file when rendering unchecked
  76. radiobuttons
  77. --readme Output program readme
  78. --run-script <js> Run this additional javascript after the
  79. page is done loading (repeatable)
  80. -0, --disable-smart-width * Use the specified width even if it is not
  81. large enough for the content
  82. --stop-slow-scripts Stop slow running javascripts (default)
  83. --no-stop-slow-scripts Do not Stop slow running javascripts
  84. (default)
  85. --transparent * Make the background transparent in pngs
  86. --use-xserver * Use the X server (some plugins and other
  87. stuff might not work without X11)
  88. --user-style-sheet <url> Specify a user style sheet, to load with
  89. every page
  90. --username <username> HTTP Authentication username
  91. -V, --version Output version information an exit
  92. --width <int> Set screen width (default is 1024)
  93. (default 1024)
  94. --zoom <float> Use this zoom factor (default 1)
  95. Items marked * are only available using patched QT.
  96. =============================> Specifying A Proxy <=============================
  97. By default proxy information will be read from the environment variables: proxy,
  98. all_proxy and http_proxy, proxy options can also by specified with the -p switch
  99. <type> := "http://" | "socks5://"
  100. <serif> := <username> (":" <password>)? "@"
  101. <proxy> := "None" | <type>? <sering>? <host> (":" <port>)?
  102. Here are some examples (In case you are unfamiliar with the BNF):
  103. http://user:password@myproxyserver:8080
  104. socks5://myproxyserver
  105. None
  106. ===============================> Static version <===============================
  107. On the wkhtmltopdf website you can download a static version of wkhtmltopdf
  108. <http://code.google.com/p/wkhtmltopdf/downloads/list>. This static binary will
  109. work on most systems and comes with a build in patched QT.
  110. Unfortunately the static binary is not particularly static, on Linux it depends
  111. on both glibc and openssl, furthermore you will need to have an xserver
  112. installed but not necessary running. You will need to have different fonts
  113. install including xfonts-scalable (Type1), and msttcorefonts. See
  114. <http://code.google.com/p/wkhtmltopdf/wiki/static> for trouble shouting.
  115. ================================> Compilation <=================================
  116. It can happen that the static binary does not work for your system for one
  117. reason or the other, in that case you might need to compile wkhtmltoimage
  118. yourself.
  119. ================================> Installation <================================
  120. There are several ways to install wkhtmltoimage. You can download a already
  121. compiled binary, or you can compile wkhtmltoimage yourself.
  122. ==================================> Examples <==================================
  123. This section presents a number of examples of how to invoke wkhtmltoimage.
  124. To convert a remote HTML file to PNG:
  125. wkhtmltoimage http://www.google.com google.png
  126. To convert a local HTML file to PNG:
  127. wkhtmltoimage my.html my.png