Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ domainurl: ##DomainURL##

# Redaction in ASP.NET Core PdfViewer

Redaction annotations hide confidential or sensitive information in a PDF. The Syncfusion ASP.NET Core PDF Viewer enables marking areas or entire pages for redaction, customizing their appearance, and permanently applying redactions.
Redaction annotations hide confidential or sensitive information in a PDF. The ASP.NET Core PDF Viewer enables marking areas or entire pages for redaction, customizing their appearance, and permanently applying redactions.

## Enable the redaction toolbar

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation: ug

# Programmatic support for redaction in ASP.NET Core PdfViewer

The Syncfusion ASP.NET Core PDF Viewer provides APIs to add, update, delete, and apply redaction annotations programmatically. The viewer also supports page redaction, configuration of default properties, and interaction with the redaction property panel.
The ASP.NET Core PDF Viewer provides APIs to add, update, delete, and apply redaction annotations programmatically. The viewer also supports page redaction, configuration of default properties, and interaction with the redaction property panel.

## Enable the redaction toolbar

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation: ug

# Add Custom Data to PDF Form Fields in ASP.NET Core PDF Viewer

The Syncfusion ASP.NET Core PDF Viewer allows attaching custom application-specific data to form fields using the **customData** property. This enables associating business identifiers, tags, validation hints, or workflow metadata with form fields.
The ASP.NET Core PDF Viewer allows attaching custom application-specific data to form fields using the **customData** property. This enables associating business identifiers, tags, validation hints, or workflow metadata with form fields.

Custom data remains linked to the form field throughout the viewer session and can be accessed or updated whenever the field is queried or modified.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation: ug

# PDF Form Field Flags in ASP.NET Core PDF Viewer

The Syncfusion ASP.NET Core PDF Viewer allows controlling how users interact with form fields and how those fields behave during validation and printing by applying form field flags. These flags define whether a form field can be modified, whether it is mandatory, and whether it appears in printed output.
The ASP.NET Core PDF Viewer allows controlling how users interact with form fields and how those fields behave during validation and printing by applying form field flags. These flags define whether a form field can be modified, whether it is mandatory, and whether it appears in printed output.

