From: meino.cramer@gmx.de
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] PDF to png/jpg/...
Date: Sun, 10 May 2009 12:49:30 +0200 [thread overview]
Message-ID: <20090510104930.GC3486@solfire> (raw)
In-Reply-To: <4A06ACD3.9030008@f_philipp.fastmail.net>
Florian Philipp <lists@f_philipp.fastmail.net> [09-05-10 12:35]:
> meino.cramer@gmx.de schrieb:
> > Hi,
> >
> > does anyone know a trick/package, which allows my to
> > convert the pages of a pdf file to images via the commandline
> > (useable from a script).
> >
> > I have a/LOT/ of datasheets of electronics and want to make
> > something like a "pdf gallery" to find pdfs faster...
> >
> > Thanks a lot for any help in advance!
> > Kind regards,
> > Meino Cramer
> >
>
> You can use pdftopnm (app-text/poppler) to generate bitmap images from
> your pdfs. Then you can use pnmtopng (media-libs/netpbm) to create pngs
> from them. I suppose there are also tools for creating jpegs and such
> alike but I haven't looked yet.
>
> You will probably need some tweaking to get optimal results but the
> process should be straight forward.
>
> Make sure you have enough disk space spare. Those pnms can be quiet huge.
>
Thanks a lot for all tipe!
I will use pdftoppm now.
Here is a quick script written on the commandline to do this job.
(I use zsh.)
mkdir PDFviews
cd PDFviews
for i in ../*.pdf ../*.PDF
do
fn=${i:r}
fn=${fn:t}
fn=${fn}.png
pdftoppm -f 1 -l 1 $i > tmp.ppm
ppmtojpeg < tmp.ppm > $fn
done
rm -f tmp.ppm
Have a nice sun(ny)day !
Meino
--
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.
next prev parent reply other threads:[~2009-05-10 10:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-10 9:26 [gentoo-user] PDF to png/jpg/ meino.cramer
2009-05-10 10:04 ` Dale
2009-05-10 10:30 ` Florian Philipp
2009-05-10 10:49 ` meino.cramer [this message]
2009-05-10 20:24 ` Neil Bothwick
2009-05-10 10:57 ` Cédric Cabessa
2009-05-10 17:56 ` Paul Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090510104930.GC3486@solfire \
--to=meino.cramer@gmx.de \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox