I had to generate Abstract book for #NGSchool2016 (). I had spreadsheet generated by Google Forms with all necessary information. I could copy-paste all entries and format it later on, but I found LaTeX more robust for the task.
As I had already LaTeX template, the only missing part was conversion of .xls to .tex. Thus I have written simple script, xls2tex.py, that generate .tex file based on table from .xls file.
This script, among many other things, convert utf into LaTeX escape characters.
xls2tex.py depends on xlrd and utf8tolatex (from pylatexenc/latexencode, but this is given as single file)
# install dependencies
sudo apt-get install python-xlrd
# generate tex
# generate pdf
Today I needed to convert multiple .pdf files into .tiff images with specific DPI and LZW compression. I found it’s very simple using ImageMagic.
sudo apt-get install imagemagick
# convert .pdf to lzw compressed .tiff changing dpi to 300
for f in *.pdf; do
echo `date` $f;
convert -density 300 -compress lzw $f tiffs/$f.tiff;
For more options, have a look at ImageMagic site.
Most printing services require CMYK color encoding, which is not natively supported by Inkscape. Because of that, you will need some third-party solution.
Firstly, I have tried Inkscpae extension, ExportPDFCMYK, but unfortunately it turned out not working in my setting (Ubuntu 14.04).
But then, I have came across ghostscript-based solution, that works great! Simply export your project into PDF in Inkscape and then execute:
gs -dSAFER -dBATCH -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite \
-sColorConversionStrategy=CMYK -dProcessColorModel=/DeviceCMYK \
Inspired by zeroset.