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.


How to load a preset file for InDesign server

New Here ,
Nov 03, 2021 Nov 03, 2021

Copy link to clipboard

Copied

I received a joboptions file "my_preset" and I put it under the location of C:\Program Files\Adobe\Adobe InDesign Server 2021\Resources\Adobe PDF\settings\mul.

 

Then I tried to load this preset:

var my_preset = app.pdfExportPresets.item("[my_preset]");
app.documents.item(0).exportFile(ExportFormat.pdfType, myFile, my_preset);

But the server couldn't load this file:

Invalid value for parameter 'using' of method 'exportFile'. Expected PDFExportPreset, but received nothing.

 I tried to restart the InDesignServerService x64 service but it still can't load this preset.

Anything I can do to use this preset file? I'm sure it's a valid one because it worked on another machine. Simply coping it to my machine didn't work.

TOPICS
Import and export, Scripting, Server developers

Views

101

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
Advocate ,
Nov 03, 2021 Nov 03, 2021

Copy link to clipboard

Copied

Hello @Qiqi5CB2 

 

Not sure if this will work for Indesign sever but it does for scripts in Indesign.....give it a try!

 

 

 

var my_preset = app.pdfExportPresets.itemByName("my_preset");

 

 

 

 

Regards,

Mike

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
New Here ,
Nov 03, 2021 Nov 03, 2021

Copy link to clipboard

Copied

Thanks Mike, unfortunately I got the same error message. I think itemByName() or item() might be the same function.

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
Advocate ,
Nov 03, 2021 Nov 03, 2021

Copy link to clipboard

Copied

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
New Here ,
Nov 03, 2021 Nov 03, 2021

Copy link to clipboard

Copied

Yeah I also found that link. But I don't have a Typefi service running in my machine.

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
Advocate ,
Nov 03, 2021 Nov 03, 2021

Copy link to clipboard

Copied

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
Advocate ,
Nov 03, 2021 Nov 03, 2021

Copy link to clipboard

Copied

Hello @Qiqi5CB2 

 

Did you try removing the [] brackets around your preset?

 

Regards,

Mike

 

 

 

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
New Here ,
Nov 04, 2021 Nov 04, 2021

Copy link to clipboard

Copied

Hi Mike, yeah I also tried without [] brackets but still failed.

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
Adobe Community Professional ,
Nov 04, 2021 Nov 04, 2021

Copy link to clipboard

Copied

LATEST

Hi Qiqi5CB2,

why don't you try to load the joboptions file with

 

app.importFile( ExportPresetFormat.PDF_EXPORT_PRESETS_FORMAT , pdfExportPresetFile );

 

More details:

https://community.adobe.com/t5/indesign-discussions/import-preset-name-changing-in-indesign-server-i...

 

Also read the comments below my reply there.

 

Regards,
Uwe Laubender

( ACP )

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