Re: Adobe InDesign CS3 JPEG export range problem
Re: Adobe InDesign CS3 JPEG export range problem
- Subject: Re: Adobe InDesign CS3 JPEG export range problem
- From: CYB <email@hidden>
- Date: Thu, 22 Apr 2010 17:20:29 -0500
- Thread-topic: Adobe InDesign CS3 JPEG export range problem
Title: Re: Adobe InDesign CS3 JPEG export range problem
Hello, I'm trying to export every page of a given InDesign CS3 document to separate jpg's.
Something seems to go wrong with specifying the export range (variable numb). I tried some other values instead of 1-1, but none of my attempts worked out so far.
Can anyone please help me through this?
This is what I have (error occurs on the commented line):
on Export_JPGs(myDoc, the_export_folder)
tell application "Adobe InDesign CS3"
set myJPEG_Prefs to JPEG export preferences
tell myJPEG_Prefs
set resolution to 72
set JPEG Quality to maximum
set JPEG export range to export range
set JPEG Rendering style to baseline encoding
end tell
set pageCount to count every page of myDoc
tell myDoc
repeat with i from 1 to pageCount
set numb to i & "-" & i as string
tell application "Adobe InDesign CS3"
set JPEG export range of JPEG export preferences to numb -- Script errors on this line
end tell
export format JPG to (the_export_folder & i & ".jpg" as string)
end repeat
end tell
end tell
end Export_JPGs
Thanks for any help,
Bert.
Bert, as you can see in the Dictionary in the JPEG EXPORT PREFERENCES entrance:
Exporting Spread get/set boolean If true, exports each spread as a single JPEG file. If false, exports facing pages as separate files and appends sequential numbers to each file name.
JPEG export range get/set JPEG export range The page range to export.
JPEG Quality get/set JPEG Quality The compression quality.
JPEG Rendering style get/set JPEG Rendering style The rendering style.
object reference get JPEG export preference An object reference for the object.
Page String get/set string The page(s) to export, specified as a page number or an array of page numbers. Note: Valid when JPEG export range is not all.
In the same dictionary you found:
export all Exports all pages.
export range Exports the page range specified in the page string property.
So if I understand correctly you want to export all pages, so you don’t need to define “export range” the script below works well
on Export_JPGs(myDoc, the_export_folder)
tell application "Adobe InDesign CS4"
set myJPEG_Prefs to JPEG export preferences
tell myJPEG_Prefs
set resolution to 72
set JPEG Quality to maximum
set JPEG export range to export all
set JPEG Rendering style to baseline encoding
end tell
tell myDoc
export format JPG to (the_export_folder & ".jpg" as string)
end tell
end tell
end Export_JPGs
But if you need to export some range this version works ok, at least in cs4 couse I don’t have cs3 anymore, but I’m sure it will work
on Export_JPGs(myDoc, the_export_folder)
tell application "Adobe InDesign CS4"
set myJPEG_Prefs to JPEG export preferences
tell myJPEG_Prefs
set resolution to 72
set JPEG Quality to maximum
set JPEG export range to export range
set JPEG Rendering style to baseline encoding
end tell
set pageCount to count every page of myDoc
tell myDoc
repeat with i from 1 to pageCount
set numb to i & "-" & i as string
tell application "Adobe InDesign CS4"
set Page String of myJPEG_Prefs to numb
end tell
export format JPG to (the_export_folder & i & ".jpg" as string)
end repeat
end tell
end tell
end Export_JPGs
Well hope this help
Cheers
Carlos Ysunza B.
Director
Ysunza/Santiago
Visual Communication • Automation
Tel. (52)55 5256-0336
email@hidden
http://www.ysunzasantiago.com
http://www.thesecretmexico.com
http://www.softrobot.com.mx
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden