• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

kPDFExportCmdBoss fails (error 9485)

Explorer ,
Dec 30, 2023 Dec 30, 2023

Copy link to clipboard

Copied

Hello All,

 

I am duplicating InDesing document and trying to export it as PDF, It works on all machine except one. We are getting error 9485, not sure what this is. Can some one help, why does command fails with error  9485. What is this error?

 

We are getting this error on Windows 10 Por and in InDesing 2023 & 2024 both.

 

I have added following code snippet for reference 

 

Thank You!!

Chetan Shinde

 

do {
    
    OverrideMasterItemsOnPages(duplicateDocument,dialogControlValues);
    
    // Create and set-up the numerous data interfaces on the PDF export command
    InterfacePtr<ICommand> PDFExportCmd(CmdUtils::CreateCommand(kPDFExportCmdBoss));
    if(!PDFExportCmd)
        break;
    
    // Not exporting a book; just the whole front document
    InterfacePtr<IBoolData> bookExportFlag(PDFExportCmd, IID_IBOOKEXPORT);
    if(!bookExportFlag) {
        break;
    }
    bookExportFlag->Set(kFalse);

    // Do this 'headless'
    InterfacePtr<IUIFlagData> uiFlagData(PDFExportCmd, IID_IUIFLAGDATA);
    if(!uiFlagData) {
        break;
    }
    uiFlagData->Set(kSuppressUI);
    
    // Identify pages to export
    UIDList pageUIDs(docDB);
    InterfacePtr<IPageList> iPageList((IPMUnknown*)duplicateDocument, IID_IPAGELIST);
    if(!iPageList) {
        break;
    }
        
    for (int32 iPage = pageStart; iPage < pageEnd; iPage++ )
    {
        UID uidPage = iPageList->GetNthPageUID(iPage);
        pageUIDs.Append( uidPage );
        pageHandleIndex++;
    }
        
    PDFExportCmd->SetItemList(pageUIDs);
    
    // Specify what pages to export for the command
    InterfacePtr<IOutputPages> iExportPages(PDFExportCmd, IID_IOUTPUTPAGES);
    if(!iExportPages) {
        break;
    }
    iExportPages->InitializeFrom(pageUIDs, kFalse);    // export reader spreads
    // Specify where we're exporting to
    InterfacePtr<ISysFileData> exportCmdFileData(PDFExportCmd, IID_ISYSFILEDATA);
    if(!exportCmdFileData) {
        break;
    }
    exportCmdFileData->Set(pdfFileOut);

    InterfacePtr<IPDFExportPrefs> exportPrefCmd(PDFExportCmd,     IID_IPDFEXPORTPREFS);
    if(!exportPrefCmd) {
        break;
    }
    exportPrefCmd->SetPDFExAcrobatCompatibilityLevel(IPDFExportPrefs::kPDFVersion13);
    exportPrefCmd->SetPDFExStandardsCompliance(IPDFExportPrefs::kExportNoStandardsCompliance);

    //General Export Preferences
    exportPrefCmd->SetPDFExReaderSpreads(IPDFExportPrefs::kExportReaderSpreadsOFF);
    exportPrefCmd->SetAddStructure(kFalse);//For Tagged PDF
    exportPrefCmd->SetPDFExThumbnails(IPDFExportPrefs::kExportThumbnailsOFF);
    exportPrefCmd->SetPDFExLinearized(IPDFExportPrefs::kExportLinearizedOFF);
    exportPrefCmd->SetIncludeLayers(kFalse);

    if(dialogControlValues.excludeHiddenLayers)
        exportPrefCmd->SetExportLayers(IPDFExportPrefs::kExportVisibleLayers);
    else
        exportPrefCmd->SetExportLayers(IPDFExportPrefs::kExportAllLayers);
    
    exportPrefCmd->SetIncludeBookmarks(kFalse);
    exportPrefCmd->SetNonprintingObjects(kFalse);
    exportPrefCmd->SetVisibleGuidesGrids(kFalse);
    exportPrefCmd->SetPDFExIncHyperLinks(IPDFExportPrefs::kExportIncHyperLinksOFF);
    exportPrefCmd->SetPDFExAddInteractiveElements(kFalse);
    
    //Compression Export Preferences
    exportPrefCmd->SetPDFExSampleColorImages(IPDFExportPrefs::kExportSampleImagesNone);
    exportPrefCmd->SetPDFExSampleGrayImages(IPDFExportPrefs::kExportSampleImagesNone);
    exportPrefCmd->SetPDFExSampleMonoImages(IPDFExportPrefs::kExportSampleImagesNone);

    exportPrefCmd->SetPDFExCompressLineArtAndText(IPDFExportPrefs::kExportCompressLineArtAndTextOFF);
    exportPrefCmd->SetPDFExDisallowImageCrop(IPDFExportPrefs::kExportDisallowImageCropOFF);
    //Crop & Bleed Marks
    exportPrefCmd->SetPDFExCropMarks(IPDFExportPrefs::kExportCropMarksOFF);
    exportPrefCmd->SetPDFExBleedMarks(IPDFExportPrefs::kExportBleedMarksOFF);
    exportPrefCmd->SetPDFExRegistrationMarks(IPDFExportPrefs::kExportRegistrationMarksOFF);
    exportPrefCmd->SetPDFExColorBars(IPDFExportPrefs::kExportColorBarsOFF);
    exportPrefCmd->SetPDFExPageInfo(IPDFExportPrefs::kExportPageInfoOFF);
    
    exportPrefCmd->SetUseDocumentBleed(kFalse);
    PMReal bleedValue(0.0);
    exportPrefCmd->SetPDFExBleedTop(bleedValue);
    exportPrefCmd->SetPDFExBleedInside(bleedValue);
    exportPrefCmd->SetPDFExBleedBottom(bleedValue);
    exportPrefCmd->SetPDFExBleedOutside(bleedValue);
    exportPrefCmd->SetIncludeSlug(kFalse);
    
    //Output Export preferences
    exportPrefCmd->SetPDFExColorSpace(IPDFExportPrefs::kExportPDFColorSpaceRGB);
    PMString profileName("");
    exportPrefCmd->SetPDFExDstProfileSelectorAndName(IPDFExportPrefs::kExportPDFDestProfileDocument,profileName);
    exportPrefCmd->SetPDFExIncludeICCProfiles(IPDFExportPrefs::kExportIncludeICCProfilesON);
    exportPrefCmd->SetPDFExSpotOverPrint(IPDFExportPrefs::kExportSimulatePress);
    
/////////////////////////////////////////Start Flattening PDF Preferences//////////////////////////////////////
    PMString flatternPresetname("MyPreset");
    flatternPresetname.SetTranslated();
    cmdErrCode = GetUniqueFlattenStyleName(flatternPresetname);

    cmdErrCode =  AddNewFlattenerStyle(flatternPresetname,dialogControlValues.imageResolution, dialogControlValues.seperate_graphics_and_images);
    if (cmdErrCode != kSuccess)
    {
        break;
    }
    exportPrefCmd->SetPDFExFlattenerStyleName(flatternPresetname);
    
    // process the command
    cmdErrCode = CmdUtils::ProcessCommand(PDFExportCmd);
    if (cmdErrCode != kSuccess)
        break;
    
    cmdErrCode =  DeleteNewFlattenerStyle(flatternPresetname);
    if (cmdErrCode != kSuccess)
        break;
    
    UpdateProgressBarTask(k_type_generate_data_for_export_end);
}while(kFalse);

 

Views

112

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jan 19, 2024 Jan 19, 2024

Error we were getting because of file out path set was invalid. replying here so that if anyone come across this error can have some input.

Thanks!!

Votes

Translate

Translate
Community Expert ,
Dec 30, 2023 Dec 30, 2023

Copy link to clipboard

Copied

@Chetan S 

 

I've moved your post from Using the Community (for questions about the forums) to the Adobe InDesign forum for you.

 

Jane

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 30, 2023 Dec 30, 2023

Copy link to clipboard

Copied

Thank You!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 19, 2024 Jan 19, 2024

Copy link to clipboard

Copied

LATEST

Error we were getting because of file out path set was invalid. replying here so that if anyone come across this error can have some input.

Thanks!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines