Skip to main content
frameexpert
Community Expert
Community Expert
February 27, 2020
Question

Save to PDF using ExtendScript

  • February 27, 2020
  • 0 replies
  • 631 views

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

This topic has been closed for replies.