# How-to guides | PDFluent Rust PDF SDK

Source: https://pdfluent.com/how-to/

How-to guides

# PDF how-to guides in Rust

Step-by-step guides for PDF operations in Rust. Each guide includes working code, common pitfalls, and related resources.

Just need to edit a PDF? [The PDFluent Editor is free](https://pdfluent.com/guides/).

## Merge & Split

[Merge PDFs in Rust](https://pdfluent.com/how-to/pages/#merge-pdfs-rust)[Split PDF by page range](https://pdfluent.com/how-to/pages/#split-pdf-by-page-range-rust)[Split PDF by bookmark](https://pdfluent.com/how-to/pages/#split-pdf-by-bookmark-rust)[Extract pages from a PDF](https://pdfluent.com/how-to/pages/#extract-pdf-pages-rust)[Merge PDFs with table of contents](https://pdfluent.com/how-to/pages/#merge-pdfs-with-toc-rust)

## Text Extraction

[Extract text from a PDF](https://pdfluent.com/how-to/text/#extract-text-pdf-rust)[Extract text with positions](https://pdfluent.com/how-to/text/#extract-text-with-position-rust)[Extract tables from a PDF](https://pdfluent.com/how-to/text/#extract-tables-pdf-rust)[Extract text page by page](https://pdfluent.com/how-to/text/#extract-text-by-page-rust)[Search text in a PDF](https://pdfluent.com/how-to/text/#search-text-in-pdf-rust)[Compare PDF text content](https://pdfluent.com/how-to/text/#compare-pdf-text-content-rust)

## Forms

[Fill PDF form fields](https://pdfluent.com/how-to/forms/#fill-pdf-form-rust)[Flatten PDF form fields](https://pdfluent.com/how-to/forms/#flatten-pdf-form-rust)[Read form field values](https://pdfluent.com/how-to/forms/#read-pdf-form-fields-rust)[Fill XFA form data](https://pdfluent.com/how-to/forms/#fill-xfa-form-rust)[Parse XFA form data](https://pdfluent.com/how-to/forms/#parse-xfa-data-rust)

## Rendering

[Render PDF to PNG](https://pdfluent.com/how-to/render/#render-pdf-to-png-rust)[Render PDF to JPEG](https://pdfluent.com/how-to/render/#render-pdf-to-jpeg-rust)[Generate page thumbnails](https://pdfluent.com/how-to/render/#generate-pdf-thumbnails-rust)

## Metadata

[Read PDF metadata](https://pdfluent.com/how-to/metadata/#read-pdf-metadata-rust)[Write PDF metadata](https://pdfluent.com/how-to/metadata/#write-pdf-metadata-rust)[Add XMP metadata](https://pdfluent.com/how-to/metadata/#add-xmp-metadata-pdf-rust)

## PDF/A & Archiving

[Validate PDF/A compliance](https://pdfluent.com/how-to/pdfa/#validate-pdf-a-rust)[Convert PDF to PDF/A](https://pdfluent.com/how-to/pdfa/#convert-to-pdf-a-rust)[Check PDF/A conformance level](https://pdfluent.com/how-to/pdfa/#validate-pdf-a-conformance-rust)[Fix PDF/A validation errors](https://pdfluent.com/how-to/pdfa/#fix-pdf-a-validation-errors-rust)[Add PDF/A output intent](https://pdfluent.com/how-to/pdfa/#convert-to-pdf-a-rust)

## Security & Encryption

[Encrypt a PDF](https://pdfluent.com/how-to/security/#encrypt-pdf-rust)[Decrypt a PDF](https://pdfluent.com/how-to/security/#decrypt-pdf-rust)[Set a PDF password](https://pdfluent.com/how-to/security/#set-pdf-password-rust)[Remove a PDF password](https://pdfluent.com/how-to/security/#remove-pdf-password-rust)[Open a password-protected PDF](https://pdfluent.com/how-to/security/#open-pdf-with-password-rust)[Set PDF permissions](https://pdfluent.com/how-to/security/#set-pdf-permissions-rust)[Check PDF permissions](https://pdfluent.com/how-to/security/#check-pdf-permissions-rust)

## Digital Signatures

[Add a digital signature](https://pdfluent.com/how-to/signing/#add-digital-signature-pdf-rust)[Verify a digital signature](https://pdfluent.com/how-to/signing/#verify-pdf-signature-rust)[Read signature information](https://pdfluent.com/how-to/signing/#read-pdf-signature-info-rust)

## Annotations

[Read annotations from a PDF](https://pdfluent.com/how-to/annotations/#read-annotations-pdf-rust)

## Redaction

[Redact text from a PDF](https://pdfluent.com/how-to/redaction/#redact-pdf-rust)[Redact text by regex pattern](https://pdfluent.com/how-to/redaction/#redact-pdf-by-pattern-rust)[GDPR-compliant redaction](https://pdfluent.com/how-to/redaction/#gdpr-pdf-redaction-rust)

## Document Structure

[Add bookmarks to a PDF](https://pdfluent.com/how-to/annotations/#add-bookmarks-pdf-rust)[Read bookmarks from a PDF](https://pdfluent.com/how-to/annotations/#read-bookmarks-pdf-rust)[Get page count](https://pdfluent.com/how-to/pages/#get-pdf-page-count-rust)[Get page dimensions](https://pdfluent.com/how-to/pages/#get-pdf-page-dimensions-rust)[Rotate PDF pages](https://pdfluent.com/how-to/pages/#rotate-pdf-pages-rust)[Insert pages into a PDF](https://pdfluent.com/how-to/pages/#insert-pages-pdf-rust)[Delete pages from a PDF](https://pdfluent.com/how-to/pages/#delete-pdf-pages-rust)[Reorder PDF pages](https://pdfluent.com/how-to/pages/#reorder-pdf-pages-rust)

## Optimization

[Compress a PDF](https://pdfluent.com/how-to/files/#compress-pdf-rust)[Linearize a PDF](https://pdfluent.com/how-to/metadata/#linearize-pdf-rust)[Subset fonts in a PDF](https://pdfluent.com/how-to/fonts/#subset-fonts-pdf-rust)[Check if a PDF is linearized](https://pdfluent.com/how-to/metadata/#check-pdf-is-linearized-rust)

## Fonts

[Check for missing fonts](https://pdfluent.com/how-to/fonts/#check-missing-fonts-pdf-rust)

## Images

[Embed an image in a PDF](https://pdfluent.com/how-to/render/#embed-image-in-pdf-rust)

## Content Editing

[Replace text in a PDF](https://pdfluent.com/how-to/text/#replace-text-in-pdf-rust)

## Watermarks & Stamps

[Add a text watermark](https://pdfluent.com/how-to/stamps/#add-text-watermark-pdf-rust)[Add a stamp to a PDF](https://pdfluent.com/how-to/stamps/#stamp-pdf-rust)

## Attachments

[Attach a file to a PDF](https://pdfluent.com/how-to/files/#attach-file-to-pdf-rust)[Extract attachments](https://pdfluent.com/how-to/files/#extract-attachments-pdf-rust)

## E-Invoicing

[Create a ZUGFeRD/Factur-X invoice](https://pdfluent.com/how-to/einvoice/#create-e-invoice-pdf-rust)[Extract invoice XML from a PDF](https://pdfluent.com/how-to/einvoice/#extract-invoice-xml-pdf-rust)

## Cloud & Serverless

[Process PDFs on AWS Lambda](https://pdfluent.com/how-to/deploy/#process-pdfs-aws-lambda-rust)[Run PDFluent in Docker](https://pdfluent.com/how-to/deploy/#process-pdfs-docker-rust)[Batch process PDFs in parallel](https://pdfluent.com/how-to/deploy/#batch-process-pdfs-rust)[Process PDFs in WebAssembly](https://pdfluent.com/how-to/deploy/#pdf-processing-wasm-rust)

## PDF Generation

[Generate a PDF from HTML](https://pdfluent.com/how-to/files/#generate-pdf-from-html-rust)

## Document Info

[Read the PDF version](https://pdfluent.com/how-to/metadata/#read-pdf-version-rust)

## Error Recovery

[Repair a corrupted PDF](https://pdfluent.com/how-to/files/#repair-corrupted-pdf-rust)

## AI Extraction (Preview)

[Extract text and tables for RAG/LLM](https://pdfluent.com/how-to/extraction/#extract-text-for-rag-rust-python-node)[Convert DOCX/PPTX/XLSX/HTML to Markdown](https://pdfluent.com/how-to/office-markdown/#convert-docx-pptx-xlsx-html-to-markdown-preview)[Using the PyMuPDF API compat layer](https://pdfluent.com/how-to/pymupdf-compat/#pymupdf-style-api-preview)[Markdown/JSON/Docling-compatible output](https://pdfluent.com/how-to/extraction-formats/#extraction-output-formats-preview)
