Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


InDesing Scritping. Export page to JPG leads to creation several extra files.

Explorer ,
Jul 20, 2021 Jul 20, 2021

Copy link to clipboard

Copied

Hi everyone! I'm working on a script which will export final view of master page into a image. I haven't anythong better than apply master spread to page and export it as image. It works, but with of the indd file i noticed weired thing - instead of one file it saves 7 (screenshot below). Unless i'm missing something it seems to be incorrect behavior. Does anyone know what can cause such behaviour?

I'm using macos big sur v.11.4 and InDesign v.11.0.4 (also tried on server version).

Script which i used: 

var doc = app.activeDocument;

app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.LOW;

var masterPage = doc.masterSpreads.itemByName('B-Cover Front Page');

var previewFile = new File("/Users/user1/Desktop/test_export_images/" + masterPage.name + '.jpg');

doc.pages.firstItem().appliedMaster = masterPage;
doc.exportFile(ExportFormat.JPG, previewFile);
previewFile.close();
 
Screenshot 2021-07-20 at 15.58.07.pngScreenshot 2021-07-20 at 15.58.19.png
TOPICS
Import and export, Scripting

Views

49

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jul 20, 2021 Jul 20, 2021
I'm sorry, i find a problem, i haven't ensured document has only one page and didn't noticed that it already has several pages. Can someone delete this topic?

Likes

Translate

Translate
Explorer ,
Jul 20, 2021 Jul 20, 2021

Copy link to clipboard

Copied

Made mistake in InDesign version.Screenshot 2021-07-20 at 16.16.50.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 20, 2021 Jul 20, 2021

Copy link to clipboard

Copied

LATEST

I'm sorry, i find a problem, i haven't ensured document has only one page and didn't noticed that it already has several pages. Can someone delete this topic?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines