PDF Script

I have noticed here there was a PDF Page Count script already.

I am just curious if anyone knows if something I am proposing is able to be done, as well as show me how to do it.

I am looking at creating a script that will do a page count on 10,000 PDFs,
this script would then return a log file of some sort, which another script
would use to trigger the insertion of a blank page after any pdf that is not
of even pages. This would also seperate any PDFs that are of 10 Pages or
more from the processs. Finally in the end, it would combine all the PDFs,
minus the 10 page + PDFs, into one file, or into packages of 1000 PDFs per
package. And again produce a log file to the states the files created from
this process?

Is this at all possible? Generally would run the script on a watch folder.

Sound possible. May need Acrobat Professional to make thing easier. New pages can’t be done in reader. There is some UNIX methods. Applescript is not very good over 1000+ record list. You likely have to work out a batch method.

Set a side 5 years to read your 10,000 page PDF :slight_smile:

I figured using Acrobat was a given, I dont even use Reader its a waste of time.

Do you know of how the script may look?

lots of repeat in, if statements, read files, add/delete pages. Not quite sure what you mean by ‘may look’. Write the script and post it if you need help. Nothing there seem to be tricky. Expect you may need a big harddisk for the resulting PDF.

Everything you are looking to do can easily be done with Applescript / Acrobat Professional, but its not going to be fast at all but may be serviceable depending on the file contents and if you’re not trying to process 10,000’s file per day. What kind of files are you dealing with? All text or graphics files?

Anyway, alot of the steps are already covered on this site- counting pages, inserting pages, moving files, writing logs, reading logs, etc. Just make a list of your steps that Bevos started and do some searching.

You may also want to download the “Acrobat Interapplication Communication Reference” from Adobe to have around and find out what you can and can’t do with Acrobat.

-N