pdfkit

Render and annotate PDF documents in SwiftUI apps with PDFView.

Updated May 10, 2026
One-click install
npx skills add https://github.com/FelixRauch/medat-figuren --skill pdfkit-felixrauch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdfkit
Source: https://github.com/FelixRauch/medat-figuren/tree/main/.agents/skills/pdfkit
Command: npx skills add https://github.com/FelixRauch/medat-figuren --skill pdfkit-felixrauch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you display PDF documents, navigate pages, and add highlights, notes, and links inside an iOS app—without building PDF rendering or annotation tooling from scratch.

Core Features & Use Cases

  • PDF display & navigation: Render documents with PDFView, jump to pages/destinations, and track page changes for UI updates.
  • Loading & document manipulation: Create PDFDocument instances from URLs/Data, inspect page counts, insert/remove/exchange pages, and write out updated documents.
  • Search, selection & extraction: Find strings synchronously/asynchronously, highlight matched selections, and extract full/page/region text.
  • Annotations & linking: Add highlight/text/free-text/link annotations to PDFPage using correct PDF coordinate space.
  • SwiftUI integration: Wrap PDFView in SwiftUI via UIViewRepresentable for modern UI composition.
  • Thumbnails & overlays: Generate thumbnails and place custom overlay views per page when standard annotations aren’t enough.

Quick Start

Use the pdfkit skill to render a local PDF file in a SwiftUI screen and enable page navigation with basic highlighting of a search term.

Frequently Asked Questions about pdfkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I display a PDF in SwiftUI and enable page navigation?

Display a PDF in SwiftUI by wrapping PDFView with UIViewRepresentable, enabling interactive document viewing and page change tracking for UI updates. You can jump to specific pages or destinations while rendering the document content natively.

How do I search for text in a PDF and highlight the results?

Search for text in a PDF using PDFDocument string finding methods synchronously or asynchronously, then highlight matched PDFSelection objects within the PDFView. This allows you to locate and visually mark search terms across document pages.

Can I add annotations and links to a PDF page in Swift?

Add annotations to a PDF page in Swift by creating PDFAnnotation objects for highlights, text, free-text, and links using the correct PDF coordinate space. This supports interactive document annotation workflows including linking to destinations.

Does PDFKit work with SwiftUI for modern iOS and iPadOS apps?

PDFKit works with SwiftUI by wrapping PDFView in a UIViewRepresentable for modern UI composition on iOS and iPadOS. It targets Swift 6.3 on modern Apple platforms, supporting interactive document viewing and thumbnail generation.

How do I manipulate PDF pages like inserting or removing them?

Manipulate PDF pages by loading a PDFDocument from a URL or Data object, then using methods to insert, remove, or exchange pages within the document. You can inspect page counts and write out the updated document to persist changes.

What is the best way to extract text from a specific PDF page or region?

Extract text from a PDF by using PDFPage and PDFSelection methods to pull full page content, text from specific regions, or entire document strings. This enables text extraction workflows for search indexing and content analysis.