<!--
{
  "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/CGPDFScannerScan(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGPDFScannerScan"
  },
  "title" : "CGPDFScannerScan(_:)"
}
-->

# CGPDFScannerScan(_:)

Parses the content stream of a PDF scanner object.

```
func CGPDFScannerScan(_ scanner: CGPDFScannerRef) -> Bool
```

## Parameters

`scanner`

The scanner object whose content stream you want to parse.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the entire stream is parsed successfully; <doc://com.apple.documentation/documentation/Swift/false> if parsing fails (for example, if the stream data is corrupted).

## Discussion

The function [`CGPDFScannerScan(_:)`](/documentation/CoreGraphics/CGPDFScannerScan(_:)) parses the PDF content stream associated with the scanner. Each time Core Graphics parses a PDF operator for which you register a callback, Core Graphics invokes your callback.

---

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)