Skip to content

Laomai-codefee/inklayer-react

Repository files navigation

InkLayer

InkLayer React

简体中文   |   English

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



InkLayer React 截图


✨ 特性

  • 🚀 PDF查看器 — 搜索、缩放、主题系统
  • 🖍️ PDF批注系统 — 文本标记、墨迹、图形、印章、签名
  • 💬 评论与审阅工作流
  • 💾 批注编辑与持久化模型
  • 📤 导出支持 — PDF / Excel
  • 🎨 可自定义 UI — 工具栏 / 侧边栏

📦 安装

npm install inklayer-react
# or
yarn add 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

查看完整组件 API → 📚 文档


🔗 相关项目


📄 许可证

MIT © InkLayer

About

A PDF annotation SDK built on PDF.js for React. 基于 PDF.js 构建的 React PDF 批注 SDK

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors