Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save barseghyanartur/c6deeee7b2ffbc0726093c2f0f24abe5 to your computer and use it in GitHub Desktop.
Save barseghyanartur/c6deeee7b2ffbc0726093c2f0f24abe5 to your computer and use it in GitHub Desktop.
ImageMagick convert DocX, PDF or ODT to PNG

DocX

convert -verbose -quality 100 -fill "rgba(255,255,255,1.00)" -density 300 -alpha off test.docx test_docx.png

PDF

convert -verbose -quality 100 -fill "rgba(255,255,255,1.00)" -density 300 -alpha off test.pdf test_pdf.png

ODT

convert -verbose -quality 100 -fill "rgba(255,255,255,1.00)" -density 300 -alpha off test.odt test_odt.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment