Splitting pdf documents into seperate pages

This forum is devoted to showing off and discussing open source and free software we use and/or think is worth while. If you're looking for software, post your need here and we'll make a suggestion.

Moderator: forhire

Splitting pdf documents into seperate pages

Postby forhire » Mon Oct 03, 2005 4:24 pm

Today I needed to split up another pdf catalog for the web. I found that ghost script can do quite nicely so I wrote this quick script to create the individual pages and thumbnails.

for count in `seq $2`
do
echo Creating PDF $count.pdf
gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -dFirstPage=$count -dLastPage=$count -sOutputFile=$count.pdf $1
echo Creating jpeg thumbnail $count.jpg
convert -resize 100x100 $count.pdf $count.jpg
done
forhire
Site Admin
 
Posts: 376
Joined: Thu Jun 24, 2004 7:56 pm
Location: Morton, Washington

Return to Open Source Software

Who is online

Users browsing this forum: No registered users and 4 guests

cron