batch pdf compiling

Fayd

Diamond Member
Jun 28, 2001
7,970
2
76
www.manwhoring.com
it's like this...

i have around 1500 pdfs that need to be compiled into 150 pdfs.

i have them saved as xxx_00.pdf, through xxx_09.pdf, where xxx represents a 3 digit number.

I'm trying to figure out a faster way of doing this, requiring less user intervention than manually dragging and dropping the 10 pdfs in order into pdf-blender, and renaming the output file for every run.

oh, and the output file needs to be named xxx.pdf (or some derivative thereof... i can rename them whatever i like with batch file renamer..so long as they have that 3 digit # in there.)

to make it clearer what i'm trying to do...

xxx_00,xxx_01,xxx_02....xxx_09 -------------> xxx
yyy_00,yyy_01,yyy_02....yyy_09 -------------> yyy

just doing that around 150 times.
 

Fayd

Diamond Member
Jun 28, 2001
7,970
2
76
www.manwhoring.com
Oh well, I did it manually.

If anyone has any hints on how to do it, it'd be useful for the future. maybe someone has a preferred guide on how to write batch scripts?
 

QuixoticOne

Golden Member
Nov 4, 2005
1,855
0
0
Try this:
http://www.accesspdf.com/pdftk/

And as for a batch language to help automate the command line aspects of it.... well personally I'd use something like a standard shell like BASH, KSH, ZSH which are available for Windows (check out Cygwin) or of course UNIX.
http://cygwin.com/

Cygwin's collection also includes other scripting languages like TCL, PERL, RUBY, Python, et. al. all of which would solve such problems nicely.

If you want something more "microsoftish" there's always power shell which is a free download from Microsoft.
http://en.wikipedia.org/wiki/Powershell

I suppose if you're looking to learn to do basic scripting that can be used for most any computer operating system and which can tackle either trivial problems or complex programs I'd suggest learning a bit of something major like PERL, Python, Ruby, TCL, or such like. If you stick with a basic "scripting shell" like SH/BASH/PowerShell you'll be much more limited with what you can do with it and you'll find much less free software programs / libraries / examples to help you solve problems. Whereas from PERL, Python, RUBY, etc. you could even simply use real SQL database type access from your script if you needed to have that level of capability to sort / filter your filenames or whatever.
I suppose I'd say Ruby or Python might be a little more ubiquitous and easily approachable than PERL / TCL these days.

There are also PDF manipulation software libraries like poppler, et. al. that you could call from a scripted programming language like Ruby / Python or whatever.