Skip to content

Commit

Permalink
add test of adding pdf generated by pdfjs itself
Browse files Browse the repository at this point in the history
Refs #312
  • Loading branch information
rkusa committed Jul 22, 2023
1 parent ff53257 commit 1866647
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/pdfs/external/self.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Add PDF generated by pdfjs as external document.
const fs = require("fs");
const path = require("path");
const pdf = require("../../../lib");

module.exports = function (doc) {
doc.addPagesOf(
new pdf.ExternalDocument(
fs.readFileSync(path.join(__dirname, "addallpages.pdf")),
),
);
};
Binary file added test/pdfs/external/self.pdf
Binary file not shown.

0 comments on commit 1866647

Please sign in to comment.