<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGPDFOperatorTableSetCallback(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGPDFOperatorTableSetCallback"
  },
  "title" : "CGPDFOperatorTableSetCallback(_:_:_:)"
}
-->

# CGPDFOperatorTableSetCallback(_:_:_:)

Sets a callback function for a PDF operator.

```
func CGPDFOperatorTableSetCallback(_ table: CGPDFOperatorTableRef, _ name: UnsafePointer<CChar>, _ callback: CGPDFOperatorCallback)
```

## Parameters

`table`

A PDF operator table.

`name`

The name of the PDF operator you want to set a callback for.

`callback`

The callback to invoke for the PDF operator specified by the `name` parameter.

## Discussion

You call the function [`CGPDFOperatorTableSetCallback(_:_:_:)`](/documentation/CoreGraphics/CGPDFOperatorTableSetCallback(_:_:_:)) for each PDF operator for which you want to provide a callback. See Appendix A in the *PDF Reference, Second Edition*, version 1.3, Adobe Systems Incorporated for a summary of PDF operators.

---

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)