syncfusion-blazor-pdf-viewer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Syncfusion Blazor Pdfviewer – UI Sample Generator

Syncfusion Blazor Pdfviewer – UI示例生成器

Generate C# Code for the User's Project (default)

为用户项目生成C#代码(默认功能)

Trigger keywords: "how to", "add pdfviewer", "code sample", "show me", "example", "snippet", "integrate", "component", "create sample".
Purpose: Generate minimal, copy-pasteable C# and Razor code that the user can integrate directly into their Blazor project.
Workflow:
⚠️ CRITICAL — Feature Support Policy (STRICT MODE):
FUNDAMENTAL RULE: Only generate code using APIs and properties that are EXPLICITLY listed in the reference files. ANY deviation is a VIOLATION.
  • MANDATORY CHECKS BEFORE GENERATING ANY CODE:
    1. Search the reference files for the exact API/property name
    2. Verify it appears in the Method Reference, Properties, or Events tables
    3. If NOT found in ANY reference file, STOP immediately
    4. Do NOT generate or suggest undocumented APIs under any circumstances
  • STRICT ENFORCEMENT - ZERO TOLERANCE:
    • NO custom properties - Only use properties from reference file tables
    • NO invented methods - Only use methods from reference file tables
    • NO workarounds with undefined APIs - Forbidden
    • NO assumptions about undocumented behavior - Forbidden
    • NO alternative implementations using guess-work - Forbidden
    • NO pretending support exists - Forbidden
  • MANDATORY RESPONSE FOR UNSUPPORTED FEATURES:
    • If a requested scenario/feature/API is NOT listed in any reference file, you MUST respond with:
      "This feature is not supported in the current Syncfusion Blazor PDF Viewer implementation."
    • Then list what IS supported from the appropriate reference file
    • Never suggest alternatives unless explicitly documented in reference files
  • REFERENCE FILE HIERARCHY:
    • Each reference file contains complete, authoritative documentation for its domain
    • The tables (Method Reference, Properties, Events) are the SOURCE OF TRUTH
    • Content outside these tables in reference files is explanatory only
    • Do NOT extend beyond what appears in the reference file tables
  • AUDIT YOUR GENERATION:
    • Before providing any code, verify EVERY API used appears in a reference file table
    • Document which reference file each API comes from
    • If you cannot cite a reference file table entry, DELETE that code
  • This is a CRITICAL REQUIREMENT. Violations compromise the skill's integrity and reliability.
触发关键词: "how to", "add pdfviewer", "code sample", "show me", "example", "snippet", "integrate", "component", "create sample"。
用途: 生成可直接复制粘贴的C#和Razor代码,供用户集成到自己的Blazor项目中。
工作流程:
⚠️ 重要——功能支持策略(严格模式):
基本规则: 仅使用参考文件中明确列出的API和属性生成代码。任何偏离都属于违规。
  • 生成代码前的强制检查:
    1. 在参考文件中搜索确切的API/属性名称
    2. 验证它是否出现在方法参考、属性或事件表中
    3. 如果在任何参考文件中都找不到,立即停止
    4. 在任何情况下都不得生成或建议未记录的API
  • 严格执行——零容忍:
    • 禁止自定义属性 - 仅使用参考文件表中的属性
    • 禁止自创方法 - 仅使用参考文件表中的方法
    • 禁止使用未定义API的变通方法 - 严禁
    • 禁止假设未记录的行为 - 严禁
    • 禁止基于猜测的替代实现 - 严禁
    • 禁止假装支持某项功能 - 严禁
  • 不支持功能的强制响应:
    • 如果请求的场景/功能/API未在任何参考文件中列出,必须回复:
      "This feature is not supported in the current Syncfusion Blazor PDF Viewer implementation."
    • 然后列出参考文件中支持的功能
    • 除非参考文件中有明确记录,否则不得建议替代方案
  • 参考文件层级:
    • 每个参考文件包含其领域的完整权威文档
    • 方法参考、属性、事件表是唯一的事实来源
    • 参考文件中这些表之外的内容仅作解释用
    • 不得扩展到参考文件表中未列出的内容
  • 审核生成内容:
    • 在提供任何代码之前,验证使用的每个API都出现在参考文件表中
    • 记录每个API来自哪个参考文件
    • 如果无法引用参考文件表中的条目,删除该代码
  • 这是关键要求。违规会损害技能的完整性和可靠性。

Step 1 — Detect the Application Type (REQUIRED - DO NOT SKIP)

步骤1 — 检测应用类型(必填 - 不得跳过)

  • Use file_search and read_file tools to inspect workspace project files:
    • .csproj
      file (project configuration)
    • Program.cs
      (startup configuration)
    • _Imports.razor
      (namespace imports)
    • App.razor
      (root component)
    • Any existing
      .razor
      files in Components/Pages
  • Output: Confirm the detected application type (e.g., "Blazor WebApp" or "Blazor Server") before proceeding.
  • 使用file_search和read_file工具检查工作区项目文件:
    • .csproj
      文件(项目配置)
    • Program.cs
      (启动配置)
    • _Imports.razor
      (命名空间导入)
    • App.razor
      (根组件)
    • Components/Pages中的任何现有
      .razor
      文件
  • 输出: 在继续之前,确认检测到的应用类型(例如“Blazor WebApp”或“Blazor Server”)。

Step 2 — Generate Code from Reference Files Only (REQUIRED)

