
wkhtmltoxImageConverter::__construct 메서드는 wkhtmltoimage 명령어를 호출하는 역할을 합니다. 파라미터로 전달할 옵션은 다음과 같습니다.
- $url : HTML 문서의 URL 또는 파일 경로
- $output : 이미지 파일의 경로
- $options : wkhtmltoimage 명령어 옵션 (배열 형식으로 전달)
예를 들어, wkhtmltoimage 명령어에 --width 800 --height 600 옵션을 추가하고 싶다면, 다음과 같이 설정할 수 있습니다.
#hostingforum.kr
php
$imageConverter = new wkhtmltoxImageConverter($url, $output, array('width' => 800, 'height' => 600));
또는 옵션을 문자열 형식으로 전달할 수도 있습니다.
#hostingforum.kr
php
$imageConverter = new wkhtmltoxImageConverter($url, $output, '--width 800 --height 600');
wkhtmltoxImageConverter::__construct 메서드의 파라미터는 다음과 같습니다.
- $url : HTML 문서의 URL 또는 파일 경로
- $output : 이미지 파일의 경로
- $options : wkhtmltoimage 명령어 옵션 (배열 형식 또는 문자열 형식으로 전달)
이러한 파라미터를 통해 wkhtmltoimage 명령어를 호출할 수 있습니다.
2025-07-01 00:45