Page footer 자동으로 생성
지원 되지 않는 듯. 수동으로 테이블 사이즈 조절해서 loop 돌려야.. (Puppeteer에 footer template이 있는 거 같은데... 시도는 안해봄)
How to deal with page breaks when printing a large HTML table
PDF 암호화
Puppeteer에선 pdf 암호화를 지원하지 않기 때문에 외부 library를 사용해야 함
https://github.com/Sparticuz/node-qpdf2
chromium launch options
참고
/**
* Returns a list of recommended additional Chromium flags.
*/
static get args() {
const result = [
'--autoplay-policy=user-gesture-required',
'--disable-background-networking',
'--disable-background-timer-throttling',
'--disable-backgrounding-occluded-windows',
'--disable-breakpad',
'--disable-client-side-phishing-detection',
'--disable-component-update',
'--disable-default-apps',
'--disable-dev-shm-usage',
'--disable-domain-reliability',
'--disable-extensions',
'--disable-features=AudioServiceOutOfProcess',
'--disable-hang-monitor',
'--disable-ipc-flooding-protection',
'--disable-notifications',
'--disable-offer-store-unmasked-wallet-cards',
'--disable-popup-blocking',
'--disable-print-preview',
'--disable-prompt-on-repost',
'--disable-renderer-backgrounding',
'--disable-setuid-sandbox',
'--disable-speech-api',
'--disable-sync',
'--disk-cache-size=33554432',
'--hide-scrollbars',
'--ignore-gpu-blacklist',
'--metrics-recording-only',
'--mute-audio',
'--no-default-browser-check',
'--no-first-run',
'--no-pings',
'--no-sandbox',
'--no-zygote',
'--password-store=basic',
'--use-gl=swiftshader',
'--use-mock-keychain',
];
if (this.headless === true) {
result.push('--single-process');
} else {
result.push('--start-maximized');
}
return result;
}
Backlinks