wkhtmltox\Image\Converter::__construct

(wkhtmltox >= 0.1.0)

wkhtmltox\Image\Converter::__constructCreate a new Image converter

Description

publicwkhtmltox\Image\Converter::__construct(string$buffer = ?, array$settings = ?)

Creates an Image converter, optionally taking an input buffer and configuration settings

Parameters

buffer

HTML

settings

NameDescriptionValuesChangelog
inURL or path of the input file, if "-" stdin is used/path/to/markup.html>= 0.1.0
outpath of output file, if "-" stdout is used, by default an internal buffer is used/path/to/output.png>= 0.1.0
fmtoutput format to use
""default
jpgoutput as JPEG
pngoutput as PNG
bmpoutput as bitmap
svgoutput as SVG
>= 0.1.0
transparentwhen outputting a PNG or SVG, make the white background transparentboolean>= 0.1.0
screenWidththe with of the screen used to render in pixels800>= 0.1.0
smartWidthwhen true, screenWidth is expanded to the content widthboolean>= 0.1.0
qualitycompression factor to use when outputting a JPEG image94>= 0.1.0
crop.leftleft/x coordinate of the window to capture in pixels200>= 0.1.0
crop.toptop/y coordinate of the window to capture in pixels200>= 0.1.0
crop.widthwidth of the window to capture in pixels200>= 0.1.0
crop.heightheight of the window to capture in pixels200>= 0.1.0
load.cookieJarpath of file used to load and store cookies/tmp/cookies.txt>= 0.1.0
load.usernameuser name to use when loging into a websitebart>= 0.1.0
load.passwordthe password to used when logging into a websiteelbarto>= 0.1.0
load.jsdelaythe amount of time in milliseconds to wait after a page is loaded until it is captured1200>= 0.1.0
load.zoomFactorhow much zoom should be applied to the content2.2>= 0.1.0
load.customHeaderscustom headers to send when requesting the main web page >= 0.1.0
load.repertCustomHeadersset true to send with all requestsboolean>= 0.1.0
load.cookiescookie string to send when requesting the main web page >= 0.1.0
load.postpost string to send when requesting the main web page >= 0.1.0
load.blockLocalFileAccessdisallow local and piped files to access other local filesboolean>= 0.1.0
load.stopSlowScriptstop slow running javascriptboolean 
load.debugJavascriptallow javascript to raise warningsboolean>= 0.1.0
load.loadErrorHandlingset error handling strategy
abortabort the convertion process
skipdo not add the object to the final output
ignoretry to add the object to the final output
>= 0.1.0
load.proxy  >= 0.1.0
web.backgroundinclude background image in outputboolean>= 0.1.0
web.loadImagesinclude images in outputboolean>= 0.1.0
web.enableJavascriptenable or disable javascriptboolean>= 0.1.0
web.enableIntelligentShrinkingenable to attempt to fit more content on page, only applies to PDF outputboolean>= 0.1.0
web.minimumFontSizethe minimum font size allowed9>= 0.1.0
web.printMediaTypeprint content using print media type instead of screen media typeboolean>= 0.1.0
web.defaultEncodingcontent to use where no encoding is specifiedutf-8>= 0.1.0
web.userStyleSheetURL or path to a user specified style sheet/path/to/style.css>= 0.1.0
web.enablePluginsenable or disable NS pluginsboolean>= 0.1.0
To Top