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

Convert fm to pdf

Community Beginner ,
Mar 16, 2018 Mar 16, 2018

Copy link to clipboard

Copied

How to convert framemaker doc into pdf using extendcript.?

TOPICS
Scripting

Views

720

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 ,
Mar 16, 2018 Mar 16, 2018

Copy link to clipboard

Copied

[Moderator]: Moved to Scripting forum.

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 ,
Mar 16, 2018 Mar 16, 2018

Copy link to clipboard

Copied

Here is a simple function that you can use, where "doc" is a valid document object.

saveDocToPdf (doc, "High Quality Print");

function saveDocToPdf (doc, jobOption) {  

  

    var params, returnParams, saveName, i;

  

    // Set the PDF Job Option for the document.

    doc.PDFJobOption = jobOption;

    // Replace the .fm extension with .pdf.

    saveName = doc.Name.replace (/\.fm$/i, ".pdf");

    // Get the save parameters and set the file type to PDF>

    params = GetSaveDefaultParams();

    returnParams = new PropVals();

    i = GetPropIndex (params, Constants.FS_FileType);

    params.propVal.ival =Constants.FV_SaveFmtPdf;

    // Call the document's Save method.

    doc.Save (saveName, params, returnParams);

}

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 ,
Mar 19, 2018 Mar 19, 2018

Copy link to clipboard

Copied

LATEST

Need to remove unwanted double spaces and paragraph marks in framemaker document using extendscript ?

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