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

Save to PDF using ExtendScript

Community Expert ,
Feb 27, 2020 Feb 27, 2020

Copy link to clipboard

Copied

FrameMaker 2019 15.0.5. I am trying to create a PDF using ExtendScript. Here is my code. I am not getting a PDF and FrameMaker beeps at me when I click in the book window like a dialog box is open somewhere. I am not sure if this is right, but I want to avoid using Publish if I can. Thanks.

 

function saveBookAsPdf (book, name) {	
    
    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;

    book.Save (name, params, returnParams);
}

-Rick

TOPICS
Publishing , Scripting

Views

553

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
no replies

Have something to add?

Join the conversation