---
title: "documentCameraViewController(_:didFinishWith:)"
framework: visionkit
role: symbol
role_heading: Instance Method
path: "visionkit/vndocumentcameraviewcontrollerdelegate/documentcameraviewcontroller(_:didfinishwith:)"
---

# documentCameraViewController(_:didFinishWith:)

Tells the delegate that the user successfully saved a scanned document from the document camera.

## Declaration

```swift
optional func documentCameraViewController(_ controller: VNDocumentCameraViewController, didFinishWith scan: VNDocumentCameraScan)
```

## Parameters

- `controller`: The document camera view controller that captured the scan.
- `scan`: The scanned document that the camera detected.

## See Also

### Determining scan results

- [documentCameraViewControllerDidCancel(_:)](visionkit/vndocumentcameraviewcontrollerdelegate/documentcameraviewcontrollerdidcancel(_:).md)
- [documentCameraViewController(_:didFailWithError:)](visionkit/vndocumentcameraviewcontrollerdelegate/documentcameraviewcontroller(_:didfailwitherror:).md)
