freeware image->pdf converter ?

Our "pub" where you can post about things completely Off Topic or about non-silent PC issues.

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

Post Reply
wim
Posts: 777
Joined: Wed Apr 28, 2004 5:16 am
Location: canberra, australia

freeware image->pdf converter ?

Post by wim » Thu Oct 02, 2008 7:10 am

hello, does anyone know of a simple freeware app to convert a bunch of image files into pdf file? i am aware of virtual printers for example CutePDF writer which is a great little tool but would only print one image at a time and i'd get a 1-page pdf and have to muck around merging them. what i want is more like an app that can take, say, a hundred png files and generate me a 100-page .pdf .. :?

Vicotnik
*Lifetime Patron*
Posts: 1826
Joined: Thu Feb 13, 2003 6:53 am
Location: Sweden

Post by Vicotnik » Thu Oct 02, 2008 8:14 am

PNG to PDF is an odd conversion. I don't think there is such a program. If it was a one time thing I would import the images to an Open Office Writer document and use PDFCreator to print to PDF.

wim
Posts: 777
Joined: Wed Apr 28, 2004 5:16 am
Location: canberra, australia

Post by wim » Thu Oct 02, 2008 4:58 pm

well i can easily batch-convert the png to bmp or jpg or whatever if that would make it any less of an 'odd conversion'. surely something must exist to do this because there are countless ebooks floating around the web made from scanned images... what i want it for is scanning my tons of sheet music and making my own fake books

xan_user
*Lifetime Patron*
Posts: 2269
Joined: Sun May 21, 2006 9:09 am
Location: Northern California.

Post by xan_user » Thu Oct 02, 2008 5:38 pm

wim wrote:well i can easily batch-convert the png to bmp or jpg or whatever if that would make it any less of an 'odd conversion'. surely something must exist to do this because there are countless ebooks floating around the web made from scanned images... what i want it for is scanning my tons of sheet music and making my own fake books
No "scan to PDF" option?

jack_aubrey
Posts: 68
Joined: Mon Apr 28, 2003 5:27 pm
Location: USA

Re: freeware image->pdf converter ?

Post by jack_aubrey » Thu Oct 02, 2008 10:14 pm

wim wrote:hello, does anyone know of a simple freeware app to convert a bunch of image files into pdf file?
Using netpbm works OK if not particularly fast. Just run it in a pipe e.g. pngtopnm | pnmtops | pstopdf (pdftops comes from another package, like poppler-utils on Ubuntu; not sure where you would get a prebuilt version for non-Linux OSes). If you want to combine images then something like pscat or pnmcat as an intermediary will probably be needed, and some scripting.

Vicotnik
*Lifetime Patron*
Posts: 1826
Joined: Thu Feb 13, 2003 6:53 am
Location: Sweden

Post by Vicotnik » Thu Oct 02, 2008 11:05 pm

XnView and PDFCreator seems to work ok. Just mark the images you want to "print", CTRL+P, mess around with the settings, done.

When I said odd I meant that the conversion from an image to PDF sounded a bit odd to me, but I never thought about ebooks. :)

CA_Steve
Moderator
Posts: 7470
Joined: Thu Oct 06, 2005 4:36 am
Location: St. Louis, MO

Post by CA_Steve » Fri Oct 03, 2008 4:01 am

xan_user wrote:
wim wrote:well i can easily batch-convert the png to bmp or jpg or whatever if that would make it any less of an 'odd conversion'. surely something must exist to do this because there are countless ebooks floating around the web made from scanned images... what i want it for is scanning my tons of sheet music and making my own fake books
No "scan to PDF" option?
Seconding this...the $80 Canon scanner I bought a few years back had a 'scan to pdf' option as part of the s/w toolkit.

yefi
Posts: 134
Joined: Tue Jun 12, 2007 3:19 pm
Location: UK

Post by yefi » Fri Oct 03, 2008 7:24 am

Vicotnik wrote:PNG to PDF is an odd conversion. I don't think there is such a program.
Bmeps will convert from png to pdf*. However, it creates individual pdfs, so you will need to merge the results with something like pdfsam.

*I could never get the GUI to work. The command line works, but you must remember to add C:\Program Files\Krause\bin to your PATH.

TD22057
Posts: 91
Joined: Thu Jul 22, 2004 9:00 am
Location: Southern California

Post by TD22057 » Fri Oct 03, 2008 8:07 am

You can do the same thing easily in python, PIL, and reportlab

http://www.reportlab.org/index.html

Something like (untested):

import Image
from reportlab.pdfgen import canvas

img = Image.open( 'foo.png' )
x, y = img.size

pdf = canvas.Canvas("foo.pdf")
pdf.drawImage( img, x, y )
pdf.showPage()
pdf.save()

DrJ
Posts: 117
Joined: Fri Nov 21, 2003 10:31 am
Location: Gold Country, CA

Post by DrJ » Fri Oct 03, 2008 9:49 am

Try ImageMagick. It is the standard "Swiss Army Knife" of format conversions, and you do use it from the command line to process files in batches.

yefi
Posts: 134
Joined: Tue Jun 12, 2007 3:19 pm
Location: UK

Post by yefi » Fri Oct 03, 2008 11:13 am

DrJ wrote:Try ImageMagick. It is the standard "Swiss Army Knife" of format conversions, and you do use it from the command line to process files in batches.
I've met ImageMagick before, but I had no idea it had these command line tools, I had just thought it was a PHP library.

I converted a bunch of jpgs with

Code: Select all

convert c:\myfolder\*.jpg output.pdf

and it worked flawlessly. So much for my crappy bmeps.

wim
Posts: 777
Joined: Wed Apr 28, 2004 5:16 am
Location: canberra, australia

Post by wim » Sat Oct 04, 2008 1:17 am

i was just getting ready to script this in python .. but then
i saw that ImageMagick and it worked great.. a very high quality bit of software there!! thanks DrJ

wim
Posts: 777
Joined: Wed Apr 28, 2004 5:16 am
Location: canberra, australia

Post by wim » Thu Dec 04, 2008 11:53 pm

any sensible way to control the output compression, or better yet embed the images without recompression?
i just tried to make a pdf from 65 jpg files totalling a meagre 9.5meg and ended up with a 180meg pdf :-\

wim
Posts: 777
Joined: Wed Apr 28, 2004 5:16 am
Location: canberra, australia

Post by wim » Fri Dec 05, 2008 12:21 am

partial answer : if i use -compress JPEG i get sensible filesizes again (however i doubt this is avoiding recompression)

Post Reply