Saving A Document - Adobe PHOTOSHOP CS 2.0 - SCRIPTING GUIDE Manual

Table of Contents

Advertisement

Adobe Photoshop CS2 Scripting Guide
'Create a PDF option object
Dim pdfOpenOptionsRef
Set pdfOpenOptionsRef = CreateObject("Photoshop.PDFOpenOptions")
pdfOpenOptionsRef.AntiAlias = True
pdfOpenOptionsRef.Height = 100
pdfOpenOptionsRef.Width = 200
pdfOpenOptionsRef.mode = psOpenRGB
pdfOpenOptionsRef.Resolution = 72
pdfOpenOptionsRef.Page = 3
pdfOpenOptionsRef.ConstrainProportions = False
' open the file
Dim docRef
Set docRef = appRef.Open(C:\\PDFFiles\MyFile.pdf, pdfOpenOptionsRef)
'Restore unit setting
appRef.Preferences.RulerUnits = originalRulerUnits
JS
// Set the ruler units to pixels
var originalRulerUnits = app.preferences.rulerUnits
app.preferences.rulerUnits = Units.PIXELS
// Get a reference to the file that we want to open
var fileRef = new File( C:\\PDFFiles\MyFile.pdf )
// Create a PDF option object
var pdfOpenOptions = new PDFOpenOptions
pdfOpenOptions.antiAlias = true
pdfOpenOptions.height = 100
pdfOpenOptions.width = 200
pdfOpenOptions.mode = OpenDocumentMode.RGB
pdfOpenOptions.resolution = 72
pdfOpenOptions.page = 3
pdfOpenOptions.constrainProportions = false
// open the file
app.open( fileRef, pdfOpenOptions )
// restore unit settings
app.preferences.rulerUnits = originalRulerUnits

Saving a Document

Options for saving documents in Photoshop CS2 are illustrated below. To find out which properties you
can specify for a specific file format save option, look up the object that begins with the file format name.
For example, to find out about properties for saving an
In the Adobe Photoshop CS2 AppleScript Scripting Reference, look up the
In the Adobe Photoshop CS2 Visual Basic Scripting Reference and Adobe Photoshop CS2 JavaScript
Scripting Reference, look up
Photoshop CS2
.
EPSSaveOptions
file, do the following:
.eps
Class EPS save options
Scripting Photoshop CS2
.
44

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Photoshop cs2

Table of Contents