pdftoimage
pdftoimage copied to clipboard
PdfToImage with inline_pdf and saving to IO
This works fine:
images = PDFToImage.open('somefile.pdf')
But how can I init it with an inline PDF content? Without having a file? I'm working in a cloud environment and I get PDF content via a stream from another service. I don't want to write it to a file first. Something like this would be awesome:
images = PDFToImage.new( pdf_content.to_s )
And saving to an IO wold be nice to. Maybe like this:
io = StringIO()
page.resize('150').quality('80%').save( io )
How can I use this Gem without having a file and without writing to a file?
@robflynn is this possible to do with the poppler library? I'm not sure I've properly understood it, but happy to take a stab at a PR if you could point me broadly at what I need to look at!