Closed jindrichbartek closed 9 years ago
Got the same error, I will try to find why. If some one has an idear, tell it here :).
Just created a pull request that fixes this. I didn't have time to test it for saving files locally, but should it should work fine.
Too much changes in PDFKit to update this package without breaking compatibility with the actual version.
I cannot guarantee the synchronization of operation using the new PDFKit streamed solution. I need to read more about the implementation to know if doc.end() is synch, blocking or not but synch. If following code use the created file and the write process is not ended, could create trouble.
Also, I've read on new PDFKit version
Style open issues :(
I will create a new Meteor package with PDFKit 0.7.1 and keep this one for critical server PDF generation. The new package will be server & client side as this is a new functionality of PDFKit :) !
PDFKit's API is synch, check this out: https://github.com/devongovett/pdfkit/issues/269#issuecomment-52732422
Client side generation? Amazing! This is exactly what I need. When do you expect the new package? I can't believe I stumble upon this right before starting up a big (for me) job!
@joadr sure ?
but one issue I've run into is making sure the entire buffer is written before closing the streams and zipping up. The issue touched on in your second point is what has caused me to check _writeableState on a setInterval which ain't pretty :)
@thomaspatricksteven if I found time, this week-end
The PDFKit 0.7.X package is here: pascoual:PDFKitX
The meteor client side is not so easy to do. Need more time, or help ;), contributions are welcome.
As said, the current pascoual:pdfkit version will continue to be used for server side only and better performance use cases.
The PDFKit 0.7.X package is here: pascoual:PDFKitX
Client side ok !
Hi, it would be nice to upgrade this meteor wrapper package to last PDFkit version.
Current version doesn't support 'Switching to previous pages' feature. That's mean
bufferPages: true
in constructor,doc.switchToPage(pageNumber)
method etc.Btw. I've tried that localy, but there is some error with finalize method here: https://github.com/pascoual/meteor-pdfkit/blob/master/pdfkitWrapper.js#L9.