Batch converting 120 files....(cropping bounding box & filetype change)

If you select a PDF file and hit Command+i the number of pages will be listed in the info box. Just a matter of figuring out how to ask the Finder to get that information.

Also, I just checked, and Photoshop can open a multi-page PDF file. It's even so kind as to number the pages for you.
 
This is a new version of the AppleScript posted before, it can now deal with multiple pages PDF. Hope it works for you as well:

--Script tested with Photoshop CS5.1 - Acrobat Pro 10.1.2 on Mac OS 10.6.8
--defines source PDF folder location
set my_source to (choose folder with prompt "Choose source PDF folder") as string
--defines destination folder for the resulting rasterized JPEGs
set my_destination to (choose folder with prompt "Choose destination for the resulting rasterized JPEGs") as string
--this variable will later on be assigned with the PDF's actual page count
set my_page_count to 1
--next line is to only pick PDFs from the source folder
tell application "Finder" to set my_pdfs to every item in alias my_source whose kind is "Adobe PDF document"
--loop starts here
repeat with f in my_pdfs
--next 5 lines to invisibly use Acrobat Pro to gather page count information --found this on macscripter.net
tell application "Adobe Acrobat Pro"
open file (f as string) with invisible
set my_page_count to number of pages of document 1
close document 1
end tell
--Now Photoshop knows the PDF page count passed to variable my_page_count
tell application "Adobe Photoshop CS5.1"
activate
--this inner loop is to deal with multiple page PDFs
repeat with i from 1 to my_page_count
--if page count is greater than 1 the page variable will be used in class:pDF open options -- crop page can use (art box/bleed box/bounding box/crop box/media box/trim box)
set pspdf to {class:pDF open options, bits per channel:eight, page:i, crop page:crop box, mode:CMYK, resolution:300, use antialias:true}
open file (f as string) with options pspdf
tell document 1
--flatten image
flatten
--in the next line you can set quality of your JPEG file quality: from 0 to 12
save in my_destination as JPEG with options {embed color profile:true, format options:standard, quality:10}
--close after saving as JPEG
close saving no
end tell
end repeat
--end of inner loop
end tell
end repeat
--loop ends

--open destination folder window when all files have been processed
try
tell application "Finder" to open my_destination
end try
 

Attachments

  • PDF ProcessorII.jsx.zip
    6.5 KB · Views: 183
  • PDF Processor II.jpg
    PDF Processor II.jpg
    140.5 KB · Views: 178

PressWise

A 30-day Fix for Managed Chaos

As any print professional knows, printing can be managed chaos. Software that solves multiple problems and provides measurable and monetizable value has a direct impact on the bottom-line.

“We reduced order entry costs by about 40%.” Significant savings in a shop that turns about 500 jobs a month.


Learn how…….

   
Back
Top