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

How to load a preset file for InDesign server

New Here ,
Nov 03, 2021 Nov 03, 2021

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
1.2K
Translate
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
Advisor ,
Nov 03, 2021 Nov 03, 2021

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

Translate
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

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

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

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

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

Hello @Qiqi5CB2 

 

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

 

Regards,

Mike

 

 

 

Translate
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

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

Translate
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 04, 2021 Nov 04, 2021
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 )

Translate
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