syncfusion-maui-pdf-viewer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplementing .NET MAUI PDF Viewer
实现.NET MAUI PDF Viewer
A comprehensive skill for implementing and customizing the Syncfusion .NET MAUI PDF Viewer (SfPdfViewer) control. The PDF Viewer provides powerful document viewing and management capabilities including navigation, annotations, form filling, text operations, signatures, redaction, and printing with a built-in customizable toolbar.
这是一项关于实现和自定义Syncfusion .NET MAUI PDF Viewer(SfPdfViewer)控件的全面技能。该PDF查看器提供强大的文档查看和管理功能,包括导航、批注、表单填写、文本操作、签名、内容脱敏处理、打印,以及内置的可自定义工具栏。
When to Use This Skill
何时使用此技能
Use this skill when you need to:
- View and navigate PDF documents in .NET MAUI applications
- Load PDFs from file, stream, URL, or Base64
- Add and manage annotations (ink, shapes, stamps, text markups, sticky notes)
- Fill and validate PDF form fields; import/export form data (XFDF, FDF, JSON, XML)
- Search and select text within PDF documents
- Add electronic signatures (handwritten, image-based, text)
- Redact sensitive content permanently
- Print PDF documents with quality settings
- Customize toolbars, appearance, and localization
- Migrate from Xamarin.Forms PDF Viewer to .NET MAUI
当你需要以下功能时使用此技能:
- 在.NET MAUI应用中查看和导航PDF文档
- 从文件、流、URL或Base64加载PDF
- 添加和管理批注(墨迹、形状、图章、文本标记、便签)
- 填写和验证PDF表单字段;导入/导出表单数据(XFDF、FDF、JSON、XML)
- 在PDF文档中搜索和选择文本
- 添加电子签名(手写、基于图像、文本形式)
- 永久脱敏敏感内容
- 按质量设置打印PDF文档
- 自定义工具栏、外观和本地化
- 从Xamarin.Forms PDF Viewer迁移到.NET MAUI
Component Overview
组件概述
SfPdfViewer is a comprehensive PDF viewing and management control for .NET MAUI with these capabilities:
- Document Management: Load (file/stream/URL/Base64/picker) with password support, save with flattening, print with quality settings
- Annotations: Ink, shapes, stamps, sticky notes, text markups, free text, eraser with full editing support
- Forms & Text: All AcroForm types, validation, import/export (XFDF/FDF/JSON/XML), async search, text selection
- Signatures & Redaction: Electronic signatures (handwritten/image/text), text/area/page-based redaction
- Navigation & UI: Page layouts, zoom, bookmarks, hyperlinks, customizable toolbar (desktop/mobile), localization, RTL, liquid glass effect
SfPdfViewer是适用于.NET MAUI的全面PDF查看和管理控件,具备以下功能:
- 文档管理: 加载(文件/流/URL/Base64/选择器)并支持密码保护,带扁平化保存,按质量设置打印
- 批注: 墨迹、形状、图章、便签、文本标记、自由文本、橡皮擦,支持完整编辑
- 表单与文本: 所有AcroForm类型、验证、导入/导出(XFDF/FDF/JSON/XML)、异步搜索、文本选择
- 签名与内容脱敏: 电子签名(手写/图像/文本)、基于文本/区域/页面的脱敏处理
- 导航与UI: 页面布局、缩放、书签、超链接、可自定义工具栏(桌面/移动)、本地化、RTL(从右到左)布局、液态玻璃效果
Documentation and Navigation Guide
文档与导航指南
Getting Started & Setup
入门与设置
📄 Read: references/basic-sample.md
- Installation, NuGet package, and handler registration (ConfigureSyncfusionCore)
- Basic PDF Viewer implementation (XAML & C#), DocumentSource binding
- Loading PDFs from different sources and platform-specific setup
📄 阅读: references/basic-sample.md
- 安装、NuGet包以及处理器注册(ConfigureSyncfusionCore)
- 基础PDF Viewer实现(XAML和C#)、DocumentSource绑定
- 从不同源加载PDF以及平台特定设置
Document Operations
文档操作
📄 Read: references/document-operations.md
- Loading PDFs (file picker, URL, Base64, streams) with password support
- Saving with modifications and annotation flattening
- Printing with quality settings and page range selection
📄 阅读: references/document-operations.md
- 加载PDF(文件选择器、URL、Base64、流)并支持密码保护
- 保存修改后的文档以及批注扁平化
- 按质量设置和页面范围选择打印PDF
Annotations
批注
📄 Read: references/annotations.md
- Adding/removing annotations (AddAnnotation, RemoveAnnotation)
- Ink, shapes, stamps, sticky notes, text markups, free text, ink eraser
- Annotation properties (color, opacity, bounds, stroke, rotation) and events
📄 阅读: references/annotations.md
- 添加/移除批注(AddAnnotation、RemoveAnnotation)
- 墨迹、形状、图章、便签、文本标记、自由文本、墨迹橡皮擦
- 批注属性(颜色、透明度、边界、笔触、旋转)以及事件
Form Fields
表单字段
📄 Read: references/form-fields.md
- Viewing, accessing, and filling all AcroForm field types
- Field validation, import/export (XFDF, FDF, JSON, XML), flattening
- Form field events and interaction handling
📄 阅读: references/form-fields.md
- 查看、访问和填写所有AcroForm字段类型
- 字段验证、导入/导出(XFDF、FDF、JSON、XML)、扁平化
- 表单字段事件与交互处理
Navigation & Viewing
导航与查看
📄 Read: references/viewing.md
- Page navigation (GoToPage, PageNumber), layout modes (Single, Continuous)
- Bookmarks, hyperlinks, zoom (ZoomMode, ZoomFactor), FitMode options
- Coordinate conversion (PageToClient, ClientToPage)
📄 阅读: references/viewing.md
- 页面导航(GoToPage、PageNumber)、布局模式(单页、连续)
- 书签、超链接、缩放(ZoomMode、ZoomFactor)、FitMode选项
- 坐标转换(PageToClient、ClientToPage)
Text Search
文本搜索
📄 Read: references/text-search.md
- Async text search (SearchTextAsync), match navigation (GoToNextMatch, GoToPreviousMatch)
- Search highlighting, case-sensitive/whole-word options, custom search UI
📄 阅读: references/text-search.md
- 异步文本搜索(SearchTextAsync)、匹配结果导航(GoToNextMatch、GoToPreviousMatch)
- 搜索高亮、区分大小写/全字匹配选项、自定义搜索UI
Text Selection
文本选择
📄 Read: references/text-selection.md
- Enabling text selection, SelectedText property, clipboard copy
- Selection customization (colors, opacity), TextSelectionChanged event
📄 阅读: references/text-selection.md
- 启用文本选择、SelectedText属性、剪贴板复制
- 选择自定义(颜色、透明度)、TextSelectionChanged事件
Electronic Signatures
电子签名
📄 Read: references/electronic-signature.md
- Handwritten, image-based, and text signatures
- Signature field management, appearance customization, validation workflows
📄 阅读: references/electronic-signature.md
- 手写、基于图像和文本形式的签名
- 签名字段管理、外观自定义、验证工作流
Redaction
内容脱敏
📄 Read: references/redaction.md
- Text/area/page-based redaction (RedactText, RedactArea, RedactPage)
- Permanent content removal, appearance customization, saving redacted documents
📄 阅读: references/redaction.md
- 基于文本/区域/页面的脱敏处理(RedactText、RedactArea、RedactPage)
- 永久移除内容、外观自定义、保存脱敏后的文档
Toolbar Customization
工具栏自定义
📄 Read: references/toolbar-customization.md
- Desktop vs mobile toolbar layouts
- Add/remove/hide/reorder toolbar items, AnnotationToolbarItemClicked event
- Custom toolbar creation and visibility control
📄 阅读: references/toolbar-customization.md
- 桌面与移动工具栏布局对比
- 添加/移除/隐藏/重新排序工具栏项、AnnotationToolbarItemClicked事件
- 自定义工具栏创建与可见性控制
UI Settings & Localization
UI设置与本地化
📄 Read: references/ui-settings.md
- Localization, FlowDirection for RTL layouts, culture-specific formatting
- Liquid glass effect, theme customization, platform-specific UI adjustments
📄 阅读: references/ui-settings.md
- 本地化、RTL布局的FlowDirection、特定文化格式
- 液态玻璃效果、主题自定义、平台特定UI调整
Gesture Events & Interaction
手势事件与交互
📄 Read: references/gesture-events.md
- DocumentTapped event with PageNumber and Position
- Touch gesture handling, custom interactions, event-driven workflows
📄 阅读: references/gesture-events.md
- DocumentTapped事件(包含PageNumber和Position)
- 触摸手势处理、自定义交互、事件驱动工作流
Migration from Xamarin
从Xamarin迁移
📄 Read: references/migration-xamarin-to-maui.md
- API differences, property/method mappings, namespace changes
- Handler registration differences, breaking changes, migration checklist
📄 阅读: references/migration-xamarin-to-maui.md
- API差异、属性/方法映射、命名空间变更
- 处理器注册差异、破坏性变更、迁移检查清单