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

Indesign cc2017 page size script

Explorer ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

I have this script to generate a page size using variables. If i change the page size, i have to manually run the script. Is there a way to have the script run when i open the document and if i make changes to the sizing? Any help would be greatly appreciated.

var doc = app.activeDocument;

doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.inches;

doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.inches;

var w = doc.documentPreferences.pageWidth,

    h = doc.documentPreferences.pageHeight,

    pagesize = app.activeDocument.textVariables.itemByName("PageSize");

pagesize.variableOptions.contents = h + " in X " + w + " in"; 

TOPICS
Scripting

Views

2.1K

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
Guru ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

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 ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

Thanks, so much for the help, Trevor. Just one more question. How can i add a Bleed/Live size variable? I don't think it was answered in the post.

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
Guru ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

LATEST

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