php8.5
Home/ Manual/ image / converter/ wkhtmltox\Image\Converter::__construct

wkhtmltox\Image\Converter::__construct

PHP function Edit on GitHub ✎

(wkhtmltox >= 0.1.0)

Create a new Image converter

Description

wkhtmltox\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""defaultjpgoutput as JPEGpngoutput as PNGbmpoutput as bitmapsvgoutput as SVG>= 0.1.0
""default
jpgoutput as JPEG
pngoutput as PNG
bmpoutput as bitmap
svgoutput as SVG
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

Source: reference/wkhtmltox/wkhtmltox/image/converter/construct.xml · from the official PHP manual (php/doc-en)