Adobe 23101335 Scripting Guide - Page 54
Document object, Dim docRef As Photoshop.Document
UPC - 718659152833
View all Adobe 23101335 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 54 highlights
Scripting Photoshop 3 Document object pdfOpenOptionsRef.Width = 200 pdfOpenOptionsRef.mode = psOpenRGB pdfOpenOptionsRef.Resolution = 72 pdfOpenOptionsRef.ConstrainProportions = False 'Now open the file Dim docRef As Photoshop.Document Set docRef = appRef.Open(< a file path>, pdfOpenOptionsRef) 'Restore unit setting appRef.Preferences.RulerUnits = originalRulerUnits JS: // Set the ruler units to pixels var originalRulerUnits = preferences.rulerUnits; preferences.rulerUnits = Units.PIXELS; // Get a reference to the file that we want to open var fileRef = new File( < a file path > ); // 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.constrainProportions = false; // Now open the file open( fileRef, pdfOpenOptions ); // restore unit settings preferences.rulerUnits = originalRulerUnits; Because Photoshop cannot save all of the format types that it can open, the open document types may be different from the save document types. 3.8 Document object After you target the Photoshop application, the next object you will likely target is the Document object. The Document object can represent any open document in Photoshop. Photoshop 7.0 Scripting Guide 54