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

Create Print PDF using ExtendScript

Community Beginner ,
Apr 19, 2024 Apr 19, 2024

Copy link to clipboard

Copied

Hi all,

I'm trying to use a script to save all files in a book as single PDF files, but for some reason the value for Constants.FP_PDFSeparateFiles pops up an error; no matter if I try to set it as integer or boolean –

can anyone help?

 

var params, returnParams, i;
params = GetSaveDefaultParams ();
returnParams = new PropVals ();
   
    i = GetPropIndex (params, Constants.FS_FileType);
    params[i].propVal.ival = Constants.FV_SaveFmtPdf;
    i = GetPropIndex (params, Constants.FS_PDFUseDistiller);
    params[i].propVal.ival = 0;
    i = GetPropIndex (params, Constants.FP_PDFSeparateFiles);
    params[i].propVal.ival = true; //1

 

Views

77

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 ,
Apr 19, 2024 Apr 19, 2024

Copy link to clipboard

Copied

What version of FrameMaker?

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 ,
Apr 19, 2024 Apr 19, 2024

Copy link to clipboard

Copied

Also, what is the error you are getting?

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 Beginner ,
Apr 19, 2024 Apr 19, 2024

Copy link to clipboard

Copied

Hi! I'm working with FM 16 and the error in debugger (vcode) reads:

Exception has occurred: 21 undefined is not an object

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 ,
Apr 19, 2024 Apr 19, 2024

Copy link to clipboard

Copied

LATEST

What is line 21 in the code?

 

I would try it within FrameMaker with File > Script > Run. It may be an issue with the setup in VS-Code.

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