marcdacz / compare-pdf

Standalone node module that compares pdfs
MIT License
62 stars 21 forks source link

Allow to call compare-pdf with pdf buffers instead of filesystem paths #17

Closed Grakel closed 2 years ago

Grakel commented 2 years ago

Hello all, I have a suggestion that I think could be quite useful in some common situations that do not involve reading from disk. In our case, we obtain the PDF files calling to an API, so we already have the PDF buffer, and we would like to avoid writing and reading from the disk if not necessary.

So as far as I can see, compare-pdf only takes two paths as arguments, forcing us to write the PDF buffer into disk and then call compare-pdf with the according path.

Would there be any chance that you implement a solution in which you can simply pass the file buffers? I think this adapts better to the needs some users might find.

Thanks for your time.

marcdacz commented 2 years ago

interesting request. I'll check this out. there is actually another issue raised requesting streams too (#15). I might see how we can support both.