ExtendScript to Save FM to PDF with PDFConvertCMYKtoRGB not working correctly
Hello,
I am trying to save a FM file to PDF from ExtendScript, but for some reason PDFConvertCMYKtoRGB doesn't work. The colors in the PDF produced are wrong.
I have manually checked and the ConvertCMYKtoRGB is definitely the setting that affects the color issue. Manually disabling this setting in the interface and saving to PDF from the interface produces the same colors in the PDF as below script.
var saveParams = GetSaveDefaultParams();
var saveReturnParams = new PropVals();
i = GetPropIndex(saveParams, Constants.FS_FileType);
saveParams[i].propVal.ival = Constants.FV_SaveFmtPdf;
i = GetPropIndex(saveParams, Constants.FS_PDFUseDistiller);
saveParams[i].propVal.ival = 0; // 1 has correct colors, but shows distiller dialog
i = GetPropIndex(saveParams, Constants.FS_AlertUserAboutFailure);
saveParams[i].propVal.ival = 1;
i = GetPropIndex(saveParams, Constants.FS_FileIsInUse);
saveParams[i].propVal.ival = Constants.FV_ResetLockAndContinue;
i = GetPropIndex(saveParams, Constants.FS_SaveFileNotWritable);
saveParams[i].propVal.ival = Constants.FV_DoShowDialog;
doc.PDFConvertCMYKtoRGB = 1;
doc.PDFDistillerAbsent = 1;
doc.PDFJobOption = "High Quality Print";
doc.PDFBookmark = 1;
doc.PDFBookmarksOpenLevel = Constants.FV_PDFBookmarksOpenDefaultLevel;
docProps = doc.GetProps();
for (i = 0; i < docProps.length; i++) {
// print props to check if PDFConvertCMYKtoRGB is set to 1
$.writeln(docProps[i].propIdent.num + " " + docProps[i].propVal.ival);
}
doc.Save(pdfName, saveParams, saveReturnParams);
Anyone know why this doesn't work ?
