Question

What is the best way to work with PDF and DJVU formats in Ruby/Ruby On Rails? What I need is to get number of pages and get picture of the specific page. There are will be more cases in future.

Now, I'm using command promt for this (djvulibre for DJVU, gs for PDF). It works fine, but if there is a more preferable tool?

Was it helpful?

Solution

The Prawn Ruby gem should do you and Djvu-tools is the only one I have heard of for djvu files.

Also, some other interesting pdf options include rails-latex a nifty little framework for latex files in a rails server. Latex includes some very interesting libraries such as TikZ/Pgf that produce beautiful documents difficult to match in html.

OTHER TIPS

the ruby-poppler bindings can render a PDF to JPG. See my answer in [1] for some sample code.

[1] In Ruby Search PDF, highlight text found, export JPG of the page

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top