• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

97

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?

Votes

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

Votes

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?

Votes

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