![](https://seccdn.libravatar.org/avatar/3c0770d2df6d972c96473f43f0e858ee.jpg?s=120&d=mm&r=g)
I have scanned in 300 pages of pictures and want to "bind" it as a pdf book. I tried some ways, but I could not make it with so many pages. I am looking for a way, where all pages named as A00001, A00002 ...... in one directory would be converted into one pdf file. Hereby, it should always add one page and not open all pages at once. Which program, script do you suggest for that? bye Ronald Wiplinger
![](https://seccdn.libravatar.org/avatar/c18a749dda699514c262030be9e0ded9.jpg?s=120&d=mm&r=g)
On 10/24/06, Ronald Wiplinger
I have scanned in 300 pages of pictures and want to "bind" it as a pdf book.
I tried some ways, but I could not make it with so many pages.
I am looking for a way, where all pages named as A00001, A00002 ...... in one directory would be converted into one pdf file. Hereby, it should always add one page and not open all pages at once.
Which program, script do you suggest for that?
Try using ImageMagick to convert every picture to PS, and then ps2pdf to create 1 pdf per picture, and then pdftk for merging all resulting pdfs. -- Svetoslav Milenov (Sunny) Even the most advanced equipment in the hands of the ignorant is just a pile of scrap.
![](https://seccdn.libravatar.org/avatar/6a1261b1268b21de11e6a6c0fad0524d.jpg?s=120&d=mm&r=g)
From the bash shell, I just go into the directory where the scanned images are, and type "makepdf" and create a pdf file with all the .png images in that directory. Makes creating a pdf from multiple scans
I wrote a script that does just that.....
http://www.novell.com/coolsolutions/tools/17083.html
Details
Creating one pdf file from a directory of multiple .png scans.
Using kooka and my Cannon scanner, I have been scanning some articles
into my computer, these usually require several pages of scans, and I
save the images as .png files. Kooka saves the images in the format
kscan_0001.png , kscan_0002.png , and so on. As long as you scan in
pages in the same order you want them in the pdf, you won't have any
need to re-number the scanned image files. (You could save the scanned
files in almost any image format you wish. Simply change the script to
work with the image format you want to work with.)
The goal was to get ONE pdf document that was cross platform
compatible created from the multiple scans... all with minimal effort
on my part other than the scanning. Using bash, I created a quick
script to do the repetitive work.
What it does:
First it takes .png scans from the current directory and creates a
.pdf file for each one with imagemagick.
Then, with pdftk, all the .png scans are rolled into one larger .pdf file.
Code:
-------------------------------------------------------------------------------
#!/bin/bash
# FILE : makepdf.sh
# Function: Creates ONE pdf file from a directory of multiple png scans.
# Copyright (C) 2006 Dave Crouse <dave NOSPAMat usalug.org>
# ------------------------------------------------------------------------ #
#
# NOTES:
# Scans must be in .png format, or change the imagetype variable.
# Converts each png image file to a pdf file.
#
#######################
# VARIABLE: Change this to jpg, bmp, or whatever image file type your
converting from.
imagetype="png"
#######################
# Test to make sure required programs are installed.
if [[ -z $( type -p convert ) ]]; then echo -e "ImageMagick -- NOT
INSTALLED !";exit ;fi
if [[ -z $( type -p pdftk ) ]]; then echo -e "pdftk -- NOT INSTALLED !";exit ;fi
read -p "What would you like to name your new pdf file ? :" newname;
for i in *.${imagetype} ; do convert $i $i.pdf;done;
pdftk *.pdf cat output $newname.pdf;
for i in *.${imagetype} ; do rm -f $i.pdf;done;
echo "Conversion complete. PDF file ${newname}.pdf created.";
exit 0
-------------------------------------------------------------------------------
In my .bashrc file I have added:
alias makepdf='sh /home/crouse/Scripts/makepdf.sh'
painless.
For more info on the required programs:
Pdftk - is a command-line tool for manipulating PDF documents.
Home Page: http://www.accesspdf.com/pdftk/
Suse
Page: http://www.novell.com/products/linuxpackages/professional/pdftk.html
ImageMagick - is a robust collection of tools and libraries to read,
write, and manipulate an image in many image formats.
Home Page: http://www.imagemagick.org/
Suse
Page: http://www.novell.com/products/linuxpackages/professional/imagemagick.html
Hope that helps.
Crouse
On 10/24/06, Sunny
On 10/24/06, Ronald Wiplinger
wrote: I have scanned in 300 pages of pictures and want to "bind" it as a pdf book.
I tried some ways, but I could not make it with so many pages.
I am looking for a way, where all pages named as A00001, A00002 ...... in one directory would be converted into one pdf file. Hereby, it should always add one page and not open all pages at once.
Which program, script do you suggest for that?
Try using ImageMagick to convert every picture to PS, and then ps2pdf to create 1 pdf per picture, and then pdftk for merging all resulting pdfs.
-- Svetoslav Milenov (Sunny)
Even the most advanced equipment in the hands of the ignorant is just a pile of scrap.
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
participants (3)
-
Dave Crouse
-
Ronald Wiplinger
-
Sunny