FleurPDF

by JC5
5
4
3
2
1
Score: 50/100

Description

The FleurPDF plugin adds PDF highlighting, underlining and comments with text selection tuned for Chinese and other CJK content. Highlights appear at the selected position and can use custom colours, while underlines support solid, dashed, dotted or wavy styles. A sidebar lists annotations for inline editing, deletion and export to a note organised by PDF page number. Optional AI actions can explain selected passages, translate between Chinese and English, answer questions and generate annotations for highlights through DeepSeek, OpenAI or another OpenAI compatible API. Provider settings include an API key and custom base URL, with the key stored locally except when API calls are made. Text selection can fail while the PDF text layer is loading or when a selection crosses multiple pages.

Reviews

No reviews yet.

Stats

1
stars
86
downloads
0
forks
5
days
2
days
2
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
29
commits

Latest Version

2 days ago

Changelog

1.3.2 — Fix PDF annotation persistence

Bug Fixes

  • Fix: PDF annotations disappear after closing/reopening — The core issue was text matching failure in the textLayer
  • Root cause: Kangxi Radicals (U+2F00–U+2FD5) vs standard CJK (U+4E00–U+9FFF) encoding mismatch — PDF.js returns Kangxi Radicals for some Chinese text, while saved annotation text uses standard CJK characters
  • Fix: Use NFKC Unicode normalization for cross-encoding text matching
  • Fix: Remove space insertion between text nodes (broke CJK matching — Chinese text has no inter-word spaces)
  • Fix: Add retry mechanism with exponential backoff (500ms → 1s → 2s → 3s → 5s, max 6 attempts)
  • Fix: Async wait for textLayer to be rendered before matching

Community Review Compliance

  • All style.xxx =setCssStyles() / setCssProps()
  • All eslint-disable comments have descriptions
  • All setTimeoutwindow.setTimeout
  • localStorageplugin.settings
  • vault.deletevault.trash

Security

  • Added data.json to .gitignore to prevent API key leaks

README file from

Github

FleurPDF

Smart PDF Reading and Annotation Plugin for Obsidian

中文文档


✨ Features

Why Choose FleurPDF Over Other PDF Plugins?

  1. Chinese-Friendly Design

    • Optimized text selection for Chinese characters
    • Proper handling of CJK text in PDFs
    • Smart text boundary detection
  2. WYSIWYG Highlights with AI Annotations

    • What you see is what you get - highlights appear exactly where you select
    • AI can automatically generate insightful annotations for highlighted text
    • Visual feedback is immediate and accurate
  3. AI-Powered Assistance

    • AI Explain: Get detailed explanations of selected text
    • AI Translation: Instant translation between Chinese and English
    • AI Annotations: Auto-generate thoughtful notes for your highlights
    • Supports any OpenAI-compatible API (DeepSeek, OpenAI, etc.)
  4. One-Click Note Export

    • Export all annotations and highlights to a new Obsidian note
    • Preserves page numbers and organization
    • Perfect for creating reading summaries

Complete Feature List

  • 📝 Highlighting: Yellow, blue, green, and customizable colors
  • 📏 Underlining: Solid, dashed, dotted, or wavy styles
  • 💬 Comments: Add personal notes to any text selection
  • 🤖 AI Features:
    • Explain complex passages
    • Translate text
    • Generate intelligent annotations
    • Interactive Q&A about selected content
  • 📊 Sidebar: View and manage all annotations in one place
  • 📤 Export: One-click export to Obsidian notes
  • 🎨 Customizable: Adjust colors, styles, and AI settings

📦 Installation

Manual Installation

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create a folder <vault>/.obsidian/plugins/fleur-pdf/
  3. Place the three files into the folder
  4. Reload Obsidian
  5. Enable "FleurPDF" in Settings → Community plugins

Build from Source

git clone https://github.com/gibsonchan-5/fleur-pdf.git
cd fleur-pdf
npm install
npm run build

Then copy main.js, manifest.json, and styles.css to your vault's plugin folder.

🔧 Configuration

