
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
@zys/pdf-reader
Advanced tools
vue3 编写的 pdf 阅读器
pnpm install @zys/pdf-reader
<template>
<div class='App abs-content'>
<pdfReader :src="pdf"></pdfReader>
</div>
</template>
<script setup lang="ts">
import "@zys/pdf-reader/style.css"
import pdfReader, { GlobalWorkerOptions } from "@zys/pdf-reader"
import workerUrl from "@zys/pdf-reader/pdf.worker.mjs?url"
import pdf from "./test1.pdf?url"
GlobalWorkerOptions.workerSrc = workerUrl
</script>
<style scoped lang="less">
.App {}
</style>
| 属性名 | 类型 | 说明 |
|---|---|---|
| src | string | pdf地址 |
| vertical | boolean | 是否垂直模式 |
| fixedOutline | boolean | 是否固定大纲 |
| swiper | Swiper | SwiperJs |
| swiperOptopns | SwiperJsOptions | SwiperJsOptions |
| outline | any[] | 大纲 |
| numPages | number | 总页数 |
| currentPage | number | 当前页码 |
| annotations | Record<string | number, string |
| currentDrauu | Drauu | - |
| currentDrauuOptopns | CurrentDrauuOptopns | - |
| container | HTMLDivElement | - |
| showOutline | boolean | 是否显示大纲 |
| isShowThumbnailList | boolean | 是否显示缩略图 |
| isOpenDrauu | boolean | 是否开启批注 |
| PDFDocumentProxy | pdf文档代理或实例 | |
| thumbnailLists | any[] | 缩略图列表 |
| getThumbnailLists | ()=>any | 获取缩略图列表。默认不执行,还未实现 |
| prevPage | ()=>void | 切换上一页 |
| nextPage | ()=>void | 切换下一页 |
| showTools | boolean | 是否显示地步操作工具页 |
| 事件名 | 说明 |
|---|---|
| change | 当前页码生命周期回调 |
| 名称 | 类型或参数 | 说明 |
|---|---|---|
| tool | - | - |
| 属性名 | 类型 | 说明 |
|---|---|---|
| mode | 'draw' 、 'stylus' 、 'line' 、 'rectangle' 、 'ellipse' 、 'eraseLine' | 模式 |
| color | number | 颜色 |
| size | number | 粗细 |
| 功能 | 状态 | 说明 |
|---|---|---|
| 缩放 | ✅ | - |
| 翻页 | ✅ | - |
| 横竖屏 | ✅ | - |
| 缩略图 | ☑️ | 待完善,按需加载 |
| 大纲 | ✅ | - |
| 批注 | ✅ | - |
| 功能 | 状态 | 说明 |
|---|---|---|
| 清空 | ✅ | - |
| 撤回 | ✅ | - |
| 笔的粗细 | ✅ | - |
| 笔的模式 | ✅ | - |
| 是否开启批注 | ✅ | 默认开启 |
FAQs
pdf reader
We found that @zys/pdf-reader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.