Copy link to clipboard
Copied
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(¶ms, FS_FileType);
i = F_ApiGetPropIndex(¶ms, FP_PDFAllNamedDestinations);
i = F_ApiGetPropIndex(¶ms, FP_PDFJobOption);
/* Saves the book and all its components to one PDF file */
int_SaveID = F_ApiSave(bookId, StringT(strTargetFile), ¶ms, &returnParams);
/* Close the open files.*/
F_ApiDeallocatePropVals(¶ms);
F_ApiDeallocatePropVals(returnParams);
CloseFile(bookId);
Can anyone suggest a way to reduce the size of the pdf file
Thanks,
Neeraja
Have something to add?