README_WKHTMLTOIMAGE 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. =====================> wkhtmltoimage 0.10.0 beta5 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. --cookie <name> <value> Set an additional cookie (repeatable)
  23. --cookie-jar <path> Read and write cookies from and to the
  24. supplied cookie jar file
  25. --crop-h <int> Set height for croping
  26. --crop-w <int> Set width for croping
  27. --crop-x <int> Set x coordinate for croping
  28. --crop-y <int> Set y coordinate for croping
  29. --custom-header <name> <value> Set an additional HTTP header (repeatable)
  30. --custom-header-propagation Add HTTP headers specified by
  31. --custom-header for each resource request.
  32. --no-custom-header-propagation Do not add HTTP headers specified by
  33. --custom-header for each resource request.
  34. --debug-javascript Show javascript debugging output
  35. --no-debug-javascript Do not show javascript debugging output
  36. (default)
  37. --encoding <encoding> Set the default text encoding, for input
  38. -H, --extended-help Display more extensive help, detailing
  39. less common command switches
  40. -f, --format <format> Output file format (default is jpg)
  41. -h, --help Display help
  42. --htmldoc Output program html help
  43. --images Do load or print images (default)
  44. --no-images Do not load or print images
  45. -n, --disable-javascript Do not allow web pages to run javascript
  46. -n, --enable-javascript Do allow web pages to run javascript
  47. (default)
  48. --javascript-delay <msec> Wait some milliseconds for javascript
  49. finish (default 200)
  50. --load-error-handling <handler> Specify how to handle pages that fail to
  51. load: abort, ignore or skip (default
  52. abort)
  53. --disable-local-file-access Do not allowed conversion of a local file
  54. to read in other local files, unless
  55. explecitily allowed with --allow
  56. --enable-local-file-access Allowed conversion of a local file to read
  57. in other local files. (default)
  58. --manpage Output program man page
  59. --minimum-font-size <int> Minimum font size
  60. --password <password> HTTP Authentication password
  61. --disable-plugins Disable installed plugins (default)
  62. --enable-plugins Enable installed plugins (plugins will
  63. likely not work)
  64. --post <name> <value> Add an additional post field (repeatable)
  65. --post-file <name> <path> Post an additional file (repeatable)
  66. -p, --proxy <proxy> Use a proxy
  67. --quality <int> Output image quality (between 0 and 100)
  68. (default 94)
  69. --readme Output program readme
  70. -0, --disable-smart-width * Use the specified width even if it is not
  71. large enough for the content
  72. --stop-slow-scripts Stop slow running javascripts (default)
  73. --no-stop-slow-scripts Do not Stop slow running javascripts
  74. (default)
  75. --transparent * Make the background transparent in pngs
  76. --use-xserver * Use the X server (some plugins and other
  77. stuff might not work without X11)
  78. --user-style-sheet <url> Specify a user style sheet, to load with
  79. every page
  80. --username <username> HTTP Authentication username
  81. -V, --version Output version information an exit
  82. --width <int> Set screen width (default is 1024)
  83. (default 1024)
  84. --zoom <float> Use this zoom factor (default 1)
  85. Items marked * are only available using patched QT.
  86. =============================> Specifying A Proxy <=============================
  87. By default proxy information will be read from the environment variables: proxy,
  88. all_proxy and http_proxy, proxy options can also by specified with the -p switch
  89. <type> := "http://" | "socks5://"
  90. <serif> := <username> (":" <password>)? "@"
  91. <proxy> := "None" | <type>? <sering>? <host> (":" <port>)?
  92. Here are some examples (In case you are unfamiliar with the BNF):
  93. http://user:password@myproxyserver:8080
  94. socks5://myproxyserver
  95. None
  96. ===============================> Static version <===============================
  97. On the wkhtmltopdf website you can download a static version of wkhtmltopdf
  98. <http://code.google.com/p/wkhtmltopdf/downloads/list>. This static binary will
  99. work on most systems and comes with a build in patched QT.
  100. Unfortunately the static binary is not particularly static, on Linux it depends
  101. on both glibc and openssl, furthermore you will need to have an xserver
  102. installed but not necessary running. You will need to have different fonts
  103. install including xfonts-scalable (Type1), and msttcorefonts. See
  104. <http://code.google.com/p/wkhtmltopdf/wiki/static> for trouble shouting.
  105. ================================> Compilation <=================================
  106. It can happen that the static binary does not work for your system for one
  107. reason or the other, in that case you might need to compile wkhtmltoimage
  108. yourself.
  109. ================================> Installation <================================
  110. There are several ways to install wkhtmltoimage. You can download a already
  111. compiled binary, or you can compile wkhtmltoimage yourself.
  112. ==================================> Examples <==================================
  113. This section presents a number of examples of how to invoke wkhtmltoimage.
  114. To convert a remote HTML file to PNG:
  115. wkhtmltoimage http://www.google.com google.png
  116. To convert a local HTML file to PNG:
  117. wkhtmltoimage my.html my.png