Skip navigation
suren_tringer
Currently Being Moderated

How to change the Document's Page size from plugin

Feb 27, 2012 10:00 PM

Tags: #indesign #plug-in

Hi friends,

 

I am try to change the document's page size from custom plugin. Any advise ? Any keywords? Please....

 
Replies
  • Currently Being Moderated
    Feb 28, 2012 12:28 AM   in reply to suren_tringer

    I am using kSetPageSizeCmdBoss.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 28, 2012 3:45 PM   in reply to suren_tringer

    Refer BscMEInvertFacade.cpp in sdksamples/basicme.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 29, 2012 3:17 PM   in reply to suren_tringer

    If you create a kUIPlugIn, try,

    IDocument* doc = Utils<ILayoutUIUtils>()->GetFrontDocument();

     

    InterfacePtr<ICommand> cmd(CmdUtils::CreateCommand(kSetPageSizeCmdBoss));

    InterfacePtr<IDocSetupCmdData> cmdData(cmd, IID_IDOCSETUPCMDDATA);

    PMRect pageRect(0, 0, width, height);

    cmdData->SetDocument(::GetUIDRef(doc));

    cmdData->SetPageSize(pageRect);

    /*

    // for kSetPageSetupPrefsCmdBoss

    InterfacePtr<IPageSetupPrefs> pageSetupPrefs(doc->GetDocWorkSpace(), UseDefaultIID());

    cmdData->Set(::GetUIDRef(doc),

              pageRect,

              pageSetupPrefs->GetNumPagesPref(),

              pageSetupPrefs->GetPagesPerSpreadPref(),

              pageSetupPrefs->GetWideOrientationPref(),

              pageSetupPrefs->GetPageBindingPref());

    */

    CmdUtils::ProcessCommand(cmd);

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points