Reputation: 419
We have a requirement to convert any incoming documents which are either in Excel, PDF and Word to images. Any recommendation?
I am NOT sure whether ImageMagik would do this but my understanding it is ONLY for format conversion of images and I guess handles PDF as well. What about Excel and Word?
Thanks in advance
Upvotes: 4
Views: 7395
Reputation: 101
Quite old question still this is how I solved:
Hope it helps someone.
Upvotes: 0
Reputation: 386
You could convert everything to pdf first using:
$ libreoffice --headless --invisible --convert-to pdf *.
libreofficeextension
and then use imagemagick...
you might have some formatting issues in word and especially in powerpoint
Upvotes: 6
Reputation: 21906
You're correct -- imagemagick won't handle the MS Office formats because it only handles image format conversion.
For PDFs, can just use imagemagick directly:
convert -density 400 filename.pdf filename.jpeg
It will give you files:
Where N was the number of pages in your document. pdf2ps
will achieve the same thing, but you'll need to play around with the command-line parameters to get the same output quality.
For the MS Office products, I remember that there is some sort of API that allows you access to the suite's features (this was MS Office 2007, from memory), like opening a file and exporting it to PDF. If you can get things out to PDF, then you can use the method above to convert it to images. Some negative points:
Upvotes: 1