MCPInstall

syncfusion-aspnetcore-pdf-viewer

Implements the Syncfusion ASP.NET Core PDFViewer for embedding, configuring, and loading PDF documents. Use this when rendering PDFs in ASP.NET Core applications, embedding viewer controls, or generating Razor page (.cshtml) code for PDF display and interaction.

Installs
57
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/syncfusion/pdf-viewer-sdk-skills --skill syncfusion-aspnetcore-pdf-viewer
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads syncfusion-aspnetcore-pdf-viewer automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Syncfusion ASP.NET Core Pdfviewer – UI Sample Generator

NuGet: Syncfusion.EJ2.AspNet.Core

Generate Code for the User's Project (default)

Trigger keywords: "how to", "add pdfviewer", "code sample", "show me", "example", "snippet", "integrate", "component", "create sample", "ASP.NET Core sample".

Purpose: Generate minimal, copy-pasteable Razor + HTML code (.cshtml) that the user can integrate directly into their ASP.NET Core 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 ASP.NET Core 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.

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

  • Read the relevant references/*.md file(s) for the requested feature
  • Cross-reference EVERY API, property, and method against these tables
  • 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

Reference File Routing Guide

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 getting-started.md, then merge matched features into its anchors (PROPS, EVENTS, UI_BUTTONS, HANDLERS). If no keyword matches, return only the basic sample.

Checklist Before Generating Code

  • Count the settings properties: 1-3? → Use inline | 4+? → Use separate razor code block
  • Is the component prop simple enough? Yes → Keep inline | No → Extract to separate razor code block
  • Are Default values set for properties explicitly? Yes → Remove | No → Keep it

🎯 Core Setup & Configuration

FilePurpose
getting-started.mdMinimal PDF Viewer with documentPath, height, and width. Base template for all samples.
enable-properties.mdEnable/disable specific features (toolbar, annotations, forms, navigation, text selection, download, print).
general-properties.mdConfigure core viewer properties and behavior (documentPath, width/height, locale, zoom/initialRenderPages), server/integration settings (serviceUrl, ajaxRequestSettings, serverActionSettings), resource loading (resourceUrl, customFonts), and performance/retry options.

Context Menu

FilePurpose
contextmenu.mdContext-aware context menu for text, annotations, and form fields; add custom items via addCustomMenu, handle clicks with customContextMenuSelect, dynamically show/hide items with customContextMenuBeforeOpen, and disable the menu using contextMenuOption. Configure default context menu using context menu settings.

Navigation Features

FilePurpose
navigation.mdEnable/disable page navigation (first/last/previous/next/go to page), thumbnail view and navigation, hyperlink support (internal and external links), table of contents navigation, programmatic navigation methods, and navigation-related events.
bookmark-navigation.mdEnable/disable and show/hide bookmark navigation. Programmatically retrieve bookmarks for a document

Core Viewing and Interaction

FilePurpose
viewing-and-interaction.mdUnderstand interaction modes (Text Selection/Pan), page scrolling & viewing behavior, panning operations, feature modules for modular architecture, enabling/disabling specific viewing features, and core viewing capabilities.
magnification.mdConfigure zoom levels & zoom percentages, zoom modes (fit to page/fit to width/fit to visible area/automatic), custom zoom control, programmatic zoom operations, zoom toolbar configuration, and mouse wheel zoom behavior.

Toolbar Configuration

FilePurpose
toolbar-customization.mdCustomize the PDF viewer primary, form designer, annotation toolbars. Programmatically enable/disable toolbar, enable/disable and show/hide toolbar items. Lists the toolbar items available for toolbars. Enable/disable form designer, annotation or primary toolbars during initialization. Create a custom toolbar item
toolbar-reference.mdUse the toolbar API methods/properties to show/hide the primary/annotation/navigation/redaction toolbars.
toolbar-customization-scenarios.mdCommon toolbar customization scenarios

Annotations and Markup

FilePurpose
annotation-overview.mdInformation about ink/freehand, sticky notes/comments, handwritten/digital signatures annotations and programmatically adding them. Overall annotation types and common default annotation settings example
text-markup-annotations.mdProgrammatically add text markup annotations (Highlight, underline, strikethrough, squiggly). Manipulate default settings for each textmarkup annotations
shape-annotations.mdInformation on shape annotations (Line, Arrow, Rectangle, Circle, Polygon). Programmatically adding shape annotations and manipulating default shape settings for each shape annotations
measurement-annotations.mdInformation on measurement annotations (Distance, Perimeter, Area, Radius, Volume). Programmatically adding measurement annotations and manipulating default settings for each measurement annotations
stamp-annotation.mdInformation on stamp annotations and different types of stamps available. Programmatically adding stamp annotations
free-text-annotations.mdInformation on free text annotation. Programmatically adding free text annotations
annotation-settings.mdConfigure appearance (colors, opacity, borders, styles) and behavior (restrictions, locking, printing) for all annotation types. Apply settings globally or per annotation type. Customize annotation selector (resizer, selection border). Set author, subject, and custom data. Control annotation-related component properties (toolbar visibility, signature settings, export options, drawing constraints).
annotation-events.mdHandle annotation lifecycle events (add, delete, move, resize, select, property change).
annotation-operations.mdProgrammatically manipulate annotations like selection, moving and resizing, deleting, locking and importing and exporting annotations
annotation-use-cases.mdCommon scenarios on how annotations can be programmatically manipulated
shape-label-settings.mdConfigure shape and measure annotation label appearance (fill color, font, font size, opacity) and default content (label text, notes).
redaction-annotation.mdHide and permanently remove sensitive information in PDFs. Mark content by area or full page, configure overlay text and styling, apply redactions irreversibly, search text and auto-redact, and manage redaction annotations programmatically.

Forms Management

FilePurpose
form-fields-overview.mdFill and design PDF forms, manage form fields (field types like textbox/password/checkbox/radio/dropdown/listbox/signature), create fields programmatically, use the form designer toolbar/UI interactions, configure field properties/customization, apply validation rules and constraints/settings, use form field API methods, and handle import/export form data including custom field data.
supported-form-fields.mdSupported form field types and programmatically add each
form-fields-props.mdLists properties of form fields. Lists common properties and specific properties to each field. Manipulate form field settings
import-export-form-data.mdProgrammatically import and export form field data
form-operations.mdProgrammatically manipulate form fields including updating properties and values, moving and resizing, deleting, grouping, adding custom data & retrieving form field data
form-field-validation.mdEnable/disable form field validation. Programmatic flow of form field validation and examples
form-field-settings.mdConfigure default properties for form fields (text, checkbox, radio, dropdown, signature).
form-field-events.mdHandle form field interaction events (focus, blur, value change, validation).

Text Operations

FilePurpose
text-search.mdImplement text search in PDFs: search functionality, search options (case-sensitive/whole word), highlight search results, find next/previous occurrences, programmatic text search methods, search completion events, and custom highlight colors. Configure text extraction options/settings and programmatically extract text from pages
text-selection.mdEnable text selection and text extraction: selection modes/behavior, copy selected text, text selection events, programmatic selection, and text collections/bounds.

Document Operations

FilePurpose
opening-pdfs.mdLoad PDFs from URL/local paths/base64, open encrypted/password-protected PDFs, support programmatic document loading, handle document load events/lifecycle, and manage load failures/errors.
saving-and-downloading.mdDownload PDFs, save PDFs with annotations/modifications, download with form data included, retrieve PDFs as base64, customize download events, and set custom download filenames.
printing-and-organizing.mdPrint PDFs (including print options like page range/quality and silent printing), handle print events, organize pages (overview/rearrange/reorder/rotate/delete), copy/duplicate/extract pages to a new document, and use the page organizer toolbar with programmatic + mobile page organization.

⚙️ Advanced Features

FilePurposeRoute When User Asks About
api-methods.mdProgrammatic control: load documents, manage forms, annotations, extract text, undo/redo, navigation APIs."load PDF programmatically", "API methods", "export form data", "extract text", "undo/redo", "programmatic control"
events.mdComplete list of all PDFViewer events (document load, download, annotations, forms, search, navigation)."event list", "all events", "available events", "event reference", "event handlers"

Quick Start Example

@page
@model IndexModel
@{
    ViewData["Title"] = "Home page";
}

<div class="text-center">
    <ejs-pdfviewer id="pdfviewer" style="height:600px"
        documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
        annotationAdd="annotationAdded" >
    </ejs-pdfviewer>
</div>

⚙️ SETTINGS CONFIGURATION BEST PRACTICES

When generating code with settings (toolbarSettings, annotationSettings, annotationSelectorSettings, arrowSettings, rectangleSettings, etc.), follow these guidelines to prevent unnecessary imports and over-engineering:

Rule 1: Simple Settings → Define as Razor inline code

Use this approach when:

  • Configuring only 1-3 properties
  • Settings are straightforward without custom types

Example (DO THIS):

<ejs-pdfviewer
    annotationSelectorSettings="@(new {
        selectionBorderColor = "blue",
        resizerBorderColor = "red",
        resizerFillColor = "#4070ff",
        resizerSize = 8,
        selectionBorderThickness = 1,
        resizerShape = "Circle",
        selectorLineDashArray = new int[] { 5, 6 },
        resizerLocation = "Corners|Edges",
        resizerCursorType = "grab"
    })">
</ejs-pdfviewer>

Benefits:

  • ✅ Simple and readable
  • ✅ Less code clutter
  • ✅ Type checking still works

Rule 2: Complex Settings → Define as Razor code blocks outside HTML

Use this approach when:

  • Configuring 4+ properties OR multiple related settings
  • Using enums or complex configurations
  • Need to reuse the same configuration across multiple components
  • Settings are complex enough to warrant separate definition

Example (DO THIS ONLY FOR COMPLEX CASES):

@{
    var annotationSelectorSettings = new {
        selectionBorderColor = "blue",
        resizerBorderColor = "red",
        resizerFillColor = "#4070ff",
        resizerSize = 8,
        selectionBorderThickness = 1,
        resizerShape = "Circle",
        selectorLineDashArray = new int[] { 5, 6 },
        resizerLocation = "Corners|Edges",
        resizerCursorType = "grab"
    };
}
<ejs-pdfviewer annotationSelectorSettings="@annotationSelectorSettings">
</ejs-pdfviewer>

Rule 3: NEVER Over-Engineer Simple Cases

❌ DO NOT DO THIS (Over-engineered):

@{
    var toolbarSettings = new Syncfusion.EJ2.PdfViewer.PdfViewerToolbarSettings  { ShowTooltip = true };
}
<ejs-pdfviewer
    toolbarSettings="@toolbarSettings"
>
</ejs-pdfviewer>

✅ DO THIS INSTEAD (Simple & Clean):

<ejs-pdfviewer 
    toolbarSettings="@(new Syncfusion.EJ2.PdfViewer.PdfViewerToolbarSettings  { ShowTooltip = true })">
</ejs-pdfviewer>

FAQ

What does the syncfusion-aspnetcore-pdf-viewer skill do?

Implements the Syncfusion ASP.NET Core PDFViewer for embedding, configuring, and loading PDF documents. Use this when rendering PDFs in ASP.NET Core applications, embedding viewer controls, or generating Razor page (.cshtml) code for PDF display and interaction.

How do I install syncfusion-aspnetcore-pdf-viewer?

Run npx skills add https://github.com/syncfusion/pdf-viewer-sdk-skills --skill syncfusion-aspnetcore-pdf-viewer in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/syncfusion-aspnetcore-pdf-viewer/ (personal) or .claude/skills/syncfusion-aspnetcore-pdf-viewer/ (project).

Which AI agents can use syncfusion-aspnetcore-pdf-viewer?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is syncfusion-aspnetcore-pdf-viewer safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains syncfusion-aspnetcore-pdf-viewer?

It is published by syncfusion in syncfusion/pdf-viewer-sdk-skills. It has 57 recorded installs.

More from syncfusion/pdf-viewer-sdk-skills

View all →

syncfusion-react-pdf-viewer

syncfusion/pdf-viewer-sdk-skills

Implements the Syncfusion React PDF Viewer (PdfViewerComponent) for embedding, configuring, and loading PDF documents. Use this when rendering PDFs in a React application, embedding viewer controls, or generating TSX/HTML code for PDF display and interaction.

Docs & Writing122 installs

syncfusion-maui-pdf-viewer

syncfusion/pdf-viewer-sdk-skills

Implements Syncfusion .NET MAUI SfPdfViewer for cross-platform PDF viewing, navigation, annotations, form filling/validation, text search/selection, e-signatures, redaction, printing, and toolbar/UI customization. Use when working with PDF viewer setup, document annotations, form fields, or signature workflows in MAUI apps.

Docs & Writing82 installs

syncfusion-angular-pdf-viewer

syncfusion/pdf-viewer-sdk-skills

Implements the Syncfusion Angular PDF Viewer (PdfViewerComponent) for embedding, configuring, and loading PDF documents. Use this when rendering PDFs in an Angular application, embedding viewer controls, or generating TS/CSS code for PDF display and interaction.

Docs & Writing68 installs

syncfusion-blazor-pdf-viewer

syncfusion/pdf-viewer-sdk-skills

Open the skill to read its SKILL.md instructions.

Docs & Writing65 installs

syncfusion-flutter-pdf-viewer

syncfusion/pdf-viewer-sdk-skills

Create sample code using Syncfusion Flutter SfPdfViewer. Generate Dart/Flutter code for embedding, configuring, and loading PDF documents.

Mobile60 installs

syncfusion-wpf-pdf-viewer

syncfusion/pdf-viewer-sdk-skills

Create sample application using Syncfusion WPF PdfViewer. Implements Syncfusion WPF PdfViewer for embedding, configuring, and customizing PDF viewing in WPF applications. Generates C and XAML code for PDF display, navigation, zooming, text selection, search, annotations, toolbar customization, and PDF event handling using Syncfusion's WPF PDF viewing components.

Docs & Writing56 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs