BootstrapBlazor.PdfReader 7.2.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package BootstrapBlazor.PdfReader --version 7.2.0
                    
NuGet\Install-Package BootstrapBlazor.PdfReader -Version 7.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BootstrapBlazor.PdfReader" Version="7.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BootstrapBlazor.PdfReader" Version="7.2.0" />
                    
Directory.Packages.props
<PackageReference Include="BootstrapBlazor.PdfReader" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BootstrapBlazor.PdfReader --version 7.2.0
                    
#r "nuget: BootstrapBlazor.PdfReader, 7.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BootstrapBlazor.PdfReader@7.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BootstrapBlazor.PdfReader&version=7.2.0
                    
Install as a Cake Addin
#tool nuget:?package=BootstrapBlazor.PdfReader&version=7.2.0
                    
Install as a Cake Tool

Blazor Pdf Reader PDF阅读器 组件

QQ截图20221218143438

示例:

https://www.blazor.zone/PdfReaders

https://blazor.app1.es/pdfReaders

使用方法:

1.nuget包

BootstrapBlazor.PdfReader

2._Imports.razor 文件 或者页面添加 添加组件库引用

@using BootstrapBlazor.Components

3.razor页面

<PdfReader FileName="pdf/sample.pdf" />
           
<PdfReader FileName="https://blazor.app1.es/_content/DemoShared/sample.pdf" />

<pre>流化方式,可跨域</pre>
<PdfReader FileName="https://densen.es/test/webdev/pdf/sample.pdf" 
           StreamMode="true"/> 

4.参数说明

参数 说明 默认值 旧版名称
FileName PDF文件路径(Url或相对路径) null Filename
StreamMode 使用流化模式,可跨域读取文件 false EnableStreamingMode
Width 宽 单位(px/%) 100%
Height 高 单位(px/%) 500px
StyleString 组件外观 Css Style
Page 页码 1
Pagemode 页面模式, EnumPageMode 类型 Thumbs
Zoom 缩放模式, EnumZoomMode 类型 Auto
Search 查询字符串
Refresh() 刷新组件
ShowPdf(Stream stream) 从 stream 渲染PDF
NavigateToPage(int page) 跳转页码
Refresh(int page) 跳转页码
Refresh(string? search, int? page, EnumPageMode? pagemode, EnumZoomMode? zoom) 刷新组件(查询关键字,页码,页面模式,缩放模式)
Stream 用于渲染的文件流,为空则用URL参数读取文件 PdfStream
ViewerBase 浏览器页面路径 内置 PDFJS_URL
Navpanes 显示导航窗格 true
Toolbar 显示工具栏 true
Statusbar 显示状态栏 true
Debug 显示调试信息
AutoStreamMode 'http' 开头自动使用流模式读取 true
Watermark 水印内容
ReadOnly 禁用复制/打印/下载
CompatibilityMode 兼容模式,兼容旧版浏览器 false
CompatibilityNoneES5 兼容模式,兼容旧版不支持es5的浏览器 false

更新历史

v7.2.0

  • 兼容 .pfb 和 .bcmap

v7.1.10

  • 修复直接使用组件 ShowPdf 方法报错.

v7.1.9

  • 升级兼容模式版本,修复移动端手势缩放,部分文件字体无法正常加载.(感谢Ponderfly的PR)

v7.1.8

  • 添加 CompatibilityNoneES5 : 兼容模式,兼容旧版不支持es5的浏览器
  • Chrome < 97 自动使用 2.4.456 版本
  • Chrome < 109 自动使用 2.6.347 版本
  • 注:ReadOnly 和 Watermark 在这两种兼容模式下不能使用

v7.1.7

  • 添加 CompatibilityMode : 兼容模式,兼容旧版浏览器

v7.1.5

  • 添加 AutoStreamMode: 'http' 开头自动使用流模式读取
  • 添加 Watermark : 水印内容
  • 添加 ReadOnly : 禁用复制/打印/下载

v7.1.4

  • Filename 更改为 FileName

v7.1.3

  • 移除pdfobject, 一些参数也被移除,请注意更改
移除参数
UrlBase
View

v7.1

  • 移除pdfobject, 一些参数也被移除,请注意更改
移除参数
Func<string, Task>? OnInfo
Func<string, Task>? OnError
ForceIframe
ForcePDFJS
UrlBase
View

Blazor 组件

条码扫描 ZXingBlazor nuget stats

图片浏览器 Viewer

