THBPdf Download Contact Us Buy Online Developerse-mail me

pdftk fails in joining several pdf files in its right order




Message-ID:<pan.2009.02.20.13.03.00@lutrina>
Subject:

pdftk fails in joining several pdf files in its right order


Date:Fri, 20 Feb 2009 14:01:22 +0100


Hi, this is issue:

I have several single pdf files (1 page 1 file pdf) I want join together 
(1049 pdf files, numbered from 1 to 1049)

I used command:

pdftk *.pdf cat output out.pdf

but result is not correct. pdftk, put pages like 1000, 1010, 1011 and so 
on, after page 10 (not in proper place) and order is not more the right 
order. Knows anyone how join rightly these pdf files using pdftk?
-- 
Puppy Linux wiki:  http://puppylover.netsons.org/dokupuppy
Puppy Linux Forum: http://puppylinux.ilbello.com
Windows me genuit, Ubuntu rapuere / tenet nunc Puppy Linux...




Message-ID:<pco4oyolnw2.fsf@math.ntnu.no>
Subject:

Re: pdftk fails in joining several pdf files in its right order


Date:Fri, 20 Feb 2009 23:55:09 +0100


+ Lutrin <elicona@olympo.it>:

> I have several single pdf files (1 page 1 file pdf) I want join together 
> (1049 pdf files, numbered from 1 to 1049)
>
> I used command:
>
> pdftk *.pdf cat output out.pdf
>
> but result is not correct. pdftk, put pages like 1000, 1010, 1011 and so 
> on, after page 10 (not in proper place) and order is not more the right 
> order. Knows anyone how join rightly these pdf files using pdftk?

This has nothing to do with pdftk but everything to do with unix, or
rather the shell (assuming you are using unix). The shell expands *.pdf
in alphabetical order, and hence 100.pdf comes before 11.pdf, for
example. The cure, assuming your files were named 1.pdf, 2.pdf, ... up
to 1049.pdf, is to write

  pdftk ?.pdf ??.pdf ???.pdf ????.pdf cat output out.pdf

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell




Message-ID:<708ukcFncpjaU1@mid.individual.net>
Subject:

Re: pdftk fails in joining several pdf files in its right order


Date:Sat, 21 Feb 2009 01:02:20 +0100


Harald Hanche-Olsen wrote:
> + Lutrin <elicona@olympo.it>:
> 
>> I have several single pdf files (1 page 1 file pdf) I want join together 
>> (1049 pdf files, numbered from 1 to 1049)
>>
>> I used command:
>>
>> pdftk *.pdf cat output out.pdf
>>
>> but result is not correct. pdftk, put pages like 1000, 1010, 1011 and so 
>> on, after page 10 (not in proper place) and order is not more the right 
>> order. Knows anyone how join rightly these pdf files using pdftk?
> 
> This has nothing to do with pdftk but everything to do with unix, or
> rather the shell (assuming you are using unix). The shell expands *.pdf
> in alphabetical order, and hence 100.pdf comes before 11.pdf, for
> example. The cure, assuming your files were named 1.pdf, 2.pdf, ... up
> to 1049.pdf, is to write
> 
>   pdftk ?.pdf ??.pdf ???.pdf ????.pdf cat output out.pdf

Better still, rename the files to 0001.pdf, 0002.pdf, 0003.pdf ...

///Peter





Message-ID:<pan.2009.02.21.00.19.48@lutrina>
Subject:

Re: pdftk fails in joining several pdf files in its right order


Date:Sat, 21 Feb 2009 01:18:13 +0100


On Sat, 21 Feb 2009 00:02:20 +0000, Peter Flynn ci disse:

> Better still, rename the files to 0001.pdf, 0002.pdf, 0003.pdf ...
[...]
0004, 0005, 006, 0007, 0008, 0009, 0010 and so on...

do you have an advice for me, about how make zeros be tree before first 
pages (1,2,3,4,5,6,7,8,9), two before (10, 11, 12...), one before (100, 
101, 102...) and not present for last pages (100, 1001, 1002...) ?

how can I rename files according your tip?
-- 
Puppy Linux wiki:  http://puppylover.netsons.org/dokupuppy
Puppy Linux Forum: http://puppylinux.ilbello.com
Windows me genuit, Ubuntu rapuere / tenet nunc Puppy Linux...




Message-ID:<pan.2009.02.21.00.15.01@lutrina>
Subject:

Re: pdftk fails in joining several pdf files in its right order


Date:Sat, 21 Feb 2009 01:13:25 +0100


On Fri, 20 Feb 2009 23:55:09 +0100, Harald Hanche-Olsen ci disse:

>   pdftk ?.pdf ??.pdf ???.pdf ????.pdf cat output out.pdf
[...]

thanks, tried, It works. It must be

  pdftk *?.pdf *??.pdf *???.pdf *????.pdf cat output out.pdf
-- 
Puppy Linux wiki:  http://puppylover.netsons.org/dokupuppy
Puppy Linux Forum: http://puppylinux.ilbello.com
Windows me genuit, Ubuntu rapuere / tenet nunc Puppy Linux...




Message-ID:<pcok57jlx1l.fsf@math.ntnu.no>
Subject:

Re: pdftk fails in joining several pdf files in its right order


Date:Sat, 21 Feb 2009 14:49:42 +0100


+ Lutrin <elicona@olympo.it>:

> On Fri, 20 Feb 2009 23:55:09 +0100, Harald Hanche-Olsen ci disse:
>
>>   pdftk ?.pdf ??.pdf ???.pdf ????.pdf cat output out.pdf
> [...]
>
> thanks, tried, It works. It must be
>
>   pdftk *?.pdf *??.pdf *???.pdf *????.pdf cat output out.pdf

Then you must be using some oddball shell unknown to me.
Glad you got it to work, though.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell




 

|THBPdf| |Download| |Developers|