Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
syncfusion avatar

Syncfusion Aspnetmvc Pdf Viewer

  • 1 installs
  • 1 repo stars
  • Updated July 6, 2026
  • syncfusion/pdf-viewer-sdk-skills

Generates ASP.NET MVC Razor (.cshtml) code to embed and configure the Syncfusion EJ2 PDFViewer for displaying PDF documents.

About

Generates copy-pasteable Razor and HTML code that integrates the Syncfusion.EJ2.MVC5 PDFViewer into an ASP.NET MVC project. A developer uses it when rendering and configuring PDFs in an ASP.NET MVC app.

  • Uses the Syncfusion.EJ2.MVC5 NuGet package
  • Strict mode: only generates APIs documented in the reference files

Syncfusion Aspnetmvc Pdf Viewer by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #121 of 153 .NET & C# skills by installs in the Skillselion catalog
  • Data as of Jul 8, 2026 (Skillselion catalog sync)
npx skills add https://github.com/syncfusion/pdf-viewer-sdk-skills --skill syncfusion-aspnetmvc-pdf-viewer

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars1
Last updatedJuly 6, 2026
Repositorysyncfusion/pdf-viewer-sdk-skills

What it does

Generates ASP.NET MVC Razor (.cshtml) code to embed and configure the Syncfusion EJ2 PDFViewer for displaying PDF documents.

Files

SKILL.mdMarkdownGitHub ↗

Syncfusion ASP.NET MVC Pdfviewer – UI Sample Generator

NuGet: Syncfusion.EJ2.MVC5

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 MVC sample".

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

---

⚙️ 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):

@Html.EJS().PdfViewer("pdfviewer").AnnotationSelectorSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerAnnotationSelectorSettings { ResizerBorderColor = "green", SelectionBorderColor = "blue", ResizerFillColor = "#4070ff", resizerSize = 8, SelectionBorderThickness = 1, SelectorLineDashArray = new int[] { 5, 6 }, ResizerLocation = "Corners|Edges", ResizerCursorType = "grab" }).Render()

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"
    };
}
@Html.EJS().PdfViewer("pdfviewer").AnnotationSelectorSettings(annotationSelectorSettings).Render()

---

Rule 3: NEVER Over-Engineer Simple Cases

❌ DO NOT DO THIS (Over-engineered):

@{
    var toolbarSettings = new Syncfusion.EJ2.PdfViewer.PdfViewerToolbarSettings  { ShowTooltip = true };
}
@Html.EJS().PdfViewer("pdfviewer").ToolbarSettings(@toolbarSettings).Render()

✅ DO THIS INSTEAD (Simple & Clean):

@Html.EJS().PdfViewer("pdfviewer").ToolbarSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerToolbarSettings  { ShowTooltip = true }).Render()

---

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

🎯 MVC 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

MVC 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 MVC 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"

---

Related skills

.NET & C#frontendbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.