0% found this document useful (0 votes)
16 views1 page

Solutions 32

This document discusses creating and manipulating master pages, spreads, and page items in InDesign. It describes how to get notified of changes to master spreads and pages by implementing a document observer for the spread list. It also outlines the steps to create an empty graphic frame on a page by determining the parent and bounding box, and using the appropriate IPathUtils method to generate the frame's path as a rectangle, oval, or polygon. Related APIs for these tasks include IMasterOverrideList, IMasterPage, IMasterSpread, kMasterPagesBoss, kPageBoss, IDocument, IObserver, and ISubject.

Uploaded by

Charana Studios
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Solutions 32

This document discusses creating and manipulating master pages, spreads, and page items in InDesign. It describes how to get notified of changes to master spreads and pages by implementing a document observer for the spread list. It also outlines the steps to create an empty graphic frame on a page by determining the parent and bounding box, and using the appropriate IPathUtils method to generate the frame's path as a rectangle, oval, or polygon. Related APIs for these tasks include IMasterOverrideList, IMasterPage, IMasterSpread, kMasterPagesBoss, kPageBoss, IDocument, IObserver, and ISubject.

Uploaded by

Charana Studios
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CHAPTER 1: Layout Page items 32

Related APIs

 IMasterOverrideList

 IMasterPage

 IMasterSpread

 kMasterPagesBoss

 kPageBoss

Getting notified of master spread and master page operations


Solution

Implement a document observer interested in IID_ISPREADLIST.

NOTE: This approach works for commands that create, delete, arrange, and copy spreads and pages but
not for all spread and page manipulations. For details of the subject you need to observe, see the API
documentation for the command used to perform the operation in which you are interested.

Related APIs

 IDocument

 IObserver

 ISubject

Page items
Creating a page item
Creating an empty graphic frame

Solution

1. Determine the UIDRef of the parent. The parent is the object that will own the frame. Normally, it is a
spread layer (see “Acquiring a reference to a spread layer”).

2. Determine the bounding box for the frame to position and size it as desired. Normally, frames are
positioned relative to a page (see “Acquiring a reference to a page”).

3. Create the frame by calling the IPathUtils method that creates the path you want:

 Use IPathUtils::CreateRectangleSpline to create a rectangular path.

 Use IPathUtils::CreateOvalSpline to create an elliptical path.

 Use IPathUtils::CreateRegPolySpline to create a regular polygon path.

You might also like