Given a choice, would you rather have screen shots or just the ability to convert the pages of the PDF into graphic images? It sounds like that’s what you really want.
While Preview isn’t scriptable (a huge oversite on Apple’s part) you can use Image Events to work with graphic images (including PDF’s). However, even Image Events won’t convert more than the first page of a PDF. For that you probably need Adobe’s Acrobat Reader, but the free version isn’t scriptable, you’d need the Professional (paid) version. Either that, or you might be able to do it through GUI scripting.
Thanks for the reply. Yes, I would like to convert the pages of the pdf into graphic images. I have acrobat reader and full as well. Just thought preview might work since everyone has that. Any help would be appreciated.
Acrobat Pro can export PDF to other formats its pretty basic. I would prefer to rasterize with an app like Photoshop myself. Here is a basic sample of Acrobat export. The app should number the file names for multi page docs.
set PDFFile to choose file with prompt "Where is the PDF file?" without invisibles
set JPEGFolder to choose folder with prompt "Where to save the file?"
--
tell application "Adobe Acrobat 7.0 Pr#2CB915"
activate
open PDFFile with invisible
set docName to name of document 1
set docBaseName to getBaseName(docName) of me
set NewFilepath to (((JPEGFolder) as string) & docBaseName & ".jpg")
save front document to file NewFilepath using conversion "com.adobe.acrobat.jpeg"
close front document
end tell
--
on getBaseName(fName)
set baseName to fName
repeat with idx from 1 to (length of fName)
if (item idx of fName = ".") then
set baseName to (items 1 thru (idx - 1) of fName) as string
exit repeat
end if
end repeat
return baseName
end getBaseName
Well I stupidly lost my password for a very large documentation and my hard drive took a dump So to reproduce the encrypted document I thought I could take screen shots of the pdf then ocr it to reproduce the information.