步骤2 — 仅从参考文件生成代码(必填)

  • Before generating: Confirm that Steps 1 are complete
  • Read the relevant
    references/*.md
    file(s) for the requested feature
  • Cross-reference EVERY API, property, and method against these tables
  • DECLARATIVE-ONLY APPROACH (MANDATORY - NO LIFECYCLE METHODS):
    • Use ONLY property binding in Razor markup similar lifecycle methods.
    • Configure all PDF Viewer properties directly as component attributes
  • MANDATORY: Before generating ANY code, verify that reference files exist and are accessible
  • Read the appropriate reference file(s) for the requested feature:
    • Use
      read_file
      tool on relevant
      references/*.md
      files
    • Confirm file contains Methods/Properties/Events tables
    • Verify tables are complete and readable
  • If reference file is missing or cannot be read:
    • STOP code generation
    • Respond: "Reference file for this feature is not available. Please ensure all reference files are present in the
      references/
      directory."
    • List the missing reference file name
  • This is a BLOCKER step: Cannot proceed without reference file validation
  • If an API/property does NOT appear in the reference file table, DO NOT USE IT
  • Do NOT invent, guess, or suggest any API, method, property, class, or namespace not explicitly present in the reference files
  • 生成前: 确认步骤1已完成
  • 阅读与请求功能相关的
    references/*.md
    文件
  • 对照这些表交叉验证每个API、属性和方法
  • 仅声明式方法(必填 - 无生命周期方法):
    • 仅在Razor标记中使用属性绑定,类似生命周期方法的方式。
    • 直接作为组件属性配置所有PDF Viewer属性
  • 必填: 在生成任何代码之前,验证参考文件是否存在且可访问
  • 阅读与请求功能相关的参考文件:
    • 对相关
      references/*.md
      文件使用
      read_file
      工具
    • 确认文件包含方法/属性/事件表
    • 验证表是否完整且可读
  • 如果参考文件缺失或无法读取:
    • 停止代码生成
    • 回复:“此功能的参考文件不可用。请确保所有参考文件都存在于
      references/
      目录中。”
    • 列出缺失的参考文件名
  • 这是阻塞步骤: 没有参考文件验证则无法继续
  • 如果API/属性未出现在参考文件表中,请勿使用
  • 不得发明、猜测或建议任何未在参考文件中明确列出的API、方法、属性、类或命名空间

Code References

代码参考

All templates and operation snippets live in
references/*.md
. Each file is a focused snippet or template the agent will combine when generating samples.
Flow: Always start with
references/basic-sample.md
, then merge matched features into its anchors (PROPS, EVENTS, UI_BUTTONS, HANDLERS). If no keyword matches, return only the basic sample.
FilePurpose
basic-sample.mdFoundation setup and minimal PDF Viewer component. Includes complete setup prerequisites. Provides minimal working component with DocumentPath, Height, Width properties and feature anchor points. Use as foundation for all PDF Viewer implementations with proper project setup and configuration validation.
toolbar-properties.mdComprehensive toolbar customization using PdfViewerToolbarSettings. Includes 11 properties (ShowTooltip, EnableToolbar, EnableAnnotationToolbar, IsAnnotationToolbarVisible, ToolbarSettings, ToolbarClicked, ToolbarItems, AnnotationToolbarItems, FormDesignerToolbarItems, MobileToolbarItems, RedactionToolbarItems, CustomToolbarItems), 5 specialized toolbars (Primary, Annotation, FormDesigner, Mobile, Redaction) with 14/22/9/7/7 items respectively, and 7 code examples. Use to simplify UI for workflows, create role-based tool access, optimize mobile experience, add custom functionality, and control annotation/form/redaction capabilities.
toolbar-methods.mdProgrammatic control methods for toolbar visibility and behavior. Includes 5 methods (ShowToolbarAsync, ShowAnnotationToolbar, ShowRedactionToolbar, EnableToolbarItemsAsync, ShowToolbarItemsAsync), 14 toolbar items for granular control (OpenOption, PrintOption, DownloadOption, SearchOption, MagnificationTool, PageNavigationTool, SelectionTool, PanTool, AnnotationEditTool, CommentTool, FormDesigner, SubmitForm, UndoRedoTool, Redaction).
magnification.mdProgrammatic zoom/magnification control with 10 properties, 7 methods, 1 event, and comprehensive decision guidance. Properties: ZoomMode (Default/FitToPage/FitToWidth/FitToHeight), ZoomValue (10-400%), MinZoomValue (default 10), MaxZoomValue (default 400), EnableMagnification (default true), EnablePinchZoom (default true), EnableZoomOptimization (default true), RestrictZoomRequest (reuse 100% image for performance), ZoomValueChanged callback, ZoomValueExpression (two-way binding), TileRenderingSettings (performance). Methods: ZoomAsync(exact %), ZoomInAsync (step to preset), ZoomOutAsync (step to preset), FitToPageAsync, FitToWidthAsync, FitToHeightAsync, GetZoomPercentageAsync. Events: ZoomChanged (CurrentZoomValue, PreviousZoomValue).
text-search.mdComplete text search functionality for PDF document content discovery and navigation. EnableTextSearch property (bool, default true) to toggle search availability. Text search methods (4 total): SearchTextAsync (string searchText, bool isMatchCase for case-sensitive/insensitive search), SearchNextAsync (navigate to next result), SearchPreviousAsync (navigate to previous result), CancelTextSearchAsync (clear highlights and cancel). Search configuration: PdfViewerTextSearchColorSettings with SearchColor (found text color, default #8b4c12), SearchHighlightColor (highlighted text color, default #fdd835) for visual customization. Search events (3 total): OnTextSearchStart (SearchText, MatchCase parameters), OnTextSearchComplete (SearchText, MatchCase for completion tracking), OnTextSearchHighlight (PageNumber, Bound with X/Y/Width/Height coordinates for result location tracking).
annotation-events.mdComprehensive reference for annotation lifecycle, interaction, and signature-specific events (20+ events total). Includes event subscription patterns, event categories (add/modify/delete, select/move/resize, signature operations), complete event list with detailed arguments and properties, and supporting type definitions (Bound, PdfAnnotationProperties, AnnotationType, PdfAnnotation, etc.).
annotation-properties.mdReference for enabling/disabling 13+ annotation feature types (FreeText, Shape, TextMarkup, StickyNotes, Ink, Handwritten Signature, Measure, Stamp, Image) via boolean properties. Includes programmatic methods (SetAnnotationModeAsync, UpdateMeasurementSettingsAsync), export configuration (filename, format), signature control (editability, digital appearance), and comprehensive type definitions (AnnotationType, DynamicStampItem, SignStampItem, StandardBusinessStampItem).
annotation-settings.mdConfiguration for default appearance, behavior, size constraints, and restrictions across 20+ annotation types (22+ settings classes). Properties control colors (stroke, fill, font, border), size constraints (min/max width/height), locking (IsLock, AllowedInteractions), print/download inclusion, author info, selection handles (resizers), custom stamps, text markup behavior, measurement units (ConversionUnit, ScaleRatio), and line head styles. Includes Shape Label Settings to customize labels for shape/measure annotations (FillColor, FontColor, FontSize, LabelContent, Opacity). Provides both declarative (tag-based) and programmatic (property binding) implementation approaches with 40+ properties and comprehensive type definitions (CursorType, AnnotationResizerShape, LineHeadStyle, etc.).
redaction-settings.mdComplete configuration API for redaction settings to permanently remove sensitive information from PDFs. Core overlay properties (9 total): OverlayText, MarkerFillColor, MarkerBorderColor, MarkerOpacity (transparency 0-1), FontColor, FontSize, FontFamily, IsRepeat (text repetition), TextAlignment (Left/Center/Right). Security and control properties: AllowedInteractions (6 options: Delete, Move, Select, PropertyChange, Resize, None), IsLock (prevent modifications), Author (tracking), CustomData (metadata storage), IsPrint (print inclusion). Size constraints: MinWidth, MaxWidth, MinHeight, MaxHeight for dimensional control. Download/Print control: SkipPrint, SkipDownload, IsPrint for document persistence. Visual styling: BorderDashArray, FillColor, Opacity, StrokeColor, Thickness (border width 1-10). Annotation selector settings.
programmatical-annotation-methods.mdComplete API for programmatic annotation lifecycle management, redaction, and export/import workflows. Annotation CRUD methods (15 total): AddAnnotationAsync (4 variants for basic/DynamicStamp/SignStamp/StandardBusinessStamp), AddAnnotationsAsync (batch), EditAnnotationAsync, DeleteAnnotationAsync (3 variants: no params/by object/by ID), DeleteAnnotationsAsync (3 variants), GetAnnotationsAsync, SelectAnnotationAsync (2 variants), ClearSelectionAsync. Redaction methods: AddPageRedactionsAsync, RedactAsync (permanent). Export/Import: ExportAnnotationAsync (Json/Xfdf formats), ExportAnnotationAsStreamAsync, ExportAnnotationsAsObjectAsync, ImportAnnotationAsync (stream/object).
command-manager.mdDual feature reference for custom keyboard shortcuts and comment panel customization. Command Manager: PdfViewerCommandManager with KeyboardCommand/KeyGesture for mapping key combinations (Ctrl/Alt/Shift/Meta + A-Z/0-9/F1-F12/arrows/special keys) to custom actions via CommandExecutedEventArgs. Comment Panel Settings: PdfViewerCommentPanelSettings with Multiline (enable detailed multi-line comments), DateTimeFormat (custom timestamp formats for compliance/localization), and visibility control (CommentPanelVisible bool, CommentPanelVisibleChanged event for two-way binding). Includes implementation patterns, decision guides (override vs extend shortcuts, multiline vs single-line comments), and complete code examples.
document-properties.mdDocument-level configuration, metadata, and lifecycle events for PDF handling. Properties: EnableAutoComplete (form field auto-completion), EnableChunkMessages (large file processing), IsExtractText (async text extraction). Events (8 total): DocumentLoaded (DocumentName, PageCount, PageSizes), DocumentLoadFailed (IsPasswordRequired status), DocumentUnloaded, DocumentEdited (EditingAction: AnnotationAdded/Deleted/Updated, FormFieldImported/Updated), PageMouseover (PageX/Y coordinates), PageSelected (SelectedPages list), OnPageClick (click coordinates), ExtractTextCompleted (DocumentTextCollection). Inherited APIs: PageInfo (PageNumber, Width, Height, RotationAngle), DocumentInfo (PageCount, PageSizes).
file-save-properties.mdFile download and annotation export/import functionality with complete event-driven workflows. Property: EnableDownload (bool toggle for toolbar download button). Method: DownloadAsync() for programmatic document download. Events (8 total): DownloadStart (FileName), DownloadEnd (DownloadDocument base64 string, FileName), ExportStarted, ExportSucceed (FileName), ExportFailed (ErrorDetails), ImportStarted, ImportSucceed, ImportFailed (ErrorDetails). Use for document persistence workflows, download tracking and logging, annotation export/import operations, user feedback on file operations, error handling for failed imports/exports, and audit trails for document downloads.
ui-properties.mdCore UI properties and hyperlink interaction events for customizing the viewer experience. Includes 4 properties (EnableDesktopMode, EnableErrorDialog, EnableHyperlink, EnableRtl) for controlling UI behavior and device modes, 3 events (OnHyperlinkClick, OnHyperlinkMouseOver, Created) for handling hyperlink navigation and lifecycle, and 4 code examples. Use to customize viewer appearance for different devices, control hyperlink navigation, manage error handling, and support internationalization (RTL).
form-field-properties.mdCore form field configuration and design mode control (4 properties, 1 method). Properties: EnableFormDesigner (enable/disable form designer tool), EnableFormFields (control user interaction with existing fields), EnableFormFieldsValidation (enable automatic validation), IsFormFieldDocument (read-only detection of form fields in PDF). Method: SetFormDrawingModeAsync(FormFieldType?) for programmatically setting form field drawing mode with support for 8 field types (Button, CheckBox, DropDown, ListBox, Password, RadioButton, SignatureField, Textbox). Use for form designer workflow control, form field interaction management, auto-validation setup, document capability detection, and dynamic form field type switching.
form-field-settings.mdVisual appearance and styling configuration for form fields with 7 properties and comprehensive decision guidance. Properties: BackgroundColor (HEX/RGB/CSS colors), BorderColor, Color (text color), FontFamily (with fallback support: Arial, Verdana, Times New Roman), FontSize (double type), FontStyle (Bold, Italic, None, Strikethrough, Underline), Thickness (border width 0-n pixels, 0=borderless). Includes 4 common scenarios: high-contrast accessible forms (WCAG guidelines), corporate branded forms (company colors/fonts), minimal borderless design (modern aesthetic), bold text for emphasis. Decision guides: color selection (high-contrast for accessibility, corporate palette for branding, muted for disabled fields), font properties (FontFamily recommendations for universal/readability, FontSize guidance 10-12 standard/12-14 recommended/14-16 accessible), border thickness recommendations (0 borderless, 1 standard, 1.5-2 emphasis, 2+ accessibility).
form-designer-events.mdComprehensive form field event reference for lifecycle, interaction, validation, and data management (20+ events). Event categories: Lifecycle (FormFieldAdding/Added/Deleted/PropertyChanged with cancellation support), Interaction (Selected/Unselected/Click/DoubleClick/Resized/FocusIn/FocusOut with coordinates), Mouse (MouseEnter/Leave with PageX/PageY), Validation (ValidateFormFields with UnfilledFields dictionary), Import/Export (Importing/Imported/ImportFailed, Exporting/Exported/ExportFailed with ErrorDetails), Designer Mode (IsDesignerModeChanged). Type definitions: FormFieldInfo (16 properties: BackgroundColor, BorderColor, Bounds, Color, CustomData, FontFamily, FontSize, FontStyle, Id, IsReadOnly, IsRequired, Name, PageNumber, TextAlignment, Thickness, TooltipText, Type, Visibility), Bound, FontStyle, TextAlignment, FormFieldType (8 types), VisibilityMode (4 modes), FormField, SignatureType.
programmatical-form-field-methods.mdComplete API for programmatic form field lifecycle management, batch operations, and export/import workflows. Form field CRUD methods (13 total): AddFormFieldsAsync (batch add), GetFormFieldsAsync (retrieve all), UpdateFormFieldsAsync (single/batch variants), DeleteFormFieldsAsync (3 variants: all/selected/by IDs), SelectFormFieldAsync (by object/by ID), RetrieveFormFieldsAsync (legacy). Export/Import: ExportFormFieldsAsync (with format parameter), ExportFormFieldsAsObjectAsync, ImportFormFieldsAsync (Dictionary/Stream variants with format parameter).
thumbnail-bookmark.mdComprehensive reference for programmatic navigation, text selection, and thumbnail/bookmark panel management. Includes 5 methods (ClearTextSelectionAsync, GetBookmarksAsync, GoToBookmarkAsync, OpenThumbnailPaneAsync, SelectTextRegionAsync), 4 UI properties (EnableBookmarkPanel, EnableTextSelection, EnableThumbnailPanel, IsThumbnailPanelOpen), and 3 interaction events (OnTextSelectionEnd, OnTextSelectionStart, OnThumbnailClick). Use to implement custom navigation UIs, programmatic text highlighting, bookmark-based workflows, and text selection management.
contextmenu-settings.mdWhen the user needs to customize the PDF Viewer's as context menu settings.
undo-redo-properties.mdComprehensive undo/redo functionality for tracking and reversing document changes. Includes 4 properties (CanUndo, CanUndoChanged, CanRedo, CanRedoChanged) for tracking undo/redo state with event callbacks for two-way binding, 2 async methods (UndoAsync, RedoAsync) for performing undo/redo operations, and 2 code examples. Tracks all user actions including annotations, form field entries, edits, and modifications. Use to implement undo/redo buttons, track document edit history, provide keyboard shortcuts (Ctrl+Z/Ctrl+Y), and manage document state changes.
navigation-methods.mdProgrammatic page navigation control and document information retrieval (9 methods total). Methods: GoToFirstPageAsync/GoToLastPageAsync/GoToNextPageAsync/GoToPreviousPageAsync (navigation), GoToPageAsync(int pageNumber) for jumps (1-based indexing), GetPageCountAsync (async total page count), GetPageDetails (sync page metadata List<PageInfo>), ShowNavigationToolbarAsync(bool) (toolbar visibility), ToggleItemByIndex(int) (panel toggle). Inherited APIs: PageInfo (PageNumber, Width, Height, RotationAngle), PageRotation enum (RotateAngle0/90/180/270), PdfViewerEvents.PageChanged (CurrentPageNumber, PreviousPageNumber, DocumentName). Implementation notes: 1-based indexing, all GoTo* methods async (require await), GetPageCountAsync async, GetPageDetails synchronous, invalid page numbers keep current page.
navigation-properties.mdProperties for page state tracking, navigation toolbar customization, and UI synchronization in the PDF viewer. Includes CurrentPageNumber, PageCount, and event callbacks (CurrentPageNumberChanged, PageCountChanged) for real-time page monitoring. Configure NavigationToolbarSettings to show/hide built-in items (Thumbnails, Bookmarks, CommentPanel, PageOrganizer) or inject custom toolbar buttons and separators for the Navigation Toolbar
page-organizer.mdComplete API for programmatic page manipulation, document structure editing, and page organizer UI configuration. Page operation methods (8 total): DeletePagesAsync, DuplicatePagesAsync, ExtractPagesAsync, ExtractPagesAsStreamAsync, InsertPagesAsync, InsertBlankPagesAsync, MovePagesAsync, RotatePagesAsync, RotatePagesToAngleAsync support index-based (0-based) page operations. PageOrganizerSettings provides feature control (CanDelete, CanInsert, CanRotate, CanDuplicate, CanRearrange, CanImport, CanExtractPages), thumbnail zoom management (ImageZoom, ShowImageZoomingSlider, ImageZoomMin/Max), and footer button visibility (Save/SaveAs). Events: PageOrganizerSaveRequested, PageOrganizerZoomChanged for save/zoom workflows. Supporting types: RotationDirection (Clockwise/CounterClockwise), PageRotation (0°/90°/180°/270°).
page-organizer-settings.mdDedicated settings configuration for the page organizer feature. Properties (12 total): CanDelete, CanInsert, CanRotate, CanDuplicate, CanRearrange, CanImport, CanExtractPages (bool feature toggles), ImageZoom (thumbnail zoom level), ShowImageZoomingSlider (bool), ImageZoomMin/ImageZoomMax (acceptable range: 2–5), FooterButtons (FooterButton enum for Save/SaveAs visibility). Use with PageOrganizerSettings tag to granularly control which page operations are permitted and configure thumbnail zoom behavior.
print.mdPrint capabilities configuration, quality control, and event-driven workflows for PDF documents. Print control properties (4 total): EnablePrint (bool toggle for toolbar print button, default true), EnablePrintRotation (bool auto-rotate landscape documents on print, default true), PrintScaleFactor (double quality multiplier 1.0-5.0+ with guidelines: 1.0 standard, 1.5-2.0 presentations, 2.5-3.5 technical drawings), PrintMode (Default/NewWindow enum for print dialog location). Print method: PrintAsync() for programmatic printing. Print events (2 total): PrintStart (Cancel bool for permission validation, FileName for document tracking), PrintEnd (FileName for audit logging and post-print actions). Supporting types: PrintMode enum (Default/NewWindow), PrintStartEventArgs, PrintEndEventArgs. Common scenarios: restricted document preview (EnablePrint=false), high-quality output (PrintScaleFactor tuning), landscape handling (EnablePrintRotation control), permission-based access control, print audit trails.
pdfviewer-properties.mdGeneral configuration properties of the Blazor SfPdfViewer component controlling UI appearance and viewer behavior. Properties (15 total): Height, Width (scrollable dimensions), Id (DOM element ID), CssClass (custom styling), DocumentPath (initial PDF path), DownloadFileName (download file name), Locale (culture/localization, default en-US), InteractionMode (Pan/TextSelection), HyperlinkOpenState (CurrentTab/NewTab/NewWindow), CustomFonts (local font paths for document text), FallbackFontCollection (Dictionary<string, Stream> for custom FreeText fonts), FontFamilies (preferred font list), RetryCount (service call retry count, default 1), IsDocumentEdited (read-only edit state tracking). Use to configure initial viewer appearance, font support, interaction behavior, and localization.
pdfviewer-methods.mdCore lifecycle and document operation methods of the Blazor SfPdfViewer component. Methods (8 total): LoadAsync(string/Stream/byte[], password) for loading PDFs from path/URL/stream/byte array, SaveAsync(filePath) for server-side save, UnloadAsync() for memory cleanup, GetDocumentAsync() to retrieve modified document as byte[], UpdateViewerContainerAsync() for responsive layout reflow, DownloadAsync() for browser download, Dispose()/Dispose(bool) for resource cleanup. Use for programmatic document lifecycle management, loading PDFs from different sources, saving changes, and container responsiveness.
annotation-methods.mdProgrammatic annotation mode control methods for the Blazor SfPdfViewer. Methods (2 total): SetAnnotationModeAsync(AnnotationType) to activate a specific annotation type for next user interaction, SetAnnotationModeAsync(AnnotationType, DynamicStampItem?, SignStampItem?, StandardBusinessStampItem?) overload for stamp annotation types (Dynamic/Sign/StandardBusiness), UpdateMeasurementSettingsAsync() to update measure settings for existing measure annotations. Use to programmatically switch annotation modes without toolbar interaction, implement custom annotation toolbars, and automate annotation workflows.
annotation-selector-settings.mdGlobal annotation selector appearance configuration via PdfViewerAnnotationSelectorSettings. Properties (9 total): ResizerBorderColor (resizer handle border, default black), ResizerCursorType (CursorType enum, default null), ResizerFillColor (resizer handle fill), ResizerLocation (AnnotationResizerLocation: Corners/Edges/All), ResizerShape (AnnotationResizerShape: Square/Circle, default Square), ResizerSize (handle size in px), SelectionBorderColor (selection outline color), SelectionBorderThickness (selection border width 1–10, default 1), SelectorLineDashArray (dash pattern double[]). Use with PdfViewerAnnotationSelectorSettings tag for common selector styling across all annotation types.
area-annotation-settings.mdDefault appearance and behavior configuration for area annotations via PdfViewerAreaSettings. Properties (17 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity (0–1), StrokeColor, Thickness (1–10). Use to set default area annotation appearance, size constraints, lock behavior, and print/download inclusion.
arrow-annotation-settings.mdDefault appearance and behavior configuration for arrow annotations via PdfViewerArrowSettings. Properties (19 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity (0–1), StrokeColor, Thickness (1–10), LineHeadEndStyle (LineHeadStyle enum), LineHeadStartStyle (LineHeadStyle enum). Use to configure default arrow annotation styling including head styles for both ends.
circle-annotation-settings.mdDefault appearance and behavior configuration for circle annotations via PdfViewerCircleSettings. Properties (17 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity (0–1), StrokeColor, Thickness (1–10). Use to set default circle annotation appearance, size constraints, lock behavior, and print/download inclusion.
command-panel.mdComment panel visibility and behavior configuration for the PDF Viewer. Properties (3 total): EnableCommentPanel (bool, default true — enables/disables comment panel feature), CommentPanelVisible (bool, default false — show/hide the panel UI), CommentPanelVisibleChanged (EventCallback<bool> — two-way binding callback). CommentPanelSettings: Multiline (bool, default false — enable multi-line text boxes), DateTimeFormat (string — custom timestamp format). Use to control comment panel availability, visibility state, and comment entry UX for annotation review workflows.
custom-stamp-annotation-settings.mdDefault appearance and behavior configuration for custom stamp/image annotations via PdfViewerCustomStampSettings. Properties (21 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity, StrokeColor, Thickness, Height, Width (annotation dimensions), CustomStamps (List<PdfViewerCustomStamp> with CustomStampName and CustomStampImageSource), EnableCustomStamp (bool, default true), IsAddToMenu (bool — persist new stamps in menu). Use to configure custom image stamps and manage the stamp menu collection.
distance-annotation-settings.mdDefault appearance and behavior configuration for distance measurement annotations via PdfViewerDistanceSettings. Properties (20 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity, StrokeColor, Thickness, LineHeadEndStyle (LineHeadStyle), LineHeadStartStyle (LineHeadStyle), LeaderLength (double, default 40). Use to configure distance measurement annotation defaults including line head styles and leader length.
free-text-annotation-settings.mdDefault appearance and behavior configuration for free text annotations via PdfViewerFreeTextSettings. Properties (27 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, Opacity, Height, Width, AllowEditTextOnly (bool — restrict to text edits only), AutoFit (bool — auto-resize to content), BorderColor (default #ffffff00), BorderStyle (default solid), BorderThickness (int, default 1), DefaultText (default "Type Here"), FillColor (default #ffffff00), FontColor (default #000), FontFamily (default Helvetica), FontSize (int, default 16), FontStyle (FontStyle enum), TextAlignment (TextAlignment enum). Use to fully customize free text annotation default appearance and editing behavior.
handwritten-signature-settings.mdDefault appearance and behavior configuration for handwritten signature annotations via PdfViewerHandwrittenSignatureSettings. Properties (19 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity, StrokeColor, Thickness, Height, Width, SignatureDialogSettings (PdfViewerSignatureDialogSettings with DisplayMode, HideSaveSignature, SignatureFonts). Use to configure handwritten signature defaults including the signature capture dialog options.
highlight-annotation-settings.mdDefault appearance and behavior configuration for highlight annotations via PdfViewerHighlightSettings. Properties (11 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, Opacity (0–1), Color (highlight color), EnableMultiPageAnnotation (bool, default false — allow multi-page highlighting), EnableTextMarkupResizer (bool, default false — show resize handles). Use to set highlight annotation defaults including multi-page support and resizer visibility.
ink-annotation-settings.mdDefault appearance and behavior configuration for ink annotations via PdfViewerInkAnnotationSettings. Properties (18 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity, StrokeColor, Thickness, Height, Width. Use to configure default ink/freehand annotation appearance and size constraints.
line-annotation-settings.mdDefault appearance and behavior configuration for line annotations via PdfViewerLineSettings. Properties (19 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity, StrokeColor, Thickness, LineHeadEndStyle (LineHeadStyle enum), LineHeadStartStyle (LineHeadStyle enum). Use to configure default line annotation styling including configurable line head start and end styles.
measurement-annotations-settings.mdGlobal measurement unit and scale configuration for all measurement annotations via PdfViewerMeasurementSettings. Properties (4 total): ConversionUnit (CalibrationUnit enum, default "in"), Depth (int, default 96), DisplayUnit (CalibrationUnit enum, default "inch"), ScaleRatio (double, default 1 — multiplied against actual measurement for display). Use to set consistent measurement units and scale ratios across all distance, perimeter, area, radius, and volume measurement annotations.
navigation-toolbar-settings.mdNavigation toolbar and panel configuration for the left-side navigation UI. Related properties: EnableNavigationToolbar (bool, default true — show/hide left navigation toolbar), EnableNavigationPanel (bool — enable modern navigation panel for custom items). NavigationToolbarSettings: BuiltInItems (List<NavigationToolbarItem>: Thumbnails, Bookmarks, CommentPanel, PageOrganizer), CustomItems (List<CustomNavigationToolbarItem> with Name, HeaderText, IconCss, Index, TooltipText, ItemType, Template for RenderFragment panel content). Use to customize which navigation panels appear and inject fully custom panel templates with interactive content.
perimeter-annotation-settings.mdDefault appearance and behavior configuration for perimeter measurement annotations via PdfViewerPerimeterSettings. Properties (17 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity (0–1), StrokeColor, Thickness (1–10). Use to set default perimeter measurement annotation appearance, size constraints, and interaction restrictions.
polygon-annotation-settings.mdDefault appearance and behavior configuration for polygon annotations via PdfViewerPolygonSettings. Properties (17 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity (0–1), StrokeColor, Thickness (1–10). Use to set default polygon annotation appearance, size constraints, lock behavior, and print/download inclusion.
radius-annotation-settings.mdDefault appearance and behavior configuration for radius measurement annotations via PdfViewerRadiusSettings. Properties (17 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity (0–1), StrokeColor, Thickness (1–10). Use to set default radius measurement annotation appearance, size constraints, and interaction restrictions.
rectangle-annotation-settings.mdDefault appearance and behavior configuration for rectangle annotations via PdfViewerRectangleSettings. Properties (17 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity (0–1), StrokeColor, Thickness (1–10). Use to set default rectangle annotation appearance, size constraints, lock behavior, and print/download inclusion.
signature-annotation-events.mdLifecycle and interaction events specific to handwritten signature annotations (7 events total). Events: AddSignature (Bound, Opacity, StrokeColor, Thickness, Id, PageNumber), MoveSignature (CurrentPosition, PreviousPosition, Opacity, StrokeColor, Thickness, Id, PageNumber), RemoveSignature (Bound, Id, PageNumber), ResizeSignature (CurrentPosition, PreviousPosition, Opacity, StrokeColor, Thickness, Id, PageNumber), SignaturePropertiesChange (IsOpacityChanged, IsStrokeColorChanged, IsThicknessChanged, NewValue, OldValue, Id, PageNumber), SignatureSelected (Id, PageNumber), SignatureUnselected (Id, PageNumber). Use to track signature lifecycle, validate changes, and synchronize signature state with application data.
squiggly-annotation-settings.mdDefault appearance and behavior configuration for squiggly annotations via PdfViewerSquigglySettings. Properties (11 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, Opacity (0–1), Color (squiggly color), EnableMultiPageAnnotation (bool, default false), EnableTextMarkupResizer (bool, default false). Use to set squiggly text markup annotation defaults including multi-page support and resizer visibility.
stamp-annotation-settings.mdDefault appearance and behavior configuration for stamp/image annotations via PdfViewerStampSettings. Properties (22 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity, StrokeColor, Thickness, Height, Width, DateTimeFormat (custom date/time format for dynamic stamps), DynamicStamps (List<DynamicStampItem>), SignStamps (List<SignStampItem>), StandardBusinessStamps (List<StandardBusinessStampItem>). Use to configure which built-in stamp types appear in the annotation toolbar and customize stamp defaults.
sticky-notes-annotation-settings.mdDefault appearance and behavior configuration for sticky notes annotations via PdfViewerStickyNotesSettings. Properties (11 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, Opacity (0–1). Use to set sticky note annotation defaults including interaction restrictions, size constraints, and print/download behavior.
strikethrough-annotation-settings.mdDefault appearance and behavior configuration for strikethrough annotations via PdfViewerStrikethroughSettings. Properties (11 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, Opacity (0–1), Color (strikethrough color), EnableMultiPageAnnotation (bool, default false), EnableTextMarkupResizer (bool, default false). Use to set strikethrough text markup annotation defaults including multi-page support and resizer visibility.
text-selection-and-extraction.mdDescribes about the funtionlities of the text selection and text extraction process via EnableTextSelection, IsExtractText for enable or disable properties, ClearTextSelectionAsync and SelectTextRegionAsync methods for programmtical text selection, OnTextSelectionEnd, OnTextSelectionStart, ExtractTextCompleted events for tracking the process.
tile-rendering.mdTile rendering configuration for performance optimization via PdfViewerTileRenderingSettings. Properties (3 total): EnableTileRendering (bool — enable/disable tile-based rendering), X (int — horizontal tile coordinate count), Y (int — vertical tile coordinate count). Use to enable tile rendering for large or complex PDFs to improve rendering performance by splitting pages into tiles.
underline-annotation-settings.mdDefault appearance and behavior configuration for underline annotations via PdfViewerUnderlineSettings. Properties (11 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, Opacity (0–1), Color (underline color), EnableMultiPageAnnotation (bool, default false), EnableTextMarkupResizer (bool, default false). Use to set underline text markup annotation defaults including multi-page support and resizer visibility.
volume-annotation-settings.mdDefault appearance and behavior configuration for volume measurement annotations via PdfViewerVolumeSettings. Properties (17 total): AllowedInteractions, Author, CustomData, IsLock, IsPrint, MaxHeight, MaxWidth, MinHeight, MinWidth, SkipDownload, SkipPrint, AnnotationSelectorSettings, BorderDashArray, FillColor, Opacity (0–1), StrokeColor, Thickness (1–10). Use to set default volume measurement annotation appearance, size constraints, and interaction restrictions.
azure-container-deployment.mdComprehensive guide for deploying Blazor PDF Viewer applications to Azure using Docker containers, Azure Container Registry (ACR), and Azure App Service. INFORMATIONAL ONLY - NO PROJECT CHANGES. Covers prerequisites, Dockerfile configurations for Server and WebAssembly modes, native dependency requirements (libgdiplus), local Docker build/test commands, ACR setup and image push steps, Azure App Service creation and container configuration, troubleshooting guides for common deployment issues, and best practices for production deployment. Use when providing deployment guidance, answering Azure container questions, or explaining Docker containerization for PDF Viewer applications.

所有模板和操作片段都存储在
references/*.md
中。代理在生成示例时会组合这些聚焦的片段或模板。
流程: 始终从
references/basic-sample.md
开始,然后将匹配的功能合并到其锚点(PROPS、EVENTS、UI_BUTTONS、HANDLERS)中。如果没有匹配的关键词,仅返回基础示例。
文件用途
basic-sample.md基础设置和最小化PDF Viewer组件。包含完整的设置先决条件。提供带有DocumentPath、Height、Width属性和功能锚点的最小可工作组件。作为所有PDF Viewer实现的基础,需进行正确的项目设置和配置验证。
toolbar-properties.md使用PdfViewerToolbarSettings进行全面的工具栏自定义。包含11个属性(ShowTooltip、EnableToolbar、EnableAnnotationToolbar、IsAnnotationToolbarVisible、ToolbarSettings、ToolbarClicked、ToolbarItems、AnnotationToolbarItems、FormDesignerToolbarItems、MobileToolbarItems、RedactionToolbarItems、CustomToolbarItems),5个专用工具栏(主工具栏、注释工具栏、表单设计器工具栏、移动端工具栏、红action工具栏),分别有14/22/9/7/7个项,以及7个代码示例。用于简化工作流的UI、创建基于角色的工具访问权限、优化移动端体验、添加自定义功能,以及控制注释/表单/红action功能。
toolbar-methods.md用于工具栏可见性和行为的程序化控制方法。包含5个方法(ShowToolbarAsync、ShowAnnotationToolbar、ShowRedactionToolbar、EnableToolbarItemsAsync、ShowToolbarItemsAsync),14个可精细控制的工具栏项(OpenOption、PrintOption、DownloadOption、SearchOption、MagnificationTool、PageNavigationTool、SelectionTool、PanTool、AnnotationEditTool、CommentTool、FormDesigner、SubmitForm、UndoRedoTool、Redaction)。
magnification.md带有10个属性、7个方法、1个事件和全面决策指导的程序化缩放/放大控制。属性:ZoomMode(默认/适合页面/适合宽度/适合高度)、ZoomValue(10-400%)、MinZoomValue(默认10)、MaxZoomValue(默认400)、EnableMagnification(默认true)、EnablePinchZoom(默认true)、EnableZoomOptimization(默认true)、RestrictZoomRequest(重用100%图像以提升性能)、ZoomValueChanged回调、ZoomValueExpression(双向绑定)、TileRenderingSettings(性能)。方法:ZoomAsync(精确百分比)、ZoomInAsync(步进至预设值)、ZoomOutAsync(步进至预设值)、FitToPageAsync、FitToWidthAsync、FitToHeightAsync、GetZoomPercentageAsync。事件:ZoomChanged(CurrentZoomValue、PreviousZoomValue)。
text-search.md用于PDF文档内容发现和导航的完整文本搜索功能。EnableTextSearch属性(布尔值,默认true)用于切换搜索可用性。文本搜索方法(共4个):SearchTextAsync(字符串searchText,布尔值isMatchCase区分大小写/不区分大小写搜索)、SearchNextAsync(导航到下一个结果)、SearchPreviousAsync(导航到上一个结果)、CancelTextSearchAsync(清除高亮并取消搜索)。搜索配置:PdfViewerTextSearchColorSettings包含SearchColor(找到的文本颜色,默认#8b4c12)、SearchHighlightColor(高亮文本颜色,默认#fdd835)用于视觉自定义。搜索事件(共3个):OnTextSearchStart(SearchText、MatchCase参数)、OnTextSearchComplete(SearchText、MatchCase用于跟踪完成情况)、OnTextSearchHighlight(PageNumber、Bound包含X/Y/Width/Height坐标用于跟踪结果位置)。
annotation-events.md关于注释生命周期、交互和签名特定事件的全面参考(共20+个事件)。包括事件订阅模式、事件类别(添加/修改/删除、选择/移动/调整大小、签名操作)、带有详细参数和属性的完整事件列表,以及支持的类型定义(Bound、PdfAnnotationProperties、AnnotationType、PdfAnnotation等)。
annotation-properties.md通过布尔属性启用/禁用13+种注释功能类型(自由文本、形状、文本标记、便签、墨迹、手写签名、测量、图章、图像)的参考。包含程序化方法(SetAnnotationModeAsync、UpdateMeasurementSettingsAsync)、导出配置(文件名、格式)、签名控制(可编辑性、数字外观),以及全面的类型定义(AnnotationType、DynamicStampItem、SignStampItem、StandardBusinessStampItem)。
annotation-settings.md针对20+种注释类型(22+个设置类)的默认外观、行为、大小约束和限制的配置。属性控制颜色(笔触、填充、字体、边框)、大小约束(最小/最大宽度/高度)、锁定(IsLock、AllowedInteractions)、打印/下载包含性、作者信息、选择手柄(调整大小器)、自定义图章、文本标记行为、测量单位(ConversionUnit、ScaleRatio)和线端样式。包含形状标签设置,用于自定义形状/测量注释的标签(FillColor、FontColor、FontSize、LabelContent、Opacity)。提供声明式(基于标签)和程序化(属性绑定)两种实现方式,包含40+个属性和全面的类型定义(CursorType、AnnotationResizerShape、LineHeadStyle等)。
redaction-settings.md用于从PDF中永久删除敏感信息的完整红action配置API。核心覆盖属性(共9个):OverlayText、MarkerFillColor、MarkerBorderColor、MarkerOpacity(透明度0-1)、FontColor、FontSize、FontFamily、IsRepeat(文本重复)、TextAlignment(左/居中/右)。安全和控制属性:AllowedInteractions(6个选项:Delete、Move、Select、PropertyChange、Resize、None)、IsLock(防止修改)、Author(跟踪)、CustomData(元数据存储)、IsPrint(打印包含性)。大小约束:MinWidth、MaxWidth、MinHeight、MaxHeight用于尺寸控制。下载/打印控制:SkipPrint、SkipDownload、IsPrint用于文档持久化。视觉样式:BorderDashArray、FillColor、Opacity、StrokeColor、Thickness(边框宽度1-10)。注释选择器设置。
programmatical-annotation-methods.md用于程序化注释生命周期管理、红action和导出/导入工作流的完整API。注释CRUD方法(共15个):AddAnnotationAsync(4种变体,用于基础/动态图章/签名图章/标准商务图章)、AddAnnotationsAsync(批量)、EditAnnotationAsync、DeleteAnnotationAsync(3种变体:无参数/按对象/按ID)、DeleteAnnotationsAsync(3种变体)、GetAnnotationsAsync、SelectAnnotationAsync(2种变体)、ClearSelectionAsync。红action方法:AddPageRedactionsAsync、RedactAsync(永久)。导出/导入:ExportAnnotationAsync(Json/Xfdf格式)、ExportAnnotationAsStreamAsync、ExportAnnotationsAsObjectAsync、ImportAnnotationAsync(流/对象)。
command-manager.md自定义键盘快捷键和评论面板自定义的双功能参考。命令管理器:PdfViewerCommandManager带有KeyboardCommand/KeyGesture,用于通过CommandExecutedEventArgs将组合键(Ctrl/Alt/Shift/Meta + A-Z/0-9/F1-F12/箭头/特殊键)映射到自定义操作。评论面板设置:PdfViewerCommentPanelSettings带有Multiline(启用详细的多行评论)、DateTimeFormat(用于合规/本地化的自定义时间戳格式)和可见性控制(CommentPanelVisible布尔值、CommentPanelVisibleChanged事件用于双向绑定)。包含实现模式、决策指南(覆盖与扩展快捷键、多行与单行评论)和完整的代码示例。
document-properties.md用于PDF处理的文档级配置、元数据和生命周期事件。属性:EnableAutoComplete(表单字段自动完成)、EnableChunkMessages(大文件处理)、IsExtractText(异步文本提取)。事件(共8个):DocumentLoaded(DocumentName、PageCount、PageSizes)、DocumentLoadFailed(IsPasswordRequired状态)、DocumentUnloaded、DocumentEdited(EditingAction: AnnotationAdded/Deleted/Updated、FormFieldImported/Updated)、PageMouseover(PageX/Y坐标)、PageSelected(SelectedPages列表)、OnPageClick(点击坐标)、ExtractTextCompleted(DocumentTextCollection)。继承的API:PageInfo(PageNumber、Width、Height、RotationAngle)、DocumentInfo(PageCount、PageSizes)。
file-save-properties.md带有完整事件驱动工作流的文件下载和注释导出/导入功能。属性:EnableDownload(布尔值,用于切换工具栏下载按钮)。方法:DownloadAsync()用于程序化文档下载。事件(共8个):DownloadStart(FileName)、DownloadEnd(DownloadDocument base64字符串、FileName)、ExportStarted、ExportSucceed(FileName)、ExportFailed(ErrorDetails)、ImportStarted、ImportSucceed、ImportFailed(ErrorDetails)。用于文档持久化工作流、下载跟踪和日志记录、注释导出/导入操作、文件操作的用户反馈、失败导入/导出的错误处理,以及文档下载的审计跟踪。
ui-properties.md用于自定义查看器体验的核心UI属性和超链接交互事件。包含4个属性(EnableDesktopMode、EnableErrorDialog、EnableHyperlink、EnableRtl)用于控制UI行为和设备模式,3个事件(OnHyperlinkClick、OnHyperlinkMouseOver、Created)用于处理超链接导航和生命周期,以及4个代码示例。用于为不同设备自定义查看器外观、控制超链接导航、管理错误处理,以及支持国际化(RTL)。
form-field-properties.md核心表单字段配置和设计模式控制(4个属性,1个方法)。属性:EnableFormDesigner(启用/禁用表单设计器工具)EnableFormFields(控制用户与现有字段的交互)EnableFormFieldsValidation(启用自动验证)IsFormFieldDocument(只读检测PDF中的表单字段)。方法:SetFormDrawingModeAsync(FormFieldType?)用于程序化设置表单字段绘制模式,支持8种字段类型(Button、CheckBox、DropDown、ListBox、Password、RadioButton、SignatureField、Textbox)。用于表单设计器工作流控制、表单字段交互管理、自动验证设置、文档功能检测,以及动态表单字段类型切换。
form-field-settings.md带有7个属性和全面决策指导的表单字段视觉外观和样式配置。属性:BackgroundColor(HEX/RGB/CSS颜色)、BorderColor、Color(文本颜色)、FontFamily(带有回退支持:Arial、Verdana、Times New Roman)、FontSize(双精度类型)、FontStyle(Bold、Italic、None、Strikethrough、Underline)、Thickness(边框宽度0-n像素,0=无边框)。包含4个常见场景:高对比度可访问表单(WCAG指南)、企业品牌表单(公司颜色/字体)、最小化无边框设计(现代美学)、粗体文本强调。决策指南:颜色选择(高对比度用于可访问性、企业调色板用于品牌、柔和色调用于禁用字段)、字体属性(FontFamily建议通用/易读、FontSize指南10-12标准/12-14推荐/14-16可访问)、边框厚度建议(0无边框、1标准、1.5-2强调、2+可访问)。
form-designer-events.md关于生命周期、交互、验证和数据管理的全面表单字段事件参考(共20+个事件)。事件类别:生命周期(FormFieldAdding/Added/Deleted/PropertyChanged,支持取消)、交互(Selected/Unselected/Click/DoubleClick/Resized/FocusIn/FocusOut,带有坐标)、鼠标(MouseEnter/Leave,带有PageX/PageY)、验证(ValidateFormFields,带有UnfilledFields字典)、导入/导出(Importing/Imported/ImportFailed、Exporting/Exported/ExportFailed,带有ErrorDetails)、设计器模式(IsDesignerModeChanged)。类型定义:FormFieldInfo(16个属性:BackgroundColor、BorderColor、Bounds、Color、CustomData、FontFamily、FontSize、FontStyle、Id、IsReadOnly、IsRequired、Name、PageNumber、TextAlignment、Thickness、TooltipText、Type、Visibility)、Bound、FontStyle、TextAlignment、FormFieldType(8种类型)、VisibilityMode(4种模式)、FormField、SignatureType。
programmatical-form-field-methods.md用于程序化表单字段生命周期管理、批量操作和导出/导入工作流的完整API。表单字段CRUD方法(共13个):AddFormFieldsAsync(批量添加)、GetFormFieldsAsync(检索所有)、UpdateFormFieldsAsync(单个/批量变体)、DeleteFormFieldsAsync(3种变体:全部/选中/按ID)、SelectFormFieldAsync(按对象/按ID)、RetrieveFormFieldsAsync(旧版)。导出/导入:ExportFormFieldsAsync(带有格式参数)、ExportFormFieldsAsObjectAsync、ImportFormFieldsAsync(Dictionary/Stream变体,带有格式参数)。
thumbnail-bookmark.md用于程序化导航、文本选择和缩略图/书签面板管理的全面参考。包含5个方法(ClearTextSelectionAsync、GetBookmarksAsync、GoToBookmarkAsync、OpenThumbnailPaneAsync、SelectTextRegionAsync),4个UI属性(EnableBookmarkPanel、EnableTextSelection、EnableThumbnailPanel、IsThumbnailPanelOpen),以及3个交互事件(OnTextSelectionEnd、OnTextSelectionStart、OnThumbnailClick)。用于实现自定义导航UI、程序化文本高亮、基于书签的工作流,以及文本选择管理。
contextmenu-settings.md当用户需要自定义PDF Viewer的上下文菜单设置时使用。
undo-redo-properties.md用于跟踪和撤销文档更改的全面撤销/重做功能。包含4个属性(CanUndo、CanUndoChanged、CanRedo、CanRedoChanged)用于跟踪撤销/重做状态,带有事件回调用于双向绑定,2个异步方法(UndoAsync、RedoAsync)用于执行撤销/重做操作,以及2个代码示例。跟踪所有用户操作,包括注释、表单字段输入、编辑和修改。用于实现撤销/重做按钮、跟踪文档编辑历史、提供键盘快捷键(Ctrl+Z/Ctrl+Y),以及管理文档状态变化。
navigation-methods.md程序化页面导航控制和文档信息检索(共9个方法)。方法:GoToFirstPageAsync/GoToLastPageAsync/GoToNextPageAsync/GoToPreviousPageAsync(导航)、GoToPageAsync(int pageNumber)用于跳转(从1开始索引)、GetPageCountAsync(异步获取总页数)、GetPageDetails(同步获取页面元数据List<PageInfo>)、ShowNavigationToolbarAsync(bool)(工具栏可见性)、ToggleItemByIndex(int)(面板切换)。继承的API:PageInfo(PageNumber、Width、Height、RotationAngle)、PageRotation枚举(RotateAngle0/90/180/270)、PdfViewerEvents.PageChanged(CurrentPageNumber、PreviousPageNumber、DocumentName)。实现说明:从1开始索引,所有GoTo*方法都是异步的(需要await),GetPageCountAsync是异步的,GetPageDetails是同步的,无效页码保持当前页面。
navigation-properties.md用于PDF查看器中页面状态跟踪、导航工具栏自定义和UI同步的属性。包含CurrentPageNumber、PageCount,以及事件回调(CurrentPageNumberChanged、PageCountChanged)用于实时页面监控。配置NavigationToolbarSettings以显示/隐藏内置项(Thumbnails、Bookmarks、CommentPanel、PageOrganizer),或为导航工具栏注入自定义工具栏按钮和分隔符
page-organizer.md用于程序化页面操作、文档结构编辑和页面组织器UI配置的完整API。页面操作方法(共8个):DeletePagesAsync、DuplicatePagesAsync、ExtractPagesAsync、ExtractPagesAsStreamAsync、InsertPagesAsync、InsertBlankPagesAsync、MovePagesAsync、RotatePagesAsync、RotatePagesToAngleAsync支持基于索引(从0开始)的页面操作。PageOrganizerSettings提供功能控制(CanDelete、CanInsert、CanRotate、CanDuplicate、CanRearrange、CanImport、CanExtractPages)、缩略图缩放管理(ImageZoom、ShowImageZoomingSlider、ImageZoomMin/Max)和页脚按钮可见性(Save/SaveAs)。事件:PageOrganizerSaveRequested、PageOrganizerZoomChanged用于保存/缩放工作流。支持的类型:RotationDirection(顺时针/逆时针)、PageRotation(0°/90°/180°/270°)。
page-organizer-settings.md页面组织器功能的专用设置配置。属性(共12个):CanDelete、CanInsert、CanRotate、CanDuplicate、CanRearrange、CanImport、CanExtractPages(布尔值功能开关)、ImageZoom(缩略图缩放级别)、ShowImageZoomingSlider(布尔值)、ImageZoomMin/ImageZoomMax(可接受范围:2–5)、FooterButtons(FooterButton枚举用于Save/SaveAs可见性)。与PageOrganizerSettings标签一起使用,以精细控制允许的页面操作并配置缩略图缩放行为。
print.mdPDF文档的打印功能配置、质量控制和事件驱动工作流。打印控制属性(共4个):EnablePrint(布尔值,用于切换工具栏打印按钮,默认true)、EnablePrintRotation(布尔值,打印时自动旋转横向文档,默认true)、PrintScaleFactor(双精度质量乘数1.0-5.0+,指南:1.0标准、1.5-2.0演示、2.5-3.5技术图纸)、PrintMode(Default/NewWindow枚举用于打印对话框位置)。打印方法:PrintAsync()用于程序化打印。打印事件(共2个):PrintStart(Cancel布尔值用于权限验证、FileName用于文档跟踪)、PrintEnd(FileName用于审计日志和打印后操作)。支持的类型:PrintMode枚举(Default/NewWindow)、PrintStartEventArgs、PrintEndEventArgs。常见场景:受限文档预览(EnablePrint=false)、高质量输出(调整PrintScaleFactor)、横向文档处理(控制EnablePrintRotation)、基于权限的访问控制、打印审计跟踪。
pdfviewer-properties.mdBlazor SfPdfViewer组件的常规配置属性,控制UI外观和查看器行为。属性(共15个):Height、Width(可滚动尺寸)、Id(DOM元素ID)、CssClass(自定义样式)、DocumentPath(初始PDF路径)、DownloadFileName(下载文件名)、Locale(文化/本地化,默认en-US)、InteractionMode(Pan/TextSelection)、HyperlinkOpenState(CurrentTab/NewTab/NewWindow)、CustomFonts(文档文本的本地字体路径)、FallbackFontCollection(Dictionary<string, Stream>用于自定义自由文本字体)、FontFamilies(首选字体列表)、RetryCount(服务调用重试次数,默认1)、IsDocumentEdited(只读编辑状态跟踪)。用于配置初始查看器外观、字体支持、交互行为和本地化。
pdfviewer-methods.mdBlazor SfPdfViewer组件的核心生命周期和文档操作方法。方法(共8个):LoadAsync(string/Stream/byte[], password)用于从路径/URL/流/字节数组加载PDF、SaveAsync(filePath)用于服务器端保存、UnloadAsync()用于内存清理、GetDocumentAsync()以字节数组形式检索修改后的文档、UpdateViewerContainerAsync()用于响应式布局重排、DownloadAsync()用于浏览器下载、Dispose()/Dispose(bool)用于资源清理。用于程序化文档生命周期管理、从不同来源加载PDF、保存更改,以及容器响应性。
annotation-methods.mdBlazor SfPdfViewer的程序化注释模式控制方法。方法(共2个):SetAnnotationModeAsync(AnnotationType)用于激活特定注释类型以进行下一次用户交互、SetAnnotationModeAsync(AnnotationType, DynamicStampItem?, SignStampItem?, StandardBusinessStampItem?)重载用于图章注释类型(动态/签名/标准商务)、UpdateMeasurementSettingsAsync()用于更新现有测量注释的测量设置。用于在不使用工具栏交互的情况下程序化切换注释模式、实现自定义注释工具栏,以及自动化注释工作流。
annotation-selector-settings.md通过PdfViewerAnnotationSelectorSettings进行全局注释选择器外观配置。属性(共9个):ResizerBorderColor(调整大小器手柄边框,默认黑色)、ResizerCursorType(CursorType枚举,默认null)、ResizerFillColor(调整大小器手柄填充色)、ResizerLocation(AnnotationResizerLocation: Corners/Edges/All)、ResizerShape(AnnotationResizerShape: Square/Circle,默认Square)、ResizerSize(手柄大小,单位px)、SelectionBorderColor(选择轮廓颜色)、SelectionBorderThickness(选择边框宽度1–10,默认1)、SelectorLineDashArray(虚线模式double[])。与PdfViewerAnnotationSelectorSettings标签一起使用,为所有注释类型配置通用的选择器样式。
area-annotation-settings.md通过PdfViewerAreaSettings进行区域注释的默认外观和行为配置。属性(共17个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity(0–1)、StrokeColor、Thickness(1–10)。用于设置区域注释的默认外观、大小约束、锁定行为,以及打印/下载包含性。
arrow-annotation-settings.md通过PdfViewerArrowSettings进行箭头注释的默认外观和行为配置。属性(共19个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity(0–1)、StrokeColor、Thickness(1–10)、LineHeadEndStyle(LineHeadStyle枚举)、LineHeadStartStyle(LineHeadStyle枚举)。用于配置箭头注释的默认样式,包括两端的线端样式。
circle-annotation-settings.md通过PdfViewerCircleSettings进行圆形注释的默认外观和行为配置。属性(共17个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity(0–1)、StrokeColor、Thickness(1–10)。用于设置圆形注释的默认外观、大小约束、锁定行为,以及打印/下载包含性。
command-panel.mdPDF Viewer的评论面板可见性和行为配置。属性(共3个):EnableCommentPanel(布尔值,默认true — 启用/禁用评论面板功能)、CommentPanelVisible(布尔值,默认false — 显示/隐藏面板UI)、CommentPanelVisibleChanged(EventCallback<bool> — 双向绑定回调)。CommentPanelSettings:Multiline(布尔值,默认false — 启用多行文本框)、DateTimeFormat(字符串 — 自定义时间戳格式)。用于控制评论面板的可用性、可见性状态,以及注释审核工作流中的评论输入体验。
custom-stamp-annotation-settings.md通过PdfViewerCustomStampSettings进行自定义图章/图像注释的默认外观和行为配置。属性(共21个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity、StrokeColor、Thickness、Height、Width(注释尺寸)、CustomStamps(List<PdfViewerCustomStamp>带有CustomStampName和CustomStampImageSource)、EnableCustomStamp(布尔值,默认true)、IsAddToMenu(布尔值 — 将新图章保留在菜单中)。用于配置自定义图像图章并管理图章菜单集合。
distance-annotation-settings.md通过PdfViewerDistanceSettings进行距离测量注释的默认外观和行为配置。属性(共20个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity、StrokeColor、Thickness、LineHeadEndStyle(LineHeadStyle)、LineHeadStartStyle(LineHeadStyle)、LeaderLength(双精度,默认40)。用于配置距离测量注释的默认值,包括线端样式和引线长度。
free-text-annotation-settings.md通过PdfViewerFreeTextSettings进行自由文本注释的默认外观和行为配置。属性(共27个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、Opacity、Height、Width、AllowEditTextOnly(布尔值 — 仅限制文本编辑)、AutoFit(布尔值 — 根据内容自动调整大小)、BorderColor(默认#ffffff00)、BorderStyle(默认solid)、BorderThickness(整数,默认1)、DefaultText(默认"Type Here")、FillColor(默认#ffffff00)、FontColor(默认#000)、FontFamily(默认Helvetica)、FontSize(整数,默认16)、FontStyle(FontStyle枚举)、TextAlignment(TextAlignment枚举)。用于全面自定义自由文本注释的默认外观和编辑行为。
handwritten-signature-settings.md通过PdfViewerHandwrittenSignatureSettings进行手写签名注释的默认外观和行为配置。属性(共19个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity、StrokeColor、Thickness、Height、Width、SignatureDialogSettings(PdfViewerSignatureDialogSettings带有DisplayMode、HideSaveSignature、SignatureFonts)。用于配置手写签名的默认值,包括签名捕获对话框选项。
highlight-annotation-settings.md通过PdfViewerHighlightSettings进行高亮注释的默认外观和行为配置。属性(共11个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、Opacity(0–1)、Color(高亮颜色)、EnableMultiPageAnnotation(布尔值,默认false — 允许多页高亮)、EnableTextMarkupResizer(布尔值,默认false — 显示调整大小手柄)。用于设置高亮注释的默认值,包括多页支持和调整大小手柄可见性。
ink-annotation-settings.md通过PdfViewerInkAnnotationSettings进行墨迹注释的默认外观和行为配置。属性(共18个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity、StrokeColor、Thickness、Height、Width。用于配置默认墨迹/手绘注释的外观和大小约束。
line-annotation-settings.md通过PdfViewerLineSettings进行线条注释的默认外观和行为配置。属性(共19个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity(0–1)、StrokeColor、Thickness、LineHeadEndStyle(LineHeadStyle枚举)、LineHeadStartStyle(LineHeadStyle枚举)。用于配置默认线条注释的样式,包括可配置的线端起始和结束样式。
measurement-annotations-settings.md通过PdfViewerMeasurementSettings为所有测量注释进行全局测量单位和比例配置。属性(共4个):ConversionUnit(CalibrationUnit枚举,默认"in")、Depth(整数,默认96)、DisplayUnit(CalibrationUnit枚举,默认"inch")、ScaleRatio(双精度,默认1 — 与实际测量值相乘用于显示)。用于为所有距离、周长、面积、半径和体积测量注释设置一致的测量单位和比例。
navigation-toolbar-settings.md左侧导航UI的导航工具栏和面板配置。相关属性:EnableNavigationToolbar(布尔值,默认true — 显示/隐藏左侧导航工具栏)、EnableNavigationPanel(布尔值 — 启用现代导航面板以添加自定义项)。NavigationToolbarSettings:BuiltInItems(List<NavigationToolbarItem>: Thumbnails、Bookmarks、CommentPanel、PageOrganizer)、CustomItems(List<CustomNavigationToolbarItem>带有Name、HeaderText、IconCss、Index、TooltipText、ItemType、Template用于RenderFragment面板内容)。用于自定义显示的导航面板,并注入带有交互内容的完全自定义面板模板。
perimeter-annotation-settings.md通过PdfViewerPerimeterSettings进行周长测量注释的默认外观和行为配置。属性(共17个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity(0–1)、StrokeColor、Thickness(1–10)。用于设置周长测量注释的默认外观、大小约束和交互限制。
polygon-annotation-settings.md通过PdfViewerPolygonSettings进行多边形注释的默认外观和行为配置。属性(共17个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity(0–1)、StrokeColor、Thickness(1–10)。用于设置多边形注释的默认外观、大小约束、锁定行为,以及打印/下载包含性。
radius-annotation-settings.md通过PdfViewerRadiusSettings进行半径测量注释的默认外观和行为配置。属性(共17个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity(0–1)、StrokeColor、Thickness(1–10)。用于设置半径测量注释的默认外观、大小约束和交互限制。
rectangle-annotation-settings.md通过PdfViewerRectangleSettings进行矩形注释的默认外观和行为配置。属性(共17个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity(0–1)、StrokeColor、Thickness(1–10)。用于设置矩形注释的默认外观、大小约束、锁定行为,以及打印/下载包含性。
signature-annotation-events.md特定于手写签名注释的生命周期和交互事件(共7个事件)。事件:AddSignature(Bound、Opacity、StrokeColor、Thickness、Id、PageNumber)、MoveSignature(CurrentPosition、PreviousPosition、Opacity、StrokeColor、Thickness、Id、PageNumber)、RemoveSignature(Bound、Id、PageNumber)、ResizeSignature(CurrentPosition、PreviousPosition、Opacity、StrokeColor、Thickness、Id、PageNumber)、SignaturePropertiesChange(IsOpacityChanged、IsStrokeColorChanged、IsThicknessChanged、NewValue、OldValue、Id、PageNumber)、SignatureSelected(Id、PageNumber)、SignatureUnselected(Id、PageNumber)。用于跟踪签名生命周期、验证更改,以及将签名状态与应用程序数据同步。
squiggly-annotation-settings.md通过PdfViewerSquigglySettings进行波浪线注释的默认外观和行为配置。属性(共11个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、Opacity(0–1)、Color(波浪线颜色)、EnableMultiPageAnnotation(布尔值,默认false)、EnableTextMarkupResizer(布尔值,默认false)。用于设置波浪线文本标记注释的默认值,包括多页支持和调整大小手柄可见性。
stamp-annotation-settings.md通过PdfViewerStampSettings进行图章/图像注释的默认外观和行为配置。属性(共22个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity、StrokeColor、Thickness、Height、Width、DateTimeFormat(动态图章的自定义日期/时间格式)、DynamicStamps(List<DynamicStampItem>)、SignStamps(List<SignStampItem>)、StandardBusinessStamps(List<StandardBusinessStampItem>)。用于配置注释工具栏中显示的内置图章类型,并自定义图章默认值。
sticky-notes-annotation-settings.md通过PdfViewerStickyNotesSettings进行便签注释的默认外观和行为配置。属性(共11个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、Opacity(0–1)。用于设置便签注释的默认值,包括交互限制、大小约束和打印/下载行为。
strikethrough-annotation-settings.md通过PdfViewerStrikethroughSettings进行删除线注释的默认外观和行为配置。属性(共11个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、Opacity(0–1)、Color(删除线颜色)、EnableMultiPageAnnotation(布尔值,默认false)、EnableTextMarkupResizer(布尔值,默认false)。用于设置删除线文本标记注释的默认值,包括多页支持和调整大小手柄可见性。
text-selection-and-extraction.md描述文本选择和文本提取过程的功能,通过EnableTextSelection、IsExtractText属性启用或禁用,ClearTextSelectionAsync和SelectTextRegionAsync方法用于程序化文本选择,OnTextSelectionEnd、OnTextSelectionStart、ExtractTextCompleted事件用于跟踪过程。
tile-rendering.md通过PdfViewerTileRenderingSettings进行分块渲染配置以优化性能。属性(共3个):EnableTileRendering(布尔值 — 启用/禁用基于分块的渲染)、X(整数 — 水平分块坐标数量)、Y(整数 — 垂直分块坐标数量)。用于为大型或复杂PDF启用分块渲染,通过将页面拆分为分块来提升渲染性能。
underline-annotation-settings.md通过PdfViewerUnderlineSettings进行下划线注释的默认外观和行为配置。属性(共11个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、Opacity(0–1)、Color(下划线颜色)、EnableMultiPageAnnotation(布尔值,默认false)、EnableTextMarkupResizer(布尔值,默认false)。用于设置下划线文本标记注释的默认值,包括多页支持和调整大小手柄可见性。
volume-annotation-settings.md通过PdfViewerVolumeSettings进行体积测量注释的默认外观和行为配置。属性(共17个):AllowedInteractions、Author、CustomData、IsLock、IsPrint、MaxHeight、MaxWidth、MinHeight、MinWidth、SkipDownload、SkipPrint、AnnotationSelectorSettings、BorderDashArray、FillColor、Opacity(0–1)、StrokeColor、Thickness(1–10)。用于设置体积测量注释的默认外观、大小约束和交互限制。
azure-container-deployment.md使用Docker容器、Azure容器注册表(ACR)和Azure应用服务将Blazor PDF Viewer应用程序部署到Azure的全面指南。仅作信息参考 - 不修改项目。涵盖先决条件、Server和WebAssembly模式的Dockerfile配置、原生依赖要求(libgdiplus)、本地Docker构建/测试命令、ACR设置和镜像推送步骤、Azure应用服务创建和容器配置、常见部署问题的故障排除指南,以及生产部署的最佳实践。用于提供部署指导、回答Azure容器问题,或解释PDF Viewer应用程序的Docker容器化。