This topic explains:
- [Supported form field flags](#supported-pdf-form-field-flags)
Expand All @@ -35,7 +35,7 @@ The following flags are supported in the PDF Viewer:

### Make Fields Read Only

The **isReadOnly** property prevents users from modifying a form field through the UI. This is useful for displaying prefilled or calculated values that should not be changed.
The **isReadOnly** property prevents users from modifying a form field through the UI. This is useful for displaying prefixed or calculated values that should not be changed.

{% tabs %}
{% highlight cshtml tabtitle="Standalone" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ domainurl: ##DomainURL##

# Form Designer in ASP.NET Core PDF Viewer

When **Form Designer mode** is enabled in the Syncfusion ASP.NET Core PDF Viewer, a default [Form Designer user interface (UI)](https://document.syncfusion.com/demos/pdf-viewer/asp-net-core/pdfviewer/formdesigner#/tailwind3) is displayed. This UI includes a built in toolbar for adding form fields such as text boxes, password fields, check boxes, radio buttons, drop down lists, list boxes, and signature and initial fields.
When **Form Designer mode** is enabled in the ASP.NET Core PDF Viewer, a default [Form Designer user interface (UI)](https://document.syncfusion.com/demos/pdf-viewer/asp-net-core/pdfviewer/formdesigner#/tailwind3) is displayed. This UI includes a built in toolbar for adding form fields such as text boxes, password fields, check boxes, radio buttons, drop down lists, list boxes, and signature and initial fields.

Form fields can be placed on the PDF, moved and resized, configured with field and widget properties, previewed, and removed as needed. The Form Designer toolbar can be shown, hidden, and customized to control available tools based on application requirements, enabling flexible and interactive form design directly within the viewer.

Expand Down Expand Up @@ -78,7 +78,7 @@ document.addEventListener('DOMContentLoaded', function () {

## Form Designer UI

When Form Designer mode is enabled in the Syncfusion ASP.NET Core PDF Viewer, a default [Form Designer UI](https://document.syncfusion.com/demos/pdf-viewer/asp-net-core/pdfviewer/formdesigner#/tailwind3) is displayed. This UI provides a built-in toolbar for adding common form fields such as text boxes, check boxes, radio buttons, drop-down lists, and signature fields. Fields can be placed on the PDF, selected, resized or moved, and configured using available editing options, enabling interactive form creation directly within the viewer.
When Form Designer mode is enabled in the ASP.NET Core PDF Viewer, a default [Form Designer UI](https://document.syncfusion.com/demos/pdf-viewer/asp-net-core/pdfviewer/formdesigner#/tailwind3) is displayed. This UI provides a built-in toolbar for adding common form fields such as text boxes, check boxes, radio buttons, drop-down lists, and signature fields. Fields can be placed on the PDF, selected, resized or moved, and configured using available editing options, enabling interactive form creation directly within the viewer.

![FormDesigner](../../javascript-es6/images/FormDesigner.gif)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ domainurl: ##DomainURL##

# PDF Viewer Form Field Events in ASP.NET Core

The Syncfusion ASP.NET Core PDF Viewer provides comprehensive form field events for tracking user interactions, responding to form changes, and implementing custom business logic. Events support scenarios such as [validation](./form-validation), UI updates, logging, and workflow automation.
The ASP.NET Core PDF Viewer provides comprehensive form field events for tracking user interactions, responding to form changes, and implementing custom business logic. Events support scenarios such as [validation](./form-validation), UI updates, logging, and workflow automation.

Form field events are triggered when adding, selecting, modifying, moving, resizing, and removing form fields.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ domainurl: ##DomainURL##

# Filling PDF Forms in ASP.NET Core PDF Viewer

The Syncfusion PDF Viewer supports three form-filling methods:
The ASP.NET Core PDF Viewer supports three form-filling methods:

1. [Filling form fields programmatically](#fill-pdf-forms-programmatically)

Expand All @@ -22,7 +22,7 @@ The Syncfusion PDF Viewer supports three form-filling methods:

3. [Importing form field data](#fill-pdf-forms-through-import-data)

The PDF Viewer supports importing form field data into an existing document to prefill forms from external data sources.
The PDF Viewer supports importing form field data into an existing document to fill forms from external data sources.

## Fill PDF forms programmatically

Expand Down Expand Up @@ -110,7 +110,7 @@ For more details, see [Export Form Data](./import-export-form-fields/export-form

## How to Validate Form Fields using `validateFormFields` Event

The [validateFormFields](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.pdfviewer.pdfviewer.html#Syncfusion_EJ2_PdfViewer_PdfViewer_ValidateFormFields) event in the Syncfusion PDF Viewer is triggered when a user tries to download or submit a form while validation is enabled. You can use the [retrieveFormFields()](https://ej2.syncfusion.com/documentation/api/pdfviewer/index-default#retrieveformfields) API to get all the form fields and check them one by one to see if any form fields values are empty.
The [validateFormFields](https://help.syncfusion.com/cr/aspnetcore-js2/syncfusion.ej2.pdfviewer.pdfviewer.html#Syncfusion_EJ2_PdfViewer_PdfViewer_ValidateFormFields) event in the ASP.NET Core PDF Viewer is triggered when a user tries to download or submit a form while validation is enabled. You can use the [retrieveFormFields()](https://ej2.syncfusion.com/documentation/api/pdfviewer/index-default#retrieveformfields) API to get all the form fields and check them one by one to see if any form fields values are empty.

Validation applies to all form field types. A textbox is empty if no text is entered, a list box or dropdown is empty if no item is selected, a signature or initial field is empty if not signed, and radio buttons or checkboxes are empty if none are chosen.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation: ug

# Group Form Fields in ASP.NET Core PDF Viewer

The Syncfusion ASP.NET Core PDF Viewer allows grouping multiple form fields into a single logical field by assigning the same Name. Grouped fields share values and states automatically based on field type. Form field grouping can be done using the Form Designer UI or programmatically via APIs.
The ASP.NET Core PDF Viewer allows grouping multiple form fields into a single logical field by assigning the same Name. Grouped fields share values and states automatically based on field type. Form field grouping can be done using the Form Designer UI or programmatically via APIs.

This page covers:
- [How form field grouping works](#how-grouping-works)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Open the `~/Pages/Shared/_Layout.cshtml` page and register the script manager `<

## Add ASP.NET Core PDF Viewer control

Add the Syncfusion<sup style="font-size:70%">&reg;</sup> ASP.NET Core PDF Viewer tag helper in `~/Pages/Index.cshtml`. The `serviceUrl` property is essential for server-backed mode, as it specifies the server endpoint that handles all PDF processing operations.
Add the ASP.NET Core PDF Viewer tag helper in `~/Pages/Index.cshtml`. The `serviceUrl` property is essential for server-backed mode, as it specifies the server endpoint that handles all PDF processing operations.

{% tabs %}
{% highlight c# tabtitle="~/Index.cshtml" %}
Expand All @@ -137,7 +137,7 @@ An implementation example can be found [here](https://github.com/SyncfusionExamp

## Run the application

Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to run the app. Then, the Syncfusion<sup style="font-size:70%">&reg;</sup> ASP.NET Core PDF Viewer control will be rendered in the default web browser.
Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to run the app. Then, the ASP.NET Core PDF Viewer control will be rendered in the default web browser.

![ASP.NET Core PDF Viewer control in action](Core_Images/pdfviewer-control.png)

Expand Down Expand Up @@ -173,6 +173,8 @@ function load() {
{% endhighlight %}
{% endtabs %}

N> Looking for the full [ASP.NET Core PDF Viewer](https://www.syncfusion.com/pdf-viewer-sdk/asp-net-core-pdf-viewer) component overview, features, pricing, and documentation? Visit the ASP.NET Core PDF Viewer page.

## See also

* [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> ASP.NET Core](https://ej2.syncfusion.com/aspnetcore/documentation/getting-started)
* [Getting Started with ASP.NET Core](https://ej2.syncfusion.com/aspnetcore/documentation/getting-started)
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ To get started quickly with the ASP.NET Core PDF Viewer, you can watch this vide

{% youtube "https://www.youtube.com/watch?v=cfWATpUjNgo&t=1s" %}

N> Looking for the full [ASP.NET Core PDF Viewer](https://www.syncfusion.com/pdf-viewer-sdk/asp-net-core-pdf-viewer) component overview, features, pricing, and documentation? Visit the ASP.NET Core PDF Viewer page.

## See also

* [Getting started with Syncfusion<sup style="font-size:70%">&reg;</sup> ASP.NET Core using Server backed](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/asp-net-core/getting-started-with-server-backed)
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ documentation: ug

# Dynamically instantiate the ASP.NET Core PDF Viewer

The Syncfusion<sup style="font-size:70%">&reg;</sup> ASP.NET Core PDF Viewer can be instantiated at runtime rather than during the initial page load. This dynamic approach is useful when the document to be displayed depends on user interaction or must be retrieved from a secure backend service.
The ASP.NET Core PDF Viewer can be instantiated at runtime rather than during the initial page load. This dynamic approach is useful when the document to be displayed depends on user interaction or must be retrieved from a secure back-end service.

Follow these steps to instantiate the viewer component programmatically:

1. **Verify Prerequisites:** Ensure your application references the required Syncfusion EJ2 script and style assets. The backend PDF Viewer service must be correctly configured in your ASP.NET Core application.
1. **Verify Prerequisites:** Ensure your application references the required Syncfusion EJ2 script and style assets. The back-end PDF Viewer service must be correctly configured in your ASP.NET Core application.
2. **Setup Container:** Add a target container element and a trigger (such as a button) to the Razor view.
3. **Initialize Component:** To create the viewer instance, configure the [`serviceUrl`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.PdfViewer.PdfViewer.html#Syncfusion_EJ2_PdfViewer_PdfViewer_ServiceUrl) and [`documentPath`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.PdfViewer.PdfViewer.html#Syncfusion_EJ2_PdfViewer_PdfViewer_DocumentPath), and then mount it using the `appendTo` method.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Highlight search results automatically by adding rectangle annotations at match

## Add rectangle annotations on search result highlights

**Step 1:** Follow the [Syncfusion PDF Viewer Getting Started guide](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/asp-net-core/getting-started) to set up a basic PDF Viewer sample.
**Step 1:** Follow the [ASP.NET Core PDF Viewer Getting Started guide](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/asp-net-core/getting-started) to set up a basic PDF Viewer sample.

**Step 2:** Configure the PDF Viewer to listen for the `textSearchHighlight` event and add annotations based on the provided bounds. Use the following code snippet in the Razor view:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Sets the CSS class or icon to add as a prefix to the Save button content.

The id property within a CustomToolbarItemModel is required and uniquely identifies each toolbar item for configuration and interaction.

When defining or customizing toolbar items, assign a specific, descriptive id to each item. These properties are commonly used when defining custom toolbar items with `CustomToolbarItemModel` in the context of the Syncfusion<sup style="font-size:70%">&reg;</sup> PDF Viewer. When configuring the toolbar using the `ToolbarSettings` property, include these properties to customize appearance and behavior.
When defining or customizing toolbar items, assign a specific, descriptive id to each item. These properties are commonly used when defining custom toolbar items with `CustomToolbarItemModel` in the context of the ASP.NET Core PDF Viewer. When configuring the toolbar using the `ToolbarSettings` property, include these properties to customize appearance and behavior.

N> You can use either text, icons, or both when customizing the save button based on your design requirements.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Manage how annotations appear at different stages of the document workflow. This

## Control annotation visibility on download

**Step 1:** Follow the [Syncfusion ASP.NET Core PDF Viewer getting started guide](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/asp-net-core/getting-started) to set up a basic PDF Viewer sample.
**Step 1:** Follow the [ASP.NET Core PDF Viewer getting started guide](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/asp-net-core/getting-started) to set up a basic PDF Viewer sample.

**Step 2:** Add a download button and configure the viewer markup. The following example includes logic to update annotation flags before the file is saved:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ domainurl: ##DomainURL##

# Add custom fonts to PDF forms in ASP.NET Core PDF Viewer

The Syncfusion ASP.NET Core PDF Viewer supports loading, editing, and saving custom fonts in interactive form fields such as [TextBox](../forms/manage-form-fields/create-form-fields#textbox), [ListBox](../forms/manage-form-fields/create-form-fields#listbox), and [DropDown](../forms/manage-form-fields/create-form-fields#dropdown). Use the `customFonts` property to ensure consistent text rendering even when specific fonts are not installed on the user's system.
The ASP.NET Core PDF Viewer supports loading, editing, and saving custom fonts in interactive form fields such as [TextBox](../forms/manage-form-fields/create-form-fields#textbox), [ListBox](../forms/manage-form-fields/create-form-fields#listbox), and [DropDown](../forms/manage-form-fields/create-form-fields#dropdown). Use the `customFonts` property to ensure consistent text rendering even when specific fonts are not installed on the user's system.

## Scenarios for custom fonts

Expand Down Expand Up @@ -72,4 +72,4 @@ Custom fonts are supported for [TextBox](../forms/manage-form-fields/create-form
## Important considerations

- **Font Size:** Ensure the chosen font size fits within the form field bounds to prevent rendering issues in third-party viewers.
- **Layout Integrity:** If text rendered with a custom font exceeds the field bounds, the downloaded PDF might display incorrectly in some external viewers, though it will render perfectly within the Syncfusion PDF Viewer.
- **Layout Integrity:** If text rendered with a custom font exceeds the field bounds, the downloaded PDF might display incorrectly in some external viewers, though it will render perfectly within the ASP.NET Core PDF Viewer.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Remove specific annotations programmatically using the `deleteAnnotationById()`

## Remove annotations programmatically

**Step 1:** Follow the [Syncfusion ASP.NET Core PDF Viewer getting started guide](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/asp-net-core/getting-started) to set up a basic PDF Viewer sample.
**Step 1:** Follow the [ASP.NET Core PDF Viewer getting started guide](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/asp-net-core/getting-started) to set up a basic PDF Viewer sample.

**Step 2:** Add a button and script to delete an annotation by its unique ID. The following example demonstrates how to remove the first annotation from the viewer's collection:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ control: PDF Viewer
documentation: ug
---

# Export PDF pages as images in ASP.NET Core PDF Viewer
# Export PDF pages as images in ASP.NET Core

The Syncfusion<sup style="font-size:70%">&reg;</sup> ASP.NET Core PDF Viewer provides the `ExportAsImage` APIs to convert individual pages or a range of pages into raster images. These images can be saved to disk, processed in-memory, or served as downloads in your application.
The ASP.NET Core PDF Viewer provides the `ExportAsImage` APIs to convert individual pages or a range of pages into raster images. These images can be saved to disk, processed in-memory, or served as downloads in your application.

## Steps to export pages as images

Expand Down
Loading