Reputation: 751
I have a rails app that allows user to upload a pdf file and then in the background converts it to html using pdftohtml, before parsing the html and doing some more processing.
All my other features run on heroku, except for this.
How do I install pdftohtml on heroku?
I thought of wrapping pdftohtml in a custom gem of mine. Is this feasible.
Are there any other ways of doing this.
Thanks in advance
Upvotes: 0
Views: 358
Reputation: 3684
There are many gems available to handle this task. You can use pdf-reader for conversion.
I guess you need something like pdftohtmlr which is a wrapper for command line tool pdftohtml. But I think you can't use it on heroku.
Upvotes: 0
Reputation: 1528
I have no idea what "pdftohtml" is supposed to be, but I would recommend some kind of gem that is based on wkhtmltopdf, which allows you to use a static binary, which you can run on heroku without problems. This topic is actually well documented, you may try something like this: http://www.mobalean.com/blog/2011/08/02/pdf-generation-and-heroku
Upvotes: 4