Skip to content
Snippets Groups Projects
Commit 06504a49 authored by Fred Chasen's avatar Fred Chasen
Browse files

add tester

parent b8d038a0
No related branches found
No related tags found
No related merge requests found
let Printer = require("./");
const util = require('util');
const fs = require('fs');
const readFile = util.promisify(fs.readFile);
(async () => {
let printer = new Printer();
// let page = await printer.render("test/samples/aurorae/index.html");
let pdf = await printer.pdf("https://s3.amazonaws.com/pagedmedia/samples/text.html");
// const html = await readFile("test/samples/aurorae/index.html", "utf-8");
// let pdf = await printer.pdf({ html });
// let html = await printer.html("test/samples/aurorae/index.html");
fs.writeFileSync(`output/out-${Date.now()}.pdf`, pdf);
return process.exit(0);
})();
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment