Tag Archives: combine

Xsane and Ghostscript

Today, i ended up having to scan some receipts in, to send my expense reports. I had never tried using printer-scanners with ubuntu ever. But i was pleasantly surprised, by how well, Xsane the linux program for acquiring images with scanners, worked. It worked seamlessly with my HP-Photosmart-C4400 series printer-scanner (Dint have to install any drivers or anything of that sort). You can choose between saving the image as a jpeg or a pdf file.

Once I scanned the images, i ended up with two distinct pdf documents (1 page each), which i had to then combine before i submitted my expense report. I usedĀ  ghostscript, with the following switches, to combine these two filesĀ  into a single file.

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOUTPUTFILE=merged.pdf Tempout-0001.pdf Tempout-0003.pdf

Tempout-0001.pdf and Tempout-0003.pdf are the files I am merging into merged.pdf.