codrut.pro
  • CV
  • Projects
  • Snippets
  • Tags
  • More

Convert PDF to PNG and back

May 19, 2021 One-minute read
linux • pdf • png • document • gimp

Prerequisites Link to heading

sudo pacman -S gimp imagemagick poppler

PDF to PNG Link to heading

Create a directory with your INITAIL.pdf then execute this inside of it:

pdftoppm INITIAL.pdf prefix-for-images -png

Do whatever Link to heading

Edit your images in gimp for example:

gimp prefix-for-images-1.png

Join PNGs to PDF Link to heading

convert prefix-for-images-*.png FINAL.pdf