Skip to main content
Known Participant
May 14, 2019
Question

Save as PDF: Adobe Distiller vs Framemaker Save As PDF

  • May 14, 2019
  • 1 reply
  • 1582 views

This is my Framemaker book to PDF saving function:

function saveToPDF(fileObject, savePath) { 

   

    var saveParams, i;

   

    saveParams= GetSaveDefaultParams(); 

   

    i = GetPropIndex(saveParams, Constants.FS_FileType); 

    saveParams.propVal.ival = Constants.FV_SaveFmtPdf;

   

    var saveAsName = savePath; 

    var returnParamsp = new PropVals(); 

    fileObject.Save(saveAsName, saveParams, returnParamsp);

   

}

When I execute this function Framemaker opens the Adobe PDF Distiller which then creates the PDF.

However if I am doing this process manually I open the book go to the File menu and select "Save as PDF".  Using this method Framemaker does not launch the Distiller, it creates the pdf without using any external application.  This generates PDFs much faster.

Is there any way to access the second method of PDF generation using the ESTK?

This topic has been closed for replies.

1 reply

frameexpert
Community Expert
Community Expert
May 15, 2019

Try adding this:

i = GetPropIndex (saveParams, Constants.FS_PDFUseDistiller);

saveParams.propVal.ival = 0;

www.frameexpert.com
gabeS1234Author
Known Participant
May 15, 2019

That save parameter does make it so that the distiller is not visible, but it uses the same process so the distiller is probably just running in the background.

Also I could not find any documentation on this save parameter in the scripting guide.  Latest version I can find is 2017.

I have 2 problems with the script driven pdf generation.

One is that when my PDF function is complete it leaves one of the book components open.  For some reason I cannot access this component using app.ActiveDoc in order to get rid of it.

The second problem is that when PDFing some books, this function will cause Framemaker to crash with Internal Error 15014.  These books always crash when using the script and never crash when manually PDFing from the file menu.

Is there maybe an FCode way to trigger the file menu "Save As PDF"?