tcr / scissors

PDF manipulation in Node.js! Split, join, crop, read, extract, boil, mash, stick them in a stew.
Apache License 2.0
285 stars 45 forks source link

Join isn't working for me... #13

Closed assadtony closed 7 years ago

assadtony commented 8 years ago

I can select a page and save it without a problem, but when trying to join several pages, this is where it simply stops... Anyone has experienced anything like this while joining?

Running in OSX Captain with the newest code...

prescottprue commented 8 years ago

@assadtony Also running into this. I am getting errors that the pdf file is unable to be opened.

assadtony commented 8 years ago

@prescottprue I ended up doing this, and worked for me. Join is a function of the library, not of the object. So you need to call it from the actual scissors and not the instance.

Example

`// Put all the scissor pages in a pages array var pages = [];

var stream = scissors.join.apply(null, pages).pdfStream().pipe(fs.createWriteStream(output)); stream.on('finish', function() { // Return and download. res.download(output); })`

cboulanger commented 7 years ago

Can this be closed? Or do you think we need a join method on the Command instance?

cboulanger commented 7 years ago

No further updates, closing.