Copy link to clipboard
Copied
hi,
how could export to jpg all items in a document indesign?
and also need measures each item.
if someone could help me I would appreciate
sorry for my English
thanks
Copy link to clipboard
Copied
Hi,
really EVERY page item of a document?
What about groups, anchored objects ...
Please provide some further instruction
Hans-Gerd Claßen
Copy link to clipboard
Copied
I would like to take groups and images, but the images with the measure having indesign
thanks for the message
Copy link to clipboard
Copied
start here:
exports page items to created subfolder.
jpg-naming: sourcepage + itemcount
#target InDesign
//set properties for export to your needs
with(app.jpegExportPreferences){
antiAlias = true;
embedColorProfile = false;
exportResolution = 300;
jpegColorSpace = JpegColorSpaceEnum.RGB; //JpegColorSpaceEnum.CMYK, JpegColorSpaceEnum.GRAY r/w One of RGB, CMYK or Gray
jpegQuality = JPEGOptionsQuality.HIGH; //JPEGOptionsQuality.LOW, JPEGOptionsQuality.MEDIUM, JPEGOptionsQuality.HIGH, JPEGOptionsQuality.MAXIMUM r/w The compression quality.
jpegRenderingStyle = JPEGOptionsFormat.BASELINE_ENCODING; // JPEGOptionsFormat.PROGRESSIVE_ENCODING r/w The rendering style.
simulateOverprint = true;
}
//doc has to be saved once
var theDoc = app.activeDocument;
var docName = theDoc.name;
var docShortName = docName.replace(/.indd/, '')
var docPath = '' + theDoc.fullName;
var docContainerPath = docPath.replace(docName, '')
var destPath = docContainerPath + '/' + docShortName + '_jpgExport/'
if(Folder(destPath).create() != true){alert('Could not create targetfolder.'); exit();}
var pageItems = theDoc.pageItems.everyItem().getElements();
l = pageItems.length;
counter = 0;
for(var i = 0; i < l; i++){
counter = counter + 1;
var singlePageItem = pageItems;
currParentPage = singlePageItem.parentPage;
if(currParentPage == null){parentPageNumber = 'pasteboard'}else{parentPageNumber = singlePageItem.parentPage.name; }
newFile =new File(destPath + 'page_' + parentPageNumber + '_' + 'item_' + counter + '.jpg');
if(singlePageItem.exportFile(ExportFormat.JPG, newFile) === false){alert(newFile + ' could not write jpg-File.')}
}
Copy link to clipboard
Copied
Forgive as you could run this code on mac? not to save it
thanks
Copy link to clipboard
Copied
gutie91 wrote:
Forgive as you could run this code on mac? not to save it
thanks
Sorry, but I don't understand this sentence ????
It's a extendscript and could be run from ESTK ...