Created
February 1, 2013 18:58
-
-
Save glurp/4693283 to your computer and use it in GitHub Desktop.
Tst pbif pdf generation witj 400,000 images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var PDFDocument = require('pdfkit'); | |
| var ML=2000 | |
| var MC=200 | |
| var px=6000/ML | |
| var py=4000/MC | |
| doc = new PDFDocument({margin: 10,size: [6000,4000]}); | |
| for (var col=0;col<ML*px;col+=px) | |
| for (var li=0;li<MC*py;li+=py) | |
| doc.image('test.png', col,li,{fit:[px,py]}); | |
| console.log("Created "+(MC*ML)+" images, write...") | |
| doc.write('out.pdf'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment