---
title: "CGPDFScannerScan(_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgpdfscannerscan(_:)"
---

# CGPDFScannerScan(_:)

Parses the content stream of a PDF scanner object.

## Declaration

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

## Parameters

- `scanner`: The scanner object whose content stream you want to parse.

## Return Value

Return Value true if the entire stream is parsed successfully; false if parsing fails (for example, if the stream data is corrupted).

## Discussion

Discussion The function 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.

## See Also

### Parsing Content

- [CGPDFScannerGetContentStream(_:)](coregraphics/cgpdfscannergetcontentstream(_:).md)
