On 07/05/15 17:37, Anton Aylward wrote:
On 05/07/2015 11:22 AM, Istvan Gabor wrote:
Hello:
I would like to scan some documents and save them as pdf files (1 file/page is OK). I'd like to use xsane copy function for this. xsane has a direct save to pdf option but the resulted pdf files are very big. But for copy function a literal command can be given, and xsane forwards the scanned data to the command. I thought that I could use i gs command which compresses the scanned image and saves it as pdf file, but I don't know how to use gs.
An example gs command that could be used for this would be appreciated.
Have a look at ps2ps. I know it says 'postscript" but 'gs', for which this is a wrapper, seems capable of doing many things including converting back and forth between ps and pdf. I suspect that pdf->ps->pdf will do some optimization.
See also ps2pdf,
Finally there is pdftk which has so many options ... Not sure whether this meets the request of the OP, but to create a PDF from scanned pages (jpg, typically), I used "convert" from the ImageMagick package. As in:
$ convert pages-*.jpg document.pdf HTH Cheers. Bye. Ph. A. -- *Philippe Andersson* Unix System Administrator IBA Particle Therapy | Tel: +32-10-475.983 Fax: +32-10-487.707 eMail: pan@iba-group.com <http://www.iba-worldwide.com>