<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/adjustPageWidthNew(_:left:right:limit:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(im)adjustPageWidthNew:left:right:limit:"
  },
  "title" : "adjustPageWidthNew(_:left:right:limit:)"
}
-->

# adjustPageWidthNew(_:left:right:limit:)

Overridden by subclasses to adjust page width during automatic pagination.

```
func adjustPageWidthNew(_ newRight: UnsafeMutablePointer<CGFloat>, left oldLeft: CGFloat, right oldRight: CGFloat, limit rightLimit: CGFloat)
```

## Parameters

`newRight`

Returns by indirection a new <doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct> value for the right edge of the pending page rectangle in the view’s coordinate system.

`oldLeft`

A <doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct> value that sets the left edge of the pending page rectangle in the view’s coordinate system.

`oldRight`

A <doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct> value that sets the right edge of the pending page rectangle in the view’s coordinate system.

`rightLimit`

The leftmost <doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct> value `newRight` can be set to, as calculated using the value of the [`widthAdjustLimit`](/documentation/AppKit/NSView/widthAdjustLimit) property.

## Discussion

This method is invoked by [`printView(_:)`](/documentation/AppKit/NSView/printView(_:)). The view can pull in the right edge and return the new value in `newRight`, allowing it to prevent items such as small images or text columns from being divided across pages. If `rightLimit` is exceeded, the pagination mechanism simply uses `rightLimit` for the right edge.

The default implementation of this method propagates the message to its subviews, allowing nested views to adjust page width for their drawing as well. An [`NSButton`](/documentation/AppKit/NSButton) object or other small view, for example, will nudge the right edge out if necessary to prevent itself from being cut in two (thereby pushing it onto an adjacent page). Subclasses should invoke `super`’s implementation, if desired, after first making their own adjustments.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)