PdfViewer
CompleteA viewer for every PDF version up to 2.0 (ISO 32000-2): continuous pages, zoom and rotation, thumbnails, bookmarks, search, text selection, links, annotations, form fields, layers, attachments, passwords (RC4 and AES-256), printing and spelling, grammar and logic checks. The parser, renderer and writer are part of RayCraft.Blazor.Office and have no third-party parts. _No live image: this control is described by text and the API table only._
Parameters
| Parameter | Type | Description |
|---|---|---|
AllowEditing | bool | |
AllowFileTransfer | bool | Shows the buttons that open and download a file and accepts dropped files (default true). |
AllowFormFilling | bool | Shows form fields as inputs; the download button and GetFilledDocumentAsync then include the entered values (default true). |
AllowPrint | bool | Shows the print button; printing is also refused when the document does not allow it (default true). |
AllowSearch | bool | Shows the search button (default true). |
AuthorName | string | |
Class | string | Extra CSS classes added to the root element. |
Data | Byte[] | The PDF file content to show. Setting a new array loads it. |
FileName | string | The name used when the file is downloaded. |
Height | string | Height of the control as a CSS length (default 40rem). |
IgnoredWords | IReadOnlyCollection<string> | Words that are never reported as misspelled, such as names and product terms. |
InitialPage | int | The page shown first (1 is the first page). |
Label | string | Accessible name of the viewer. Defaults to a localized PDF viewer. |
MaxFileSize | Int64 | Largest file that can be opened, in bytes (default 150,000,000). |
OcrEngine | IPdfOcrEngine | |
OcrLanguages | IReadOnlyList<string> | |
Password | string | The password of a protected document. When empty or wrong, the viewer asks for it. |
PdfFonts | PdfFontSet | |
Proofing | bool | Offers checking the text for spelling, grammar and logic problems in English and Bulgarian (default true). |
ShowMenuBar | bool | |
ShowSidebar | bool | Starts with the side panel (thumbnails, bookmarks, attachments, layers) open. |
ShowToolbar | bool | Shows the toolbar (default true). |
SignatureCaption | string | |
SignatureProvider | Func<Task<IReadOnlyList<PdfSignaturePicture>>> | |
SigningCertificate | X509Certificate2 | |
SigningLocation | string | |
SigningReason | string | |
Source | string | Address of a PDF file, fetched by the browser (for example docs/sample.pdf). |
Style | string | Inline style added to the root element. |
Zoom | string | The start zoom: auto, fit-width (default), fit-page or a percentage such as 125. |
Events
| Event | Type | Description |
|---|---|---|
OnEdited | EventCallback<Byte[]> | |
OnFormChanged | EventCallback<PdfFieldChange> | Raised with the field name and the new value when a form field changes. |
OnLoaded | EventCallback<PdfDocument> | Raised with the PdfDocument when a document has been opened. |
OnNew | EventCallback | |
OnPageChanged | EventCallback<int> | Raised with the visible page (1-based) when it changes. |
OnSave | EventCallback<OfficeFileSave> | |
OnSaveAs | EventCallback<OfficeFileSave> | |
OnSignatureDrawn | EventCallback<Byte[]> | Raised with the PNG of a drawn or typed signature (without the caption) when the user places it, so the application can keep it as the saved signature. OpenSignatureAsync() opens the signature dialog from outside. |
OnSigned | EventCallback<Byte[]> |
Package
PdfViewer is part of RayCraft Complete. Package: RayCraft.Blazor.Complete. It comes from the private RayCraft feed and needs an active license. See Getting started.
Send feedbackVersion 1.0.3