You are on page 1of 1

CHAPTER 1: Layout Spreads and pages 19

Iterating through page content


You can iterate through page items on a page.

Solution

Use ISpread::GetItemsOnPage.

Sample code

 CHMLFiltImportProvider::LoadImage

 In the “Layout Fundamentals” chapter of Adobe InDesign Programming Guide, see the example entitled
“Code that Iterates through Spreads and Filters Items by Page via ISpread.”

Related APIs

 ISpread

 kPageBoss

Finding page size


Solution

If you have a reference to a page (kPageBoss), use IGeometry::GetStrokeBoundingBox to get the size of
each page.

If you have a reference to the document’s workspace (kDocWorkspaceBoss), use  IPageSetupPrefs to get
the default page size inherited by new pages.

Sample code

SnpModifyLayoutGrid

Related API

kPageBoss

Changing page size preference


You can change the default page size in a document.

Solution

Use kSetPageSetupPrefsCmdBoss to change the document page size. When the document page size and
orientation settings are changed, the changes are also applied to any pages whose size and orientation
matched the document settings prior to the change.

You might also like