I got really frustrated when trying to convert my charts and excel worksheets into publishable content for my paper. Went through several stack overflow questions and used ghostscript to make it possible.
All softwares used in this post are free — $0. It is ideal for Ph.D students or home use for publishing.
- Install ghostscript, using homebrew just run brew install GhostScript and you are good.
- Install Gimp. From homebrew all you have to do is: brew install Caskroom/cask/gimp
- Open your excel worksheet. Set the page setup to be vertical or horizontal, select your area as print area, and then save as pdf. Make sure you save the workbook as pdf. E.g. now I have saved the workbook to be figure1.pdf
- In your command line, type
gs -q -dSafer -dBatch -dNOPAUSE -sDEVICE=tiff32nc -r300 -sOutputFile=figure1.tif figure1.pdf -c quit
- Open the figure1.tif in Gimp, select the area you want, and then choose image -> fit canvas to selection
- In file->export as simple export the file as figure1.tiff you are all set. If you look at the properties it has 300dpi.
You can easily use bash to do batch processing for pdf files, but for more accurate image selection you still need gimp.
Hope this will help other people!