Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #7005

Re: Converting multiple PNG files to single PDF from BASH

From Tim Watts <tw+usenet@dionic.net>
Newsgroups comp.os.linux.misc
Subject Re: Converting multiple PNG files to single PDF from BASH
Date 2013-01-14 09:00 +0000
Organization A noiseless patient Spider
Message-ID <q2ucs9-t6v.ln1@squidward.local.dionic.net> (permalink)
References <ab6ef068-4cf6-4fb2-854f-866844d0d9a1@googlegroups.com>

Show all headers | View raw


On Monday 14 January 2013 08:45 zipeppe@gmail.com wrote in 
comp.os.linux.misc:

> Hi guys,
> I am looking for a bash script using 'convert' to convert PNG file to
> single PDF. The problem is mainly related to their names which are not
> numerically sorted: fig1.png fig2.pnf fig3.png ... fig10.png...
> fig100.png... fig250.png
> 
> The following command creates a PDF file with useless *unsorted* pages:
> 
> convert *png book.pdf
> 
> It seems that there is no option for the 'convert' to force the piping
> into a single file..
> 
> The following script for the first 20 pages, on the other hand, creates
> only a single page as output, the last one:
> 
> for i in $(seq 20); do convert fig$i.png book.pdf; done
> 
> Any suggestion?

pdftk

I cannot give you a recipe, but that took will almost certainly have a way 
to fix your problem.

-- 
Tim Watts                 Personal Blog: http://www.dionic.net/tim/

"It would be better to live under robber barons than under omnipotent
moral busybodies."

Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Converting multiple PNG files to single PDF from BASH zipeppe@gmail.com - 2013-01-14 00:45 -0800
  Re: Converting multiple PNG files to single PDF from BASH Tim Watts <tw+usenet@dionic.net> - 2013-01-14 09:00 +0000
  Re: Converting multiple PNG files to single PDF from BASH dave.gma+news002@googlemail.com.invalid (Dave Gibson) - 2013-01-14 09:57 +0000
    Re: Converting multiple PNG files to single PDF from BASH zipeppe@gmail.com - 2013-01-14 02:11 -0800
    Re: Converting multiple PNG files to single PDF from BASH "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2013-01-14 15:42 +0100
  Re: Converting multiple PNG files to single PDF from BASH zipeppe@gmail.com - 2013-01-14 02:08 -0800
    Re: Converting multiple PNG files to single PDF from BASH The Natural Philosopher <tnp@invalid.invalid> - 2013-01-14 10:11 +0000
      Re: Converting multiple PNG files to single PDF from BASH zipeppe@gmail.com - 2013-01-14 04:06 -0800
        Re: Converting multiple PNG files to single PDF from BASH Loki Harfagr <l0k1@thedarkdesign.free.fr.INVALID> - 2013-01-14 18:32 +0000
    Re: Converting multiple PNG files to single PDF from BASH unruh <unruh@invalid.ca> - 2013-01-14 17:34 +0000
  Re: Converting multiple PNG files to single PDF from BASH unruh <unruh@invalid.ca> - 2013-01-14 17:30 +0000
  Re: Converting multiple PNG files to single PDF from BASH Anonymous <anonymous@foto.nl1.torservers.net> - 2013-01-15 06:12 -0500
  Re: Converting multiple PNG files to single PDF from BASH Anonymous <anonymous@foto.nl1.torservers.net> - 2013-01-15 07:23 -0500
    Re: Converting multiple PNG files to single PDF from BASH J G Miller <miller@yoyo.ORG> - 2013-01-16 14:37 +0000

csiph-web