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.
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
Copy link to clipboard
Copied
Thanks Mike, unfortunately I got the same error message. I think itemByName() or item() might be the same function.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Yeah I also found that link. But I don't have a Typefi service running in my machine.
Copy link to clipboard
Copied
Another one to look at....
https://documentation.help/InDesign-Server-CS6/pc_PDFExportPreset.html
Mike
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi Mike, yeah I also tried without [] brackets but still failed.
Copy link to clipboard
Copied
Hi Qiqi5CB2,
why don't you try to load the joboptions file with
app.importFile( ExportPresetFormat.PDF_EXPORT_PRESETS_FORMAT , pdfExportPresetFile );
More details:
Also read the comments below my reply there.
Regards,
Uwe Laubender
( ACP )