1 Reply Latest reply: Jan 4, 2012 2:38 AM by FarzanaArethwala RSS

    Issue in setting bleed to a document as InDesign CS5 Server plugin

    FarzanaArethwala Community Member

      Hello all,

      I am creating a new document in InDesign CS5 Server through C++ Plugin and trying to set bleed to the document. I have used the command to set bleed. But it doesn't seem to apply properly. I check in the debug version also. It show success to the command but when I open the document there is no bleed applied. I am using following command.

       

       

      InterfacePtr<ICommand> pageSetupPrefsCmd(CmdUtils::CreateCommand(kSetPageSetupPrefsCmdBoss));
      if(pageSetupPrefsCmd == nil)
      {
      CAlert::ErrorAlert("Error in SetDocumentBleed function, pageSetupPrefsCmd is nil.");
      break;
      }


      InterfacePtr<IDocSetupCmdData> docSetupData(pageSetupPrefsCmd, IID_IDOCSETUPCMDDATA);
      if(docSetupData == nil)
      {
      CAlert::ErrorAlert("Error in SetDocumentBleed function, docSetupData is nil.");
      break;
      }

      pageSetupPrefsCmd->SetItemList(UIDList(m_pDocument));
      docSetupData->SetDocument(::GetUIDRef(m_pDocument));
      docSetupData->SetNPagesPerSpread(1);
      docSetupData->SetPageSize(pagesRectangle);
      docSetupData->SetPageOrientationIsWide(bWide);
      docSetupData->SetUseUniformBleed(kFalse);
      docSetupData->SetBleedBox(bleedRect);
      ErrorCode error = CmdUtils::ProcessCommand(pageSetupPrefsCmd);
      if (error == kFailure)
      CAlert::WarningAlert("Command failed");

       

       

      Can some one please help me in letting me know what wrong I am doing in this command? This has become quiet critical for me.

       

      Thanks all in advance.

       

      Regards
      Farzana.