Make sure to add a reference to Terminalworks.PdfViewer.AspNetCore component. You can reference it through NuGet.
Run the following command in the Package Manager Console:
> install-package Terminalworks.PdfViewer.AspNetCore
1
Add needed CSS as shown in the example below
2
Add needed Javascript as shown in the example below
3
Add PDF Viewer component to your page
File location: Pages\Shared\_Layout.cshtml
File location: Pages\Index.cshtml
tw-pdf-viewer.css is a general CSS of TWPdfViewer and we recommend that you don't change it.
tw-pdf-viewer-theme.css is theme specific. You can read more about changing theme at
How to set which theme will be used?
File location: Pages\Shared\_Layout.cshtml
File location: Pages\Index.cshtml
File location: Pages\Index.cshtml
How to set initial parameters look at
Available viewer options with examples
File location: Views\Shared\_Layout.cshtml
File location: Views\Home\Index.cshtml
tw-pdf-viewer.css is a general CSS of TWPdfViewer and we recommend that you don't change it.
tw-pdf-viewer-theme.css is theme specific. You can read more about changing theme at
How to set which theme will be used?
File location: Views\Shared\_Layout.cshtml
File location: Views\Home\Index.cshtml
File location: Pages\Index.cshtml
How to set initial parameters look at
Available viewer options with examples
File location: Pages\Index.razor
tw-pdf-viewer.css is a general CSS of TWPdfViewer and we recommend that you don't change it.
tw-pdf-viewer-theme.css is theme specific. You can read more about changing theme at
How to set which theme will be used?
File location: Pages\_Host.cshtml
File location: Pages\Index.razor
If you use render-mode="Static" to make it work you need to add IsStatic="@("Yes")"
How to set initial parameters look at
Available viewer options with examples
File location: Pages\Index.html
tw-pdf-viewer.css is a general CSS of TWPdfViewer and we recommend that you don't change it.
tw-pdf-viewer-theme.css is theme specific. You can read more about changing theme at
How to set which theme will be used?
File location: wwwroot\index.html
File location: Pages\Index.razor
How to set initial parameters look at
Available viewer options with examples
Requirements
ASP.NET Core 3.1 or newer
Supported browsers
Internet Explorer 11 and all newer browsers
Request a free trial license extension in case you need more time to evaluate our product. You will receive your new trial license shortly after you fill out the application.
Cloud services and managed services providers can benefit with our products. The Terminalworks Partner Program enables you to buy license packages of Terminalworks products and resell them.