Skip to main content
Participant
April 15, 2014
Question

pdf created from FrameMaker book using FDK is of bigger size

  • April 15, 2014
  • 0 replies
  • 332 views

Hi,

I am new to FrameMaker, when trying to generate a pdf document from a FrameMaker book using FDK, the size of the pdf file created is big when compared to the pdf created using “Save As PDF” from FrameMaker. I have tried setting Named Destinations to false and also “PDF Job Options” to “Smallest File Size”.

Below is the code we use to create a pdf file using FDK

//Open the frame book to process document by document

bookId = OpenFile(strFile);

/* Get docId in order to set Acrobat Bookmark levels */

docId = F_ApiGetId(FV_SessionId, FV_SessionId, FP_FirstOpenDoc);

F_ApiSetInt(FV_SessionId,bookId,FP_PDFBookmark,True);

F_ApiSetInt(FV_SessionId,bookId,FP_PDFJobOption,6);

/* Sets "Body" to the highest Acrobat Bookmark level. */

pgfId = F_ApiGetNamedObject(docId, FO_PgfFmt, StringT("Body"));

F_ApiSetInt(docId, pgfId, FP_AcrobatLevel, 1);

F_ApiSimpleSave(docId, name, False);

/* Sets the save parameters so as to save as PDF and allow user to name file.*/

params = F_ApiGetSaveDefaultParams();

i = F_ApiGetPropIndex(&params, FS_FileType);

  1. params.val.propVal.u.ival = FV_SaveFmtPdf;

i = F_ApiGetPropIndex(&params, FP_PDFAllNamedDestinations);

  1. params.val.propVal.u.ival = (IntT)False;

i = F_ApiGetPropIndex(&params, FP_PDFJobOption);

  1. params.val.propVal.u.sval = F_StrCopyString ((StringT)"Smallest File Size");

/* Saves the book and all its components to one PDF file */

int_SaveID = F_ApiSave(bookId, StringT(strTargetFile), &params, &returnParams);

/* Close the open files.*/

F_ApiDeallocatePropVals(&params);

F_ApiDeallocatePropVals(returnParams);

CloseFile(bookId);

Can anyone suggest a way to reduce the size of the pdf file

Thanks,

Neeraja

    This topic has been closed for replies.