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

ZoomOptions for InDesign Server

Community Beginner ,
Nov 28, 2019 Nov 28, 2019

Copy link to clipboard

Copied

Hi Team,

 

I need a solution for following items in the InDesign Server.

 

1. While open a indesign application file, it should be shown first page zoom mode.

(IDS do not support SELECT() and ACTIVEWINDOW(). Kindly check and give me the solution in IDS scripting)

 

DESKTOP CODE:

app.documents[0].pages[0].textFrames[0].select();
app.activeWindow.zoom(ZoomOptions.FIT_PAGE);

app.documents[0].save("C:\Sample.indd");

 

Thanks,

Venkadesh

TOPICS
Scripting

Views

336

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

Community Expert , Nov 28, 2019 Nov 28, 2019

I suspect that the OP is porting a desktop script over to IDS, but we need to understand that this code would have sense for desktop as the workflow might want a specific page displayed after the code is done its processing for the user to look at and resume his work. However on IDS all these scenarios don't make sense as the document will never have a UI rendering.

 

The only suggestion for such use cases is to understand the workflow and seperate code that actaully deals with stuff on the InDe

...

Votes

Translate

Translate
Community Expert ,
Nov 28, 2019 Nov 28, 2019

Copy link to clipboard

Copied

This code is dealing with UI and it has not effect on the document on per se except changes to the UI representation of the document. So this will not have any equivalent code on IDS

 

-Manan 

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
Community Expert ,
Nov 28, 2019 Nov 28, 2019

Copy link to clipboard

Copied

Also worth noting that OP's code does nothing useful at all. It seems OP thinks "selecting equals viewing", but that is not the case – for ID Server as well as for the desktop ID.

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
Community Expert ,
Nov 28, 2019 Nov 28, 2019

Copy link to clipboard

Copied

I suspect that the OP is porting a desktop script over to IDS, but we need to understand that this code would have sense for desktop as the workflow might want a specific page displayed after the code is done its processing for the user to look at and resume his work. However on IDS all these scenarios don't make sense as the document will never have a UI rendering.

 

The only suggestion for such use cases is to understand the workflow and seperate code that actaully deals with stuff on the InDesign document and the code that is just representational in terms of UI, the representational code should be made to run only on the desktop version

 

-Manan

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
Community Expert ,
Nov 28, 2019 Nov 28, 2019

Copy link to clipboard

Copied

LATEST

Ah Manan, you are correct – apologies! The selecting in itself does nothing but that next Zoom command zooms in on the selection, thereby updating the activePage property.

(Which, if it internally does the same thing, might give a hint to the OP. Naturally IDS does not have an activePage property either; actually I'm surprised to find "activeLayer" in http://jongware.mit.edu/idcs6serverjs_html/idcs6serverjs/pc_Document.html !)

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