• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

Master Pages

Explorer ,
Aug 25, 2022 Aug 25, 2022

Copy link to clipboard

Copied

How to add master pages and it apply on pages in indesign document using indesign sdk functions by programatically.

For example , creating new document and add number of pages in it by using below code :

InterfacePtr<ICommand> newDocCmd(Utils<IDocumentCommands>()->CreateNewCommand(uiflags));

InterfacePtr<INewDocCmdData> newDocCmdData(newDocCmd, UseDefaultIID());

newDocCmdData->SetCreateBasicDocument(kFalse); 

newDocCmdData->SetNumPages(numPages);

 

I want to know about master pages like this...

TOPICS
SDK

Views

183

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
Community Expert ,
Sep 06, 2022 Sep 06, 2022

Copy link to clipboard

Copied

To create new masterspread you can use kNewMasterSpreadCmdBoss command. Within this boss class is an interface IMasterSpreadCmdData using which you can set the no. of pages, position and the base name of the master spread

Once the master spread is created then you can apply it to pages of your document. Do the following

  • Get the reference to the page to which you need to apply the master
  • Query its IMasterPage interface. this interface has a method SetMasterPageData that takes UID of the master page that needs to be applied

-Manan

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
Guide ,
Sep 11, 2022 Sep 11, 2022

Copy link to clipboard

Copied

There should also be some command to indirectly invoke SetMasterPageData.

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
Community Expert ,
Sep 12, 2022 Sep 12, 2022

Copy link to clipboard

Copied

LATEST

Very rightly pointed @Dirk Becker, that would be kApplyMasterSpreadCmdBoss

-Manan

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