[opensuse] gs command for saving scanned stuff to pdf file
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. Thanks in advance, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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 ... -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2015-05-07 17:47, Philippe Andersson wrote:
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
And previously adjusting the compression of the jpg, you also adjust the size of the pdf. Me, I always scan to png, then if needed I convert to jpeg (or djvu), adjusting the compression ratio. What I don't remember exactly is how I converted to PDF adjusting the size, because last time was a year ago. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF0EAREIAAYFAlVL8skACgkQja8UbcUWM1zvPQD4+tnhwnwLHoVWVRs+2EKZy/Kz jQBgfrjXjmaZNivngwD/Y5yMjBRJy26EwDoYOUrwCcmRnzV6AcRIgI6FumGZoWw= =eKB/ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/07/2015 08:37 AM, 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 ...
I use Xsane for scanning lots of documents for my Homeowners Association. The key is the resolution, and level of color. Fiddle with that for a while till you find an acceptable yet readable size, and save that a profile for your use. I use the Lineart setting (black and white documents) On my scanner, 75 is unacceptable, hard to read. 14.3 K for one page. 100 is a mess, but readable, 22k 150 is acceptable for routine stuff 42k 200 does not seem all that much better than 130 70K 300 is very nice, especially if you ever plan to print them 132K For Color/Grey Scale there is a big improvement in quality. But at a price. 300 Gray Scale and that 132K Baloons to 1.2 Meg. 300 Full Color ballons to 5.8 meg. So use the lowest color content you can get away with, and think carefully about reducing resolution. You pay a big price in quality for reducing resolution. My standard for this is Resolution at 300 and Line art. Yeah, they are a little large - around 70K, but if you ever need to print them out in the future they look almost as good as the original. Disk space is cheap these days. -- After all is said and done, more is said than done. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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.
It depends on the resolution - I usually scan with xsane, save as jpeg, reduce resoilution with imagemagick, then convert to pdf with ditto.
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.
I don't think you'll get gs to compress the image. Just a hunch. -- Per Jessen, Zürich (20.1°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/07/2015 11:22 AM, Istvan Gabor wrote:
An example gs command that could be used for this would be appreciated.
See https://pandemoniumillusion.wordpress.com/2008/05/07/compress-a-pdf-with-pdf... <quote> pdf2ps large.pdf very_large.ps ps2pdf very_large.ps small.pdf Results large.pdf : 6.3MB very_large.ps : 53.4MB small.pdf : 2.4MB Looks like pretty good compression to me. </quote> -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Donnerstag, 7. Mai 2015, 17:22:52 schrieb Istvan Gabor:
[...] An example gs command that could be used for this would be appreciated.
I am using imagemagick's convert to convert tiffs created by xsane into pdfs. It has a compress and a quality option that support jpeg: http://superuser.com/questions/427851/batch-resize-and-compress-pdf-files HTH Jan -- All animals are created equal, but some animals are created more equal than others. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Jan Ritzerfeld wrote:
Am Donnerstag, 7. Mai 2015, 17:22:52 schrieb Istvan Gabor:
[...] An example gs command that could be used for this would be appreciated.
I am using imagemagick's convert to convert tiffs created by xsane into pdfs. It has a compress and a quality option that support jpeg: http://superuser.com/questions/427851/batch-resize-and-compress-pdf-files
Nice, I also use convert for that, but I wasn't aware of that option, thanks. -- Per Jessen, Zürich (13.2°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Per Jessen írta:
Jan Ritzerfeld wrote:
Am Donnerstag, 7. Mai 2015, 17:22:52 schrieb Istvan Gabor:
[...] An example gs command that could be used for this would be appreciated.
I am using imagemagick's convert to convert tiffs created by xsane into pdfs. It has a compress and a quality option that support jpeg: http://superuser.com/questions/427851/batch-resize-and-compress-pdf-files
Nice, I also use convert for that, but I wasn't aware of that option, thanks.
Thank you all. convert works well with xsane. Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/08/2015 02:09 AM, Per Jessen wrote:
Jan Ritzerfeld wrote:
Am Donnerstag, 7. Mai 2015, 17:22:52 schrieb Istvan Gabor:
[...] An example gs command that could be used for this would be appreciated.
I am using imagemagick's convert to convert tiffs created by xsane into pdfs. It has a compress and a quality option that support jpeg: http://superuser.com/questions/427851/batch-resize-and-compress-pdf-files
Nice, I also use convert for that, but I wasn't aware of that option, thanks.
I have SANE on PCLOS, and there is an option when saving image to save it to PDF. I never used it, but I just tried it and it works. Perhaps your version of SANE also has this capability? --doug -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/08/2015 12:04 PM, Doug wrote:
On 05/08/2015 02:09 AM, Per Jessen wrote:
Jan Ritzerfeld wrote:
Am Donnerstag, 7. Mai 2015, 17:22:52 schrieb Istvan Gabor:
[...] An example gs command that could be used for this would be appreciated.
I am using imagemagick's convert to convert tiffs created by xsane into pdfs. It has a compress and a quality option that support jpeg: http://superuser.com/questions/427851/batch-resize-and-compress-pdf-files
Correction: I have XSANE. --doug
I have SANE on PCLOS, and there is an option when saving image to save it to PDF. I never used it, but I just tried it and it works. Perhaps your version of SANE also has this capability?
--doug -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/08/2015 09:04 AM, Doug wrote:
I have XSANE on PCLOS, and there is an option when saving image to save it to PDF. I never used it, but I just tried it and it works.
Exactly. I can't understand why you would't go direct to PDF out of XSANE instead of dicking around scanning to an image and then manually converting. Its built right into the Xsane package. -- After all is said and done, more is said than done. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2015-05-09 01:19, John Andersen wrote:
Exactly. I can't understand why you would't go direct to PDF out of XSANE instead of dicking around scanning to an image and then manually converting. Its built right into the Xsane package.
That's what the OP is doing, and it generates too big PDFs. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlVNSToACgkQja8UbcUWM1y43gEAgUIthTLYf/2I5DtG7eURpPiL jfhgzRUqHsUIzY+A3XEA/2tFZjUqewER/SYSkCznld9nrzg6jYIc+umC+w9Tp0wb =p/0U -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (8)
-
Anton Aylward
-
Carlos E. R.
-
Doug
-
Istvan Gabor
-
Jan Ritzerfeld
-
John Andersen
-
Per Jessen
-
Philippe Andersson