Skip to content

Latest commit

 

History

History
148 lines (105 loc) · 3.41 KB

File metadata and controls

148 lines (105 loc) · 3.41 KB

InkLayer

InkLayer React

简体中文   |   English

🖊️ 基于 PDF.js 构建的 React PDF 查看与批注 SDK
用于快速构建文档审阅、批注与评论系统



InkLayer React Screenshot

⭐ 快速开始(推荐)

最快体验 InkLayer React 的方式:直接使用 官方 Starter 🚀

git clone https://github.com/Laomai-codefee/inklayer-react-starter.git
cd inklayer-react-starter
npm install
npm run dev

打开:

http://localhost:5173

💡 Starter 已内置完整 PDF 批注能力示例,无需额外配置即可体验 SDK 全功能。


✨ 特性

  • 🚀 PDF 查看器(缩放 / 搜索 / 主题)
  • 🖍️ PDF 批注系统(高亮 / 笔迹 / 图形 / 印章 / 签名)
  • 💬 评论与审阅流程
  • 💾 批注数据模型(可持久化)
  • 📤 导出能力(PDF / Excel)
  • 🎨 可自定义 UI(工具栏 / 侧边栏)

📦 安装

npm install inklayer-react

🚀 基础用法

PdfAnnotator(批注)

import { PdfAnnotator } from 'inklayer-react'
import 'inklayer-react/style'

export default function App() {
  return (
    <PdfAnnotator
      title="PDF Annotator"
      url="https://example.com/sample.pdf"
      user={{ id: 'u1', name: 'Alice' }}
      onSave={(annotations) => {
        console.log('Saved annotations:', annotations)
      }}
    />
  )
}

PdfViewer(查看器)

import { PdfViewer } from 'inklayer-react'
import 'inklayer-react/style'

export default function App() {
  return (
    <PdfViewer
      title="PDF Viewer"
      url="https://example.com/sample.pdf"
      layoutStyle={{ width: '100vw', height: '100vh' }}
    />
  )
}

📖 API 文档

👉 https://inklayer.dev/docs/react


🔗 相关项目


💬 反馈

有问题?想提建议?欢迎来 GitHub Discussions 聊聊,或者直接发邮件:codefee@foxmail.com

Bug 报告请走 GitHub Issues


📄 License

MIT © InkLayer