maxwell.blazor.pdfReader
8.0.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package maxwell.blazor.pdfReader --version 8.0.4
NuGet\Install-Package maxwell.blazor.pdfReader -Version 8.0.4
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="maxwell.blazor.pdfReader" Version="8.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add maxwell.blazor.pdfReader --version 8.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: maxwell.blazor.pdfReader, 8.0.4"
#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.
// Install maxwell.blazor.pdfReader as a Cake Addin #addin nuget:?package=maxwell.blazor.pdfReader&version=8.0.4 // Install maxwell.blazor.pdfReader as a Cake Tool #tool nuget:?package=maxwell.blazor.pdfReader&version=8.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Blazor Pdf Reader PDF阅读器 组件
示例:
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 |
LocalFileName | PDF本地文件路径 | null | |
Width | 宽 单位(px/%) | 100% | |
Height | 高 单位(px/%) | 500px | |
StyleString | 组件外观 Css Style | ||
Page | 页码 | 1 | |
Pagemode | 页面模式, EnumPageMode 类型 | Thumbs | |
Zoom | 缩放模式, EnumZoomMode 类型 | Auto | |
Search | 查询字符串 | ||
Refresh() | 刷新组件 | ||
ShowPdf(Stream stream,bool forceLoad = true,islocalFile = false) | 从 stream 渲染PDF | ||
ShowPdf(string localFileName) | 从 Local File 渲染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 |
更新历史
v8.0.3
- 修复 ShowPdf 缓存问题
- ShowPdf 添加参数,forceLoad ,islocalFile
- 添加 ShowPdf(string localFileName) 从 Local File 渲染PDF
v8.0.1
- 添加 LocalFileName 读取本地文件路径
- 添加 Stream 缓存提高性能
- 优化搜索功能
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 组件
AlexChow
Product | Versions 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 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.AspNetCore.Components.Web (>= 6.0.0)
- UAParser (>= 3.1.47)
-
net7.0
- Microsoft.AspNetCore.Components.Web (>= 7.0.0)
- UAParser (>= 3.1.47)
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.0)
- UAParser (>= 3.1.47)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.