These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Job Offered

bengel
Registered: Jan 28 2010
Posts: 6
Answered

I'm looking for what I'm pretty sure is some very basic coding but lack the skills to do it myself.

I have hundreds of jpegs that I organize into different directories ongoingly. Some directories have a a handful of images, others are much larger. For ease of viewing and note taking - it is easier to turn each directory of jpegs into a single pdf. I would like to automate this process.

So for example, below would be the starting directory setup:

~/file folder 1
~/filefolder 1/jpeg1
~/filefolder 1/jpeg2
~/filefolder 1/jpeg3
~/file folder 2
~/filefolder 1/jpeg200
~/filefolder 1/jpeg202
~/file folder 3
~/filefolder 1/jpeg203
~/filefolder 1/jpeg204

I would like the output to be
file folder 1.pdf (3 images)
file folder 2.pdf (2 images)
file folder 3.pdf (2 images)

Each of the "file folders" are of course in the same directory so the javascript can run like a batch event. I assume it isn't a big deal - but the script needs to run on both mac and pc versions of acrobat pro.

My Product Information:
Acrobat Pro 8.1.5, Macintosh
gomfp
Registered: Jan 31 2006
Posts: 14
In Acrobat Pro, why not just use the toolbar button, Create PDF > From Multiple Files, to create the individual PDF's you desire from the jpeg files inside each folder, then save each PDF?Then again, if you really want to do this as a batch process using javascript, there's an example for different file formats provided in the Acrobat Developers Guide under: Creating & Modifying PDF Documents > Creating & Modifying PDF files > Combining PDF docsIf you are unable to do this after reading the documentation described above, send me an email and we can discuss this matter further.

I should also add that if you intend on doing more of this type of PDF creation in the future using jpeg files, I could create and package an .exe file that adds a toolbar button to Acrobat that automates this process for you, something we can further discuss if you are interested in doing something like this.
Bob Casey
Registered: Aug 5 2009
Posts: 22
I believe you can accomplish this by utilizing the Batch Processing feature in Acrobat 9 which is found on the menu bar....... Advanced/Document Processing/Batch Processing
gomfp
Registered: Jan 31 2006
Posts: 14
True. You can more than likely use batch processing from inside Acrobat to accomplish this task. However, unlike automating the process by adding a toolbutton to implement a folder level script that does all this, I believe it requires (4) mouse clicks to run the sequence (as compared to one if and when automating the process using a toolbutton) that requires some scripting as well.
bengel
Registered: Jan 28 2010
Posts: 6
Exactly - and its not so much the clicking as the waiting for the computer to crunch through the files. Someone has now written a script for me though - so problem solved!
gomfp
Registered: Jan 31 2006
Posts: 14
When I think about it some more, writing a script to accomplish this task is somewhat akin to reinventing the wheel. Just for the heck of it, try using the File > Create PDF > From Multiple Files. I have used this Acrobat feature a number of times for converting as many as 400 jpegs into one PDF file, and it actually works quite well. While I don't know how fast or what kind of computer you are running, for kicks I just now converted 360 jpegs into one PDF file and it did it in under 3-minutes flat. Actually, this is not to shabby for 360 jpeg photos that average between 100-300 kb in size at a resolution of 750x1000 pixels each.
bengel
Registered: Jan 28 2010
Posts: 6
Good point, unfortunately mine are 2-4 mg each so it takes a lot longer. Thanks for the thought though.