Highlighted

Save to PDF using ExtendScript

Adobe Community Professional ,
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

343

Likes

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

Save to PDF using ExtendScript

Adobe Community Professional ,
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

344

Likes

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
Feb 27, 2020 0

Have something to add?

Join the conversation