티스토리 뷰
wkhtmltopdf 다운로드
윈도우 버전을 설치 하고 환경 변수를 추가 한다. 환경 변수 추가 방법
필수 옵션
- 마진 : -T 21,-R 21,-B,-L (단위 mm)
- @media type print 적용 : --print-media-type
- 확대축소 : --zoom 1.33
- 자동 페이지 맞춤 비활성(기본적으로 pdf가 축소 되어 저장됨) : --disable-smart-shrinking
- 용지 방향 : -O Landscape
- 전체 옵션
smple code

명령프롬프트 cmd (파일을 생성할수 있는 권한이 필요하기 때문에 관리자 권한으로 실행으로 실행)
wkhtmltopdf.exe -T 21 -L 21 --print-media-type --disable-smart-shrinking https://www.google.co.kr google.pdf
wkhtmltopdf.exe -T 15 -L 15 --print-media-type --disable-smart-shrinking https://www.google.co.kr printsample.pdf
가로출력 smple code : -O Landscape
wkhtmltopdf.exe -O Landscape https://www.google.co.kr googleLandscape.pdf