Does anyone have a script that does the following:
- using a pdf reader
- Start on page 1
- take a screen capture (command+shift+4) then space bar to capture the window
a. if possible a specified screen region
- Go to next page
- Repeat until end of the pdf.
pictures 1-X on the deskp
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.
The application “Preview” can preview a PDF without reader.
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"
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
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
thanks but the issue is the file can not be saved. So but taking a screen capture of the window I can then recreate the pdf.
That sounds like a lot of work. Not sure what you mean by “the file cannot be saved.” Can you explain?
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.
a reason for backup if I ever heard one…ha
look for PDFKey Pro at version tracker may be able to save your doc.
seem to have issues in certain elements.
So if the script is an option would be appreciated.