条码扫描 BarcodeScanner

手写签名 Handwritten

手写签名 SignaturePad

定位/持续定位 Geolocation

屏幕键盘 OnScreenKeyboard

百度地图 BaiduMap

谷歌地图 GoogleMap

蓝牙和打印 Bluetooth

PDF阅读器 PdfReader

文件系统访问 FileSystem

光学字符识别 OCR

电池信息/网络信息 WebAPI

视频播放器 VideoPlayer

AlexChow

今日头条 | 博客园 | 知乎 | Gitee | GitHub

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on BootstrapBlazor.PdfReader:

Package Downloads
BlazorShared

BlazorMaui , 整合Blazor,BootstrapBlazor UI组件库,Maui的共享跨平台工程示例共享库

BootstrapBlazor.Densen.All

Blazor 组件懒人包

BootstrapBlazor.Shared

Package Description

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on BootstrapBlazor.PdfReader:

Repository Stars
dotnetcore/BootstrapBlazor
Bootstrap Blazor is an enterprise-level UI component library based on Bootstrap and Blazor.
LANCommander/LANCommander
densen2014/BlazorMaui
用 c # 和 Razor 创建本机移动应用和桌面应用。使用 Blazor.BB.Maui,可以快速开发共享代码库运行于 Windows (Winforms/WPF/UWP)、Android、iOS、macOS 的应用。
densen2014/BlazorHybrid
关于BlazorHybrid的一切研究. 用 c # 和 Razor 创建本机移动应用和桌面应用。快速开发共享代码库运行于 Windows (Winforms/WPF/UWP)、Android、iOS、macOS、Linux 的应用。
Version Downloads Last Updated
10.0.26 237 1/10/2026
10.0.25 113 1/9/2026
10.0.24 201 12/30/2025
10.0.23 225 12/21/2025
10.0.22 317 12/18/2025
10.0.21 272 12/18/2025
10.0.20 278 12/17/2025
10.0.19 268 12/17/2025
10.0.18 198 12/14/2025
10.0.17 167 12/14/2025
10.0.16 167 12/14/2025
10.0.15 139 12/13/2025
10.0.14 111 12/13/2025
10.0.13 111 12/13/2025
10.0.12 154 12/12/2025
10.0.11 761 12/3/2025
10.0.10 688 12/3/2025
10.0.9 701 12/2/2025
10.0.8 307 11/30/2025
10.0.7 127 11/29/2025
10.0.6 172 11/28/2025
10.0.5 178 11/28/2025
10.0.4 182 11/28/2025
10.0.4-beta03 178 11/28/2025
10.0.4-beta02 172 11/28/2025
10.0.4-beta01 174 11/28/2025
10.0.3 211 11/27/2025
10.0.2 199 11/27/2025
10.0.1 199 11/27/2025
10.0.1-beta08 180 11/27/2025
10.0.1-beta07 176 11/27/2025
10.0.1-beta06 182 11/26/2025
10.0.1-beta05 178 11/26/2025
10.0.1-beta04 182 11/26/2025
10.0.1-beta01 190 11/24/2025
10.0.0 417 11/12/2025
9.0.1 10,423 4/29/2025
9.0.0 13,184 11/13/2024
9.0.0-beta02 187 11/7/2024
9.0.0-beta01 528 11/1/2024
8.0.4 24,524 4/18/2024
8.0.3 1,865 1/24/2024
8.0.2 1,883 12/9/2023
8.0.1 538 12/5/2023
8.0.1-beta2 197 12/5/2023
8.0.1-beta 203 12/5/2023
8.0.0 834 11/15/2023
7.2.0 4,454 8/22/2023
7.1.11-beta 194 8/22/2023
7.1.10 4,221 3/18/2023
7.1.9 458 3/18/2023
7.1.8 2,023 1/26/2023
7.1.7 602 1/25/2023
7.1.5 438 1/24/2023
7.1.4 958 12/26/2022
7.1.3 427 12/26/2022
7.1.2 758 12/18/2022
7.1.1 465 12/18/2022
7.1.0 437 12/18/2022
7.0.8-beta 247 12/16/2022
7.0.7 594 12/14/2022
7.0.6 647 12/7/2022
7.0.5 474 12/7/2022
7.0.4 469 12/7/2022
7.0.3 648 12/7/2022
7.0.2 533 12/7/2022
7.0.1 437 12/6/2022
7.0.0 452 12/6/2022
0.0.1 502 12/6/2022