iToverDose/Software· 23 APRIL 2026 · 12:05

Private PDF Viewing on macOS

A new approach to opening PDFs without leaving a digital footprint on macOS, leveraging advanced caching and rendering techniques

DEV Community1 min read0 Comments

The quest for privacy on macOS has led to the development of innovative solutions, particularly when it comes to viewing sensitive documents. Opening a PDF on a Mac typically leaves behind a trail of digital breadcrumbs, including records in Recent Documents, Finder's recent items, and various cache directories. However, a new viewer has been designed to circumvent these tracking mechanisms, ensuring that PDFs can be opened without leaving any trace.

How it Works

The viewer, dubbed Sanctuary Viewer, employs a multi-faceted approach to prevent any logging or caching of PDFs. On the Swift side, it overrides the NSDocumentController to prevent automatic registration of opened files. This is achieved through a custom implementation of the addToRecentDocuments method, which is intentionally left empty.

Blocking Disk Writes

To further prevent any disk writes, the viewer utilizes a memory-only approach, storing page caches and temporary files in RAM. When the viewer is closed, these temporary files are automatically deleted, and the in-memory cache is zeroed out. This ensures that no sensitive data is left behind on the disk.

The QuickLook Challenge

One of the most significant challenges in developing the Sanctuary Viewer was finding a way to bypass QuickLook, macOS's built-in preview feature. QuickLook automatically generates thumbnails and caches them in the ~/Library/Caches/com.apple.QuickLook.thumbnailcache directory. To overcome this, the viewer renders PDFs in memory using the Ghost Engine, never passing the file path to QuickLook or any other macOS API that could trigger caching.

Conclusion

The Sanctuary Viewer represents a significant advancement in private PDF viewing on macOS. By leveraging advanced caching and rendering techniques, it enables users to open and close PDFs without leaving any digital footprint. As the demand for privacy and security continues to grow, innovations like the Sanctuary Viewer will play an increasingly important role in protecting sensitive information.

AI summary

Discover a secure PDF viewer for macOS that prevents logging and caching, ensuring your sensitive documents remain private

Comments

00
LEAVE A COMMENT
ID #SKNECR

0 / 1200 CHARACTERS

Human check

2 + 7 = ?

Will appear after editor review

Moderation · Spam protection active

No approved comments yet. Be first.