# How to use `PDFium-rs`

PDFium-rs requires the PDFium dynamic library to be available:

- **Linux**: `libpdfium.so`
- **Windows**: `pdfium.dll`
- **macOS**: `libpdfium.dylib`

See the main `README.md` how to obtain and install for your system.

## Render pages to images

File: `render_pages.rs`

Run with: `cargo run --example render_pages`

- Renders all pages from a PDF document as individual JPEG images.

## Import pages from another document

File: `import_pages.rs`

Run with: `cargo run --example import_pages`

- Demonstrates importing PDF pages using
  - *string*-based page specification
  - *index*-based page specification

## Handling text inside documents

File: `text_extract_search.rs`

Run with: `cargo run --example text_extract_search`

- Demonstrates extracting text from PDF documents
- Demonstrates text search functionality within a PDF document

## Rotating pages

File: `rotations.rs`

Run with: `cargo run --example rotations`

- Demonstrates rotating pages in the document
- Demonstrates specifying rotation parameters to render operations
