wkhtmltox\Image\Converter::__construct

(wkhtmltox >= 0.1.0)

wkhtmltox\Image\Converter::__constructСоздать новый конвертер изображений

Описание

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

Создает конвертер изображений, дополнительно используя входной буфер и настройки конфигурации

Список параметров

buffer

HTML

settings

Название Описание Значения Версия
in URL или путь входного файла, если "-", то используется стандартный ввод /path/to/markup.html >= 0.1.0
out путь к выходному файлу, если "-", то используется стандартный вывод, по умолчанию используется внутренний буфер /path/to/output.png >= 0.1.0
fmt формат вывода для использования
"" по умолчанию
jpg вывод в формате JPEG
png вывод в формате PNG
bmp вывод в формате растрового изображения
svg вывод в формате SVG
>= 0.1.0
transparent при выводе PNG или SVG, сделать белый фон прозрачным boolean >= 0.1.0
screenWidth ширина экрана, используемая для отрисовки в пикселях 800 >= 0.1.0
smartWidth когда true, screenWidth расширяется до ширины содержимого boolean >= 0.1.0
quality коэффициент сжатия, используемый при выводе JPEG-изображения 94 >= 0.1.0
crop.left левая x-координата окна для захвата в пикселях 200 >= 0.1.0
crop.top верхняя y-координата окна для захвата в пикселях 200 >= 0.1.0
crop.width ширина окна для захвата в пикселях 200 >= 0.1.0
crop.height ширина окна для захвата в пикселях 200 >= 0.1.0
load.cookieJar путь к файлу, используемому для загрузки и хранения cookie /tmp/cookies.txt >= 0.1.0
load.username user name to use when loging into a website bart >= 0.1.0
load.password the password to used when logging into a website elbarto >= 0.1.0
load.jsdelay the amount of time in milliseconds to wait after a page is loaded until it is captured 1200 >= 0.1.0
load.zoomFactor how much zoom should be applied to the content 2.2 >= 0.1.0
load.customHeaders custom headers to send when requesting the main web page   >= 0.1.0
load.repertCustomHeaders set true to send with all requests boolean >= 0.1.0
load.cookies cookie string to send when requesting the main web page   >= 0.1.0
load.post post string to send when requesting the main web page   >= 0.1.0
load.blockLocalFileAccess disallow local and piped files to access other local files boolean >= 0.1.0
load.stopSlowScript stop slow running javascript boolean  
load.debugJavascript allow javascript to raise warnings boolean >= 0.1.0
load.loadErrorHandling set error handling strategy
abort abort the convertion process
skip do not add the object to the final output
ignore try to add the object to the final output
>= 0.1.0
load.proxy     >= 0.1.0
web.background include background image in output boolean >= 0.1.0
web.loadImages include images in output boolean >= 0.1.0
web.enableJavascript enable or disable javascript boolean >= 0.1.0
web.enableIntelligentShrinking enable to attempt to fit more content on page, only applies to PDF output boolean >= 0.1.0
web.minimumFontSize the minimum font size allowed 9 >= 0.1.0
web.printMediaType print content using print media type instead of screen media type boolean >= 0.1.0
web.defaultEncoding content to use where no encoding is specified utf-8 >= 0.1.0
web.userStyleSheet URL or path to a user specified style sheet /path/to/style.css >= 0.1.0
web.enablePlugins enable or disable NS plugins boolean >= 0.1.0