# PDF viewer

Canonical page: https://docs.ovok.com/native-sdk/guide/modules/pdf

Use `PDFViewer` when a mobile screen needs to display a PDF document. Import it from
the `pdf` subpath so apps that do not use PDF rendering do not need to reference this
feature. The application remains responsible for obtaining the document URL or file
and enforcing access to it.

```tsx
import { PDFViewer } from "@ovok/native/pdf";

<PDFViewer
  sourceURI={documentUrl}
  onLoadComplete={(pages, path) => setPageCount(pages)}
  onError={handleDocumentError}
/>
```

Install and configure the `react-native-pdf` peer dependency using its platform
setup instructions. For authenticated files, provide a URL or headers supported by
the viewer and avoid logging signed URLs. Give users a retry or an alternate download
path when loading fails.

## References [#references]

- [PDFViewer props and callbacks](/native-sdk/guide/components/pdf/pdf-viewer/)
- [PDF module reference](/native-sdk/guide/components/pdf/)
- [Installation and peer dependencies](/native-sdk/guide/how-to/installation)

## API reference [#api-reference]

Every export of `@ovok/native/pdf`, with signatures, props and types, is in the [`pdf` API reference](/native-sdk/reference/pdf).
