Allow replacing the built-in PDF viewer (PDF.js) with alternative engines

Use case or problem

The current internal PDF viewer in Obsidian (based on PDF.js) has serious limitations, especially for non-Latin languages such as Arabic. The most notable issues include:

  • Extremely inaccurate text selection: selecting text often highlights the wrong lines, partial words, or even mismatched paragraphs.
  • Poor Arabic (RTL) support: Arabic letters are rendered disconnected, the direction is incorrect, and copying text leads to broken and unusable content.
  • Highlighting is difficult and unpredictable, making academic or study use cases painful.

These problems are caused by limitations in PDF.js, which was never fully optimized for RTL or complex language handling.

Proposed solution

Please allow users (or plugin developers) to choose or integrate an alternative internal PDF viewer engine in place of PDF.js.

Possible approaches:

  • Provide a plugin API to override or extend the built-in viewer.
  • Support embedding other open-source PDF engines such as MuPDF or PDFium, which offer better text extraction and RTL rendering.
  • Offer a modular system so users can toggle between PDF.js or another internal renderer.

This would make Obsidian much more usable for researchers and note-takers working in Arabic, Hebrew, Persian, Urdu, and other RTL languages.

Current workaround

  • Users must open PDFs in external tools (e.g. PDF XChange or Foxit Reader) to get accurate text selection and rendering.
  • Then they copy/paste the text manually back into Obsidian — this breaks the flow and defeats the purpose of integrated PDF reading.

Related issues / community demand

There are numerous community complaints and forum threads about poor RTL and PDF handling:

Platform

  • Obsidian version: [latest]
  • OS: [Windows/Mac/Linux]
  • PDF source: Mostly Arabic educational or scanned texts.

This change would open the door for multilingual and academic users to use Obsidian more effectively. Thank you!