Sha256: 7076824895e703f29646f4129c17768dd8bdeb45470cf1016ac1f0e0f3383652
Contents?: true
Size: 540 Bytes
Versions: 4
Compression:
Stored size: 540 Bytes
Contents
'use strict'; const puppeteer = require('puppeteer'); const createPdf = async() => { let browser; try { browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']}); const page = await browser.newPage(); await page.goto(process.argv[2], {waitUntil: 'networkidle2'}); await page.pdf({ path: process.argv[3], format: 'A4' }); } catch (err) { console.log(err.message); } finally { if (browser) { browser.close(); } process.exit(); } }; createPdf();
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
metanorma-0.2.1 | exe/metanorma-pdf.js |
metanorma-0.2.0 | exe/metanorma-pdf.js |
metanorma-0.1.4 | exe/pdf.js |
asciidoctor-csd-0.2.8 | lib/asciidoctor/csd/pdf.js |