Strange behaviour Adobe Illustrator when export in TIFF

Hi all.

Have script with custom value for image resolution.

when trying to export enough perceived value - creates a file with the previous value of resolution.

tell application "Finder"
	set outputFolder to (choose folder with prompt "Choose folder for Output files:") as string 
	set tempResolution to display dialog "Set resolution for" & return & "TIFF-files, dpi (72 “ 2400):" default answer ""
	set currentTIFFResolution to text returned of tempResolution as integer
end tell

tell application "Adobe Illustrator"
	set docRef to the current document
	set docName to name of docRef
	
	set newFileName to outputFolder & "v_" & docName
	
	export current document to file newFileName as TIFF with options {class:TIFF export options, color space:CMYK, embed ICC profile:true, resolution:currentTIFFResolution}
	
end tell

For example: if i now entered 100 dpi, Illustrator make file with previous value, but at the next time the resolution is 100, despite the entered value 150, for example…

Regards, Alexey

P.S. OSX 10.9.3, Adobe Illustrator CC

Hi. I don’t have CC to test, but Choose Folder is a standard addition; nix the Finder call, and then retry. If it fails, note if using another file format”such as Photoshop”works.

Hello,

Mark, i don’t have a problem with save, i have a problem with setting up a resolution for my output files…
Illustrator set incorrect values for exporting tiff-files.

Hi ilexxey,

I spent more than one hour on Illustrator CC. The export as TIFF seems broken for me.
Export to PSD works and retain correct resolution (and absolute number of pixels is different exporting to different resolutions).
After you can use one-liner SIPS command to convert from PSD to TIFF.

Stefano - Ame

Hello,

this method is more difficult to script. And the more a restriction on exports at 72 DPI remains and for PSD format. In this case I export AI and EPS to PDF, then open with PShop.

Regards, Alexey

Hi Ilexxsey,

Export as PSD works and resolution is preserved. I post sample script:

set outputFolder to (choose folder with prompt "Choose folder for Output files:") as string
set tempResolution to display dialog "Set resolution for" & return & "TIFF-files, dpi (72 “ 2400):" default answer ""
set currentTIFFResolution to text returned of tempResolution as integer

tell application "Adobe Illustrator"
	set docRef to the current document
	set docName to name of docRef
	set newFilePath to outputFolder & "v_" & docName
	export current document to file newFilePath as Photoshop with options {class:Photoshop export options, color space:CMYK, embed ICC profile:true, resolution:currentTIFFResolution}
end tell
set newFilePathPosix to (POSIX path of newFilePath) & ".psd"
set newFilePathTiffPosix to (POSIX path of newFilePath) & ".tif"
do shell script "/usr/bin/sips -s format TIFF " & quoted form of newFilePathPosix & " --out " & quoted form of newFilePathTiffPosix

Stefano - Ame