AI Setup

  1. Open Obsidian Settings → FleurPDF
  2. Choose your AI provider (DeepSeek, OpenAI, or Custom)
  3. Enter your API Key (stored locally only)
  4. Configure the Base URL if using a custom endpoint
  5. Click "Test Connection" to verify

Security Note: Your API Key is stored locally in Obsidian's data and never leaves your device except when making API calls.

Annotation Settings

  • Default Highlight Color: Choose your preferred highlight color
  • Default Underline Style: Select solid, dashed, dotted, or wavy
  • Note Export Folder: Specify where exported notes should be saved
  • Sidebar Position: Choose left or right sidebar

📖 Usage Guide

Basic Annotations

  1. Select Text: Click and drag to select text in the PDF
  2. Right-Click Menu: Choose from the following options:
    • Highlight: Add a colored background to the text
    • Underline: Add an underline with various styles
    • Comment: Add a personal annotation
    • Ask AI: Get AI explanation of the selected text
    • AI Translation: Translate the text instantly

AI Features

AI Explain

Select text → Right-click → "Ask AI" → Get detailed explanation with:

  • Key concept definitions
  • Background context
  • Deep analysis
AI Translation

Select text → Right-click → "AI Translation" → Instant bidirectional translation (Chinese ↔ English)

AI Annotations

Highlight text → Click the 💡 icon in sidebar → AI generates intelligent annotations automatically

Managing Annotations

The sidebar shows all your annotations:

  • 📌 View all highlights and comments
  • ✏️ Edit annotations inline
  • 🗑️ Delete unwanted items
  • 💾 Export everything to a note

Exporting Notes

Click "Export Notes" in the sidebar to create a new Obsidian note with:

  • All highlights with page numbers
  • All comments and annotations
  • Organized by page for easy reference

🛠️ Development

Project Structure

fleur-pdf/
├── src/
│   ├── main.ts           # Plugin entry point
│   ├── patcher.ts        # PDF view interception
│   ├── sidebar.ts        # Annotation sidebar
│   ├── ai-chat-modal.ts  # AI dialog panel
│   ├── ai-service.ts     # AI API service
│   ├── settings.ts       # Settings panel
│   └── store.ts          # Data persistence
├── manifest.json
├── package.json
└── styles.css

Build Commands

npm run build      # Build for production
npm run dev        # Development mode with watch

🐛 Troubleshooting

"Text not found" Error

This can happen when:

  • The PDF text layer is not fully loaded
  • You're selecting across multiple pages

Solution: Wait a moment after selecting text, or try selecting again.

AI Not Responding

Check:

  • API Key is correctly configured
  • Base URL is accessible
  • Internet connection is stable

Use the "Test Connection" button to verify your setup.

📝 License

MIT License

🤝 Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.


中文文档

✨ 功能特色

为什么选择 FleurPDF?

  1. 中文友好

    • 针对中文字符优化的文本选择
    • 正确处理 PDF 中的中日韩文字
    • 智能文本边界检测
  2. 所见即所得的高亮 + AI 批注

    • 高亮效果所见即所得,精确显示在选中的位置
    • AI 可以自动为高亮文本生成有见地的批注
    • 视觉反馈即时且准确
  3. AI 智能助手

    • AI 解释:获取选中文本的详细解释
    • AI 翻译:中英文即时互译
    • AI 批注:为高亮内容自动生成智能批注
    • 支持任何 OpenAI 兼容 API(DeepSeek、OpenAI 等)
  4. 一键导出笔记

    • 将所有批注和高亮导出为新的 Obsidian 笔记
    • 保留页码和结构组织
    • 非常适合创建阅读摘要

完整功能列表

  • 📝 高亮标注:黄色、蓝色、绿色等多种可自定义颜色
  • 📏 下划线:实线、虚线、点线、波浪线等多种样式
  • 💬 批注:为任何选中文本添加个人注释
  • 🤖 AI 功能
    • 解释复杂段落
    • 翻译文本
    • 生成智能批注
    • 针对选中内容进行互动问答
  • 📊 侧边栏:在一个地方查看和管理所有批注
  • 📤 导出:一键导出为 Obsidian 笔记
  • 🎨 可定制:调整颜色、样式和 AI 设置

📦 安装方法

手动安装

  1. latest release 下载 main.jsmanifest.jsonstyles.css
  2. 创建文件夹 <vault>/.obsidian/plugins/fleur-pdf/
  3. 将三个文件放入该文件夹
  4. 重新加载 Obsidian
  5. 在设置 → 第三方插件中启用"FleurPDF"

从源码构建

git clone https://github.com/gibsonchan-5/fleur-pdf.git
cd fleur-pdf
npm install
npm run build

然后将 main.jsmanifest.jsonstyles.css 复制到你的仓库的插件文件夹。

🔧 配置说明

AI 设置

  1. 打开 Obsidian 设置 → FleurPDF
  2. 选择 AI 提供商(DeepSeek、OpenAI 或自定义)
  3. 输入 API Key(仅保存在本地
  4. 如果使用自定义端点,配置 Base URL
  5. 点击"测试连接"验证设置

安全说明:您的 API Key 仅保存在 Obsidian 本地数据中,除调用 API 外不会离开您的设备。

批注设置

  • 默认高亮颜色:选择您偏好的高亮颜色
  • 默认下划线样式:选择实线、虚线、点线或波浪线
  • 笔记导出文件夹:指定导出笔记的保存位置
  • 侧边栏位置:选择左侧或右侧边栏

📖 使用指南

基础批注

  1. 选中文本:在 PDF 中点击并拖动选择文本
  2. 右键菜单:从以下选项中选择:
    • 高亮:为文本添加彩色背景
    • 划线:添加各种样式的下划线
    • 批注:添加个人注释
    • 询问 AI:获取选中内容的 AI 解释
    • AI 翻译:即时翻译文本

AI 功能

AI 解释

选中文本 → 右键 → "询问 AI" → 获取详细解释,包括:

  • 关键概念定义
  • 背景信息
  • 深度分析
AI 翻译

选中文本 → 右键 → "AI 翻译" → 即时双向翻译(中文 ↔ 英文)

AI 批注

高亮文本 → 点击侧边栏的 💡 图标 → AI 自动生成智能批注

管理批注

侧边栏显示您的所有批注:

  • 📌 查看所有高亮和批注
  • ✏️ 内联编辑批注
  • 🗑️ 删除不需要的项目
  • 💾 全部导出为笔记

导出笔记

点击侧边栏中的"导出笔记"创建新的 Obsidian 笔记,包含:

  • 所有高亮及页码
  • 所有批注和注释
  • 按页码组织,便于查阅

🐛 故障排除

"未找到选中文本"错误

可能发生在:

  • PDF 文本层未完全加载
  • 跨页选择文本

解决方法:选中文本后稍等片刻,或重新选择。

AI 无响应

检查:

  • API Key 配置正确
  • Base URL 可访问
  • 网络连接稳定

使用"测试连接"按钮验证您的设置。

📝 许可证

MIT 许可证

🤝 贡献

欢迎贡献!请随时提交 issue 或 pull request。

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
DeepL
4 years ago by Till Friebe
DeepL for Obsidian.
Code Preview
4 years ago by Hank
Obsidian code block render by file path
Codeblock Customizer
3 years ago by mugiwara
Codeblock Customizer plugin for Obsidian
Ring a secretary
3 years ago by vorotamoroz
Copilot
3 years ago by Logan Yang
THE Copilot in Obsidian
Pieces for Developers
3 years ago by Pieces For Developers
Pieces' powerful extension for Obsidian-MD that allows users to access their code snippets directly within the Obsidian workspace
Code Styler
3 years ago by Mayuran Visakan
A plugin for Obsidian.md for styling codeblocks and inline code
Keyword Highlighter
3 years ago by Marcel Goldammer
Automatically highlight specified keywords within your Obsidian notes for enhanced visibility and quick reference.
MantouAI
2 years ago by Morino Pan
MantouAI—— 让Obsidian变身智能助手
Multilingual
2 years ago by leolazou
An plugin for Obsidian that translates note names to ease linking across many languages.
Dictionary translator
2 years ago by Grover
我可以帮助你翻译单词或句子,听新单词或句子的录音,甚至录下自己的发音,以内部链接的形式保存到你的笔记中。
GDScript Syntax Highlighting
2 years ago by RobTheFiveNine
Adds live GDScript syntax highlighting to code blocks in the Obsidian editor.
Rapid AI
2 years ago by Rapid AI
AI Assistant for selected text and generating content with Markdown. Shortcuts and quick action buttons provide instant AI assistance. It provides a high availability API for unlimited Chat GPT request rates, so you can ensure smooth work for any workload.
Annotator
5 years ago by Elias Sundqvist
A plugin for reading and annotating PDFs and EPUBs in obsidian.
Highlightr
5 years ago by Chetachi
A minimal and aesthetically pleasing highlighting menu that makes color-coded highlighting much easier 🎨.
Memodack
2 years ago by Pavlo Kobyliatskyi
Your second language memory tool
CAO
2 years ago by Godot
Claude AI for Obsidian
Papyrus
2 years ago by André Silva, Daniel Guerra, Diogo Ferreira, Eduardo Barrancos
hello nemesis
2 years ago by Dian
Extended Markdown Syntax
a year ago by Kotaindah55
Extend your Markdown syntax using delimiters instead of HTML tags, such as underlining, superscript, subscript, highlighting, and spoiler.
Sentence Rhythm
a year ago by Adam Fletcher
Obsidian plugin added toggleable colored highlights to sentences based on their length
BibLib
a year ago by Callum Alpass
Obsidian-based reference and literature note manager.
PDF Printer
a year ago by cubexy
Obsidian plugin that converts PDF documents to images directly in your notes without external dependencies.
Monokakido Copilot
a year ago by NoHeartPen
Double press the Option key to search with Dictionaries by Monokakido.This plugin is not affiliated with MONOKAKIDO Co. Ltd. (JAPAN).
Vault LLM Assistant
a year ago by Brians Tjipto
An obsidian notebook plugin that uses LLM (OpenAI or Gemini) to answer questions and create new notes about your vault
deepseek-ai-assistant
a year ago by algernon
Publish Note to Mowen Note
a year ago by ziyou
This is a mowen plugin for Obsidian (https://obsidian.md)
Long sentence highlighter
a year ago by Robert Meißner
VaultAI
a year ago by Tharushka Dinujaya
An AI chatbot plugin for Obsidian using the Gemini API for note summarization, content generation, and more. Enhance your workflow with AI assistance like the Notion AI bot.
Always Color Text
a year ago by Kazi Aidah Haque
Automatically colors texts across the Obsidian Vault!
DOCX Exporter
8 months ago by Kanshurichard
An Obsidian plug-in, aiming to help users easily export note content into DOCX format.
AI Companion
8 months ago by Kowshik
An Obsidian plugin that provides AI assistance using OpenAI's API, triggered by the `/ai` slash command.
Agent Client
3 months ago by rait-09
Bring AI agents into Obsidian via Agent Client Protocol (ACP), such as Claude Code, Codex and Gemini CLI.
PDF++
3 months ago by ryotaushio
PDF++: the most Obsidian-native PDF annotation & viewing tool ever. Comes with optional Vim keybindings.
LearnKit
2 months ago by William Guy
A native study system for your Obsidian vault. LearnKit turns notes into durable knowledge with flashcards, spaced repetition, reviews, tests, and AI tools.
SystemSculpt AI
2 months ago by systemsculpt
Enhance your Obsidian App experience with AI-powered tools for note-taking, task management, and much, MUCH more.
Codex Panel
a month ago by murashit
Codex in your sidebar. ChatGPT Work for your Obsidian vault.
LLM Hub
a month ago by TAKESHI MORITA
Obsidian plugin for AI chat, workflow automation, and semantic search — supports Gemini, OpenAI, OpenRouter, Grok, Ollama, and CLI backends
Claudian Plus
25 days ago by wuyifan-code
Bible Reference
25 days ago by tim-hub
Take Bible Study notes easily in the popular note-taking app Obsidian, with automatic verse and reference suggestions.
Gemini Helper
24 days ago by TAKESHI MORITA
AI chat, workflow automation, semantic search (RAG), LLM Wiki (OKF) powered by Google Gemini. Works on both desktop and mobile.