LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

pdfkit

Display and manipulate PDF documents using PDFKit. Use when embedding PDFView to show PDF files, creating or modifying PDFDocument instances, adding annotations (highlights, notes, signature widgets), extracting text with PDFSelection, navigating pages, generating thumbnails, filling PDF forms, or wrapping PDFView in SwiftUI.

836stars43forksUpdated 7/6/2026
Developer Tools#ios#pdf#mobile-development#swift#pdfkit

Security Assessment

Safe(100/100)
Security Score100/100

About pdfkit

A Swift reference for displaying and manipulating PDF documents with Apple's PDFKit, targeting Swift 6.3 and iOS 26+ (with PDFKit available from iOS 11 and across iPadOS, Mac Catalyst, macOS, tvOS, and visionOS). It requires no entitlements or Info.plist entries. The central UI type is PDFView, a UIView subclass that renders content and handles zoom, scroll, text selection, and page navigation out of the box, configurable through display modes (singlePage, singlePageContinuous, twoUp, twoUpContinuous), auto-scaling with min and max scale factors, page breaks, page shadows, and interpolation quality.

Document handling centers on PDFDocument, which loads from a URL or Data or can be created empty, unlocks password-protected files via isLocked and unlock(withPassword:), writes out (optionally with owner and user password options or as a data representation), and manipulates zero-based pages through insert, removePage, and exchangePage. Navigation includes go(to:), sequential and first/last helpers, back/forward history, PDFDestination points, and PDFViewPageChanged notifications. Text features cover synchronous findString search, asynchronous search via PDFDocumentDelegate, the iOS 16+ system find bar, text extraction (document and page string and attributedString, plus region-based selection), and highlighting search results through highlightedSelections.

Annotations are created with PDFAnnotation(bounds:forType:withProperties:) and added to a PDFPage, with worked examples for highlight, sticky text note, free text, and link annotations, plus the full list of subtypes (highlight, underline, strikeOut, text, freeText, ink, link, line, square, circle, stamp, widget). It also covers PDFThumbnailView for a linked thumbnail strip, SwiftUI integration, and includes common-mistakes and review-checklist sections. Use it when embedding a PDF viewer or programmatically reading, searching, or annotating PDFs on Apple platforms.

FAQ

What are the main PDFKit types it covers?

PDFView for display, PDFDocument for loading and manipulation, PDFPage, PDFAnnotation, PDFSelection for text search and selection, and PDFThumbnailView for thumbnails.

Does PDFKit require any entitlements or Info.plist entries?

No. PDFKit requires no entitlements or Info.plist entries; you simply import PDFKit.

How do you handle password-protected PDFs?

Check document.isLocked and call document.unlock(withPassword:); if it returns false, show a password prompt. Documents can also be written out with owner and user password options.

How do you search text in a document?

Synchronously with document.findString(_:withOptions:), which returns PDFSelections, or asynchronously via PDFDocumentDelegate; the iOS 16+ system find bar is enabled with pdfView.isFindInteractionEnabled.

What annotation types are supported?

Annotations are created via PDFAnnotation(bounds:forType:withProperties:), with subtypes including highlight, underline, strikeOut, text, freeText, ink, link, line, square, circle, stamp, and widget.

All Files

3 files
references/pdfkit-patterns.md23.4 KB
View
SKILL.md13.7 KB
View
evals/evals.json3.4 KB
View

Install pdfkit

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

dpearson2699/swift-ios-skills

Related Skills

research

448

secops-detection-engineering

21,346

qdrant-monitoring

259

project-architecture

3