I need to output the first page of several thousand documents as 20mm high jpegs (at 300dpi).
Chinnadk kindly helped me get this far:
var doc = app.activeDocument; w = doc.documentPreferences.pageWidth; doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.pixels; doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.pixels; app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.exportRange; app.jpegExportPreferences.exportResolution = 300/w*72; app.jpegExportPreferences.pageString = doc.pages.name; doc.exportFile(ExportFormat.JPG, new File(doc.fullName.toString().replace(/\.indd$/i,".jpg")), false);
but that was before I realised I needed it 20mm high.
Any help much appreciated.
1. It depend on your first page structure but you could group every pageItems - resize them - select result - and export with 300 dpi set.
However it can be pretty complex to resize various kinds of objects.
2. You could use BridgeTalk to call Adobe Photoshop and resize given JPG to desired output.
However it need some studies about BridgeTalk,
(see chapter 5)
but... if Photoshop is available for you - easier than scripting is to use predefined action for such simple job...
3. Assuming you have set of JPGs already (but wrong size) and no Photoshop in touch -
you could place them one by one to a new InDesign doc (with output size) -
fit content to frame -
and export selection again.
The last way looks like almost discovered and easy to proccess.