← 插件

Office Reader

Jerry Liu5次安装

Fast, native PDF, Word, Excel, and PowerPoint reader for Paseo powered by LibreOffice and Poppler with persistent disk caching, background pre-rendering, native Excel parsing, and lightweight fallback.

$ paseo plugin add jerryliu369/office-reader
Office Reader 截图 1

该插件的概览尚未翻译为你的语言,因此以英文显示。

Fast, native PDF, Word, Excel, and PowerPoint preview panel for Paseo.

What it does

Office Reader adds an inline workspace file viewer for .pdf, .docx, .doc, .xlsx, .xls, .pptx, and .ppt files. It provides continuous vertical scrolling, page thumbnails, zoom controls, full-text PDF search, and a transparent selectable text layer so you can drag-select and copy text directly from rendered pages.

How it works

  • PDF, Word, and PowerPoint: Converts .docx, .doc, .pptx, and .ppt to PDF via LibreOffice (soffice) and renders pages on demand with Poppler (pdfinfo, pdftoppm, pdftotext -bbox-layout). Visible pages render immediately while adjacent pages (N+1, N+2, N-1) pre-render into a 64-page in-memory LRU cache. Converted PDFs are stored in a persistent disk cache (~/.paseo/cache/office-reader/, 256 MB LRU) keyed by file path, size, and modification time.
  • Excel: Parses .xlsx workbooks directly using a zero-dependency ZIP and XML reader with sheet tabs, column widths, merged cells, and windowed row pagination. Legacy .xls files convert through LibreOffice when available.
  • Automatic Fallback: If LibreOffice is unavailable or conversion fails, Office Reader switches to a lightweight XML and text preview with an explicit fallback badge.

Setup

  • Linux & macOS: LibreOffice (soffice, including libreoffice-math for OMML equations on Linux) and Poppler (pdfinfo, pdftoppm, pdftotext) should be available on the Paseo daemon host. Standard system and Homebrew paths are probed automatically, and custom locations can be set via OFFICE_READER_SOFFICE and OFFICE_READER_POPPLER_DIR.
  • Windows: Probes standard LibreOffice installation directories and PATH for Poppler. When soffice is absent on Windows, Office Reader automatically attempts PDF export via Microsoft Office COM automation (Word.Application / PowerPoint.Application) before falling back to lightweight preview.
  • OS Support: Linux (Ubuntu ARM64 with LibreOffice and Poppler) is verified in production; macOS and Windows path probing and Windows COM fallback are covered by unit tests.

Data & local processing

All document parsing, LibreOffice/COM conversion, Poppler rendering, text extraction, and caching run locally on the Paseo daemon host. No document contents or metadata are sent to external services.