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

'exportFile > withGrids' parameter of InDesign Server

Guru ,
Feb 08, 2023 Feb 08, 2023

Copy link to clipboard

Copied

Hi forum,

 

I’m writing a script for InDesign Server without having it installed. To be more exact, I want it to work in both versions server and desktop. In the end, it should export a PDF file. I noticed that, unlike the desktop, the server version has the withGrids parameter —

If true, exports the grids. (Optional) (default: false) — which is not very informative to me.  I guess it’s equivalent to the ‘visible guides and baseline grids’ check box in the ‘export pdf’ dialog box.

 

Can anybody confirm/disprove/explain to me what it does?

 

— Kas

TOPICS
Scripting

Views

229

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 ,
Feb 08, 2023 Feb 08, 2023

Copy link to clipboard

Copied

I've never used that option in ID Server scripts (mainly because I wasn't aware of it). You can simply leave it out.

 

A parameter that does matter is the third one in Desktop, which tells InDesign whether to show the export window. That doesn't exist in ID Server, so you should test whether the script runs in Server or Desktop. So Desktop uses

exportFile (format, file, true/false, preset)

while Server uses

exportFile (format, file, preset)

 

P.

 

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 ,
Feb 08, 2023 Feb 08, 2023

Copy link to clipboard

Copied

Hi Peter,

Yes, I know the difference and handle it in my script like so:

var desktop = (app.name == "Adobe InDesign");

if (desktop) {
	inddDoc.exportFile(ExportFormat.PDF_TYPE, pdfFile, false, pdfPreset); // format, to, showingOptions, using
}
else {
	inddDoc.exportFile(ExportFormat.PDF_TYPE, pdfFile, pdfPreset, false); // format, to, using, withGrids
}

I wonder what withGrids does? If I had IDS, I'd export a PDF with this parameter on and off to see the difference.

 

— Kas

 

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 ,
Feb 08, 2023 Feb 08, 2023

Copy link to clipboard

Copied

LATEST

I imagine that it exports the visible grids and baselines. You can set that in the preset, maybe the script parameter is intended to override the preset. Which begs the question why this parameter and not others. As usual, the object model's description isn't exactly enlightening.

Why don't you let your customer run a test in ID Server of two scripts, one with withGrids enabled, the other, disabled?

 

PeterKahrel_0-1675873739675.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