I have got PDF export of pages working (using kPDFExportCmdBoss), but I can't see how to export using one of the named PDF Presets (e.g. PDF/X-1a:2001).
I want to be able to set up a custom named PDF export preset, and then just export PDFs using that preset, so that if the output PDF needs different settings at some point in the future, this can be done by just editing the named preset.
Any advice on whether this is possible, and if so, how best to do it, will be much appreciated.
A snippet from my current code:
// get the export command
InterfacePtr<ICommand> pdfExportCmd(CmdUtils::CreateCommand(kPDFExportCmdBoss));
// get the export prefs interface
InterfacePtr<IPDFExportPrefs> iPDFExportPrefs(pdfExportCmd, IID_IPDFEXPORTPREFS);
// get the pages to export interface
InterfacePtr<IOutputPages> iOutputPages(pdfExportCmd, IID_IOUTPUTPAGES);
// get the output file interface
InterfacePtr<ISysFileData> iOutputFileData(pdfExportCmd, IID_ISYSFILEDATA);
// get the page UID
UID pageUID = iPageList->GetNthPageUID(fromPage-1); // zero for first page
// set the outputfile
iOutputFileData->Set(pageFile);
// set the page
iOutputPages->AppendOutputPageUIDRef(UIDRef(db,pageUID));
// set the preset in preferences
/**** This is the bit I can't see how to do *****/
// run the command
if (CmdUtils::ProcessCommand(pdfExportCmd) != kSuccess) {
ASSERT_FAIL("kPDFExportCmdBoss failed");
break;
}