From a57edc23c3557d1076e70e7869bbd38adab962c3 Mon Sep 17 00:00:00 2001 From: Nadezhda Tacheva Date: Tue, 8 Oct 2024 19:35:28 +0300 Subject: [PATCH 01/18] docs(pdfviewer): Annotation documentation --- components/pdfviewer/annotations.md | 29 +++++++++++++++++++++++++++++ components/pdfviewer/toolbar.md | 1 + upgrade/rendering-changes/6-3-0.md | 15 +++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 components/pdfviewer/annotations.md create mode 100644 upgrade/rendering-changes/6-3-0.md diff --git a/components/pdfviewer/annotations.md b/components/pdfviewer/annotations.md new file mode 100644 index 0000000000..7094f96ab0 --- /dev/null +++ b/components/pdfviewer/annotations.md @@ -0,0 +1,29 @@ +--- +title: Annotations +page_title: PdfViewer - Annotations +description: Annotations in the PDF Viewer for Blazor. How to add and configure annotations in the PDF Viewer for Blazor +slug: pdfviewer-annotations +tags: telerik,blazor,pdf,pdfviewer,annotations +published: True +position: 15 +--- + +# PdfViewer Annotations + +What are annotations... + +Note: the file is printed/downloaded with the annotations... + +## Supported annotations + +* [Text Highlight](#text-highlight) +* [Free Text](#free-text) + +### Text Highlight + +## Free Text + +## Disabling annotations + +## See Also + diff --git a/components/pdfviewer/toolbar.md b/components/pdfviewer/toolbar.md index 23604fa34f..0ca57b1d09 100644 --- a/components/pdfviewer/toolbar.md +++ b/components/pdfviewer/toolbar.md @@ -28,6 +28,7 @@ By default, the [Blazor PDF Viewer](https://demos.telerik.com/blazor-ui/pdfviewe | Open | `PdfViewerToolBarOpenTool` | An open button. It fires the [`OnOpen` event]({%slug pdfviewer-events%}#onopen). | | Download | `PdfViewerToolBarDownloadTool` | A download button. It fires the [`OnDownload` event]({%slug pdfviewer-events%}#ondownload). | | Print | `PdfViewerToolBarPrintTool` | A print button. The component also provides a [`Print` method]({%slug pdfviewer-overview%}#pdfviewer-reference-and-methods). Printing uses an additional browser window with only the PDF document inside. This window may require user confirmation or appropriate browser settings to display. | +| Annotations | `PdfViewerToolBarAnnotationsTool` | .... | By default, the toolbar also includes separators (``) and spacers (``). Separators render as a vertical line. Spacers consume the available empty space and push the rest of the tools next to one another. diff --git a/upgrade/rendering-changes/6-3-0.md b/upgrade/rendering-changes/6-3-0.md new file mode 100644 index 0000000000..14554bc25c --- /dev/null +++ b/upgrade/rendering-changes/6-3-0.md @@ -0,0 +1,15 @@ +--- +title: 6.3.0 +description: Handle the rendering changes in the 6.3.0 release of the Telerik UI for Blazor components. +page_title: Rendering Changes in the 6.3.0 Release +slug: changes-in-6-3-0 +position: 970 +--- + +# Rendering Changes in 6.3.0 + +* [PDFViewer](#pdfviewer) + +# PDFViewer + +The `Open`, `Download` and `Print` tools have been moved to a separate hamburger menu on the left side of the Toolbar. \ No newline at end of file From 1ab1c243e067ca35ecfa651e3b53baae784bda2c Mon Sep 17 00:00:00 2001 From: Nadezhda Tacheva Date: Tue, 15 Oct 2024 12:32:15 +0300 Subject: [PATCH 02/18] chore(PDFViewer): add more details in the annotation docs --- components/pdfviewer/annotations.md | 32 +++++++++++++---- components/pdfviewer/overview.md | 3 ++ components/pdfviewer/toolbar.md | 18 +++++++--- upgrade/rendering-changes/3-4-0.md | 2 +- upgrade/rendering-changes/3-6-0.md | 2 +- upgrade/rendering-changes/4-0-0.md | 2 +- upgrade/rendering-changes/4-3-0.md | 2 +- upgrade/rendering-changes/4-6-0.md | 2 +- upgrade/rendering-changes/6-0-0.md | 2 +- upgrade/rendering-changes/6-3-0.md | 54 +++++++++++++++++++++++++++-- 10 files changed, 99 insertions(+), 20 deletions(-) diff --git a/components/pdfviewer/annotations.md b/components/pdfviewer/annotations.md index 7094f96ab0..c48db4d0d4 100644 --- a/components/pdfviewer/annotations.md +++ b/components/pdfviewer/annotations.md @@ -10,20 +10,38 @@ position: 15 # PdfViewer Annotations -What are annotations... +The PdfViewer supports a set of annotation types that the user can add to enhance the PDF document - highlight important text areas or add notes as free text. The PDFViewer creates a dedicated layer for the annotations and includes them when downloading or printing the file. -Note: the file is printed/downloaded with the annotations... +To add and manage the annotations, the user can click on the dedicated button in the [Toolbar]({%slug pdfviewer-toolbar%}). It opens an annotations bar with the available annotation types. -## Supported annotations +## Supported Annotations -* [Text Highlight](#text-highlight) -* [Free Text](#free-text) +The PDFViewer provides the following annotation types: -### Text Highlight +@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) -## Free Text +| Annotation Type | Description | +| --- | --- | +| **Text Highlight** | Allows highlighting the selected text in the document. Provides an option to select the desired highlight color. | +| **Free Text** | Allows creating an element with free text anywhere in the document. Provides option to select the desired text color and font size. | + +## Working with Annotations + +>caption To manage the annotations the user should: + +1. Click on the `Annotations` tool in the [Toolbar]({%slug pdfviewer-toolbar%}) to open the Annotations bar with the available annotation types. +1. Click the desired annotation type to toggle it. You need to first "turn on" the annotation tool to add or edit annotations of the corresponding type. If none of the annotation tools are enabled, the PDFViewer will not allow interacting with the document to create or edit annotations. + +>caption From this point the user can: + +1. **Create an annotation** - for that purpose the user can select a non-annotated text to highlight it or click on an area that does not have free text element to create one. Once they create the annotation, a popup with the available customization options will appear. +1. **Edit an existing annotation** - for that purpose the user can click on the annotation they want to edit to open the customization popup. The `Free Text` annotation element can also be moved around the document. The user can edit one or multiple annotations at a time but they all must be of the same type. ## Disabling annotations +The Annotations tool is included in the [Toolbar]({%slug pdfviewer-toolbar%}) by default. To prevent the users from creating annotations, you can [configure the Toolbar and not include the `PdfViewerToolBarAnnotationsTool`]({%slug pdfviewer-toolbar%}#toolbar-configuration). + ## See Also +* [PdfViewer Live Demo](https://demos.telerik.com/blazor-ui/pdfviewer/overview) +* [PdfViewer Toolbar]({%slug pdfviewer-toolbar%}) \ No newline at end of file diff --git a/components/pdfviewer/overview.md b/components/pdfviewer/overview.md index 75d667732e..ef9f74dd15 100644 --- a/components/pdfviewer/overview.md +++ b/components/pdfviewer/overview.md @@ -59,6 +59,9 @@ The [PdfViewer toolbar can render built-in and custom tools]({%slug pdfviewer-to * Search and select text * Print, download and open local PDF files +## Annotations + +The PdfViewer provides a built-in option for creating and editing annotations. Explore the [available annotation types and how to work with them]({%slug pdfviewer-annotations%}). ## Large File Support diff --git a/components/pdfviewer/toolbar.md b/components/pdfviewer/toolbar.md index 0ca57b1d09..917a5582fa 100644 --- a/components/pdfviewer/toolbar.md +++ b/components/pdfviewer/toolbar.md @@ -17,21 +17,29 @@ The [Blazor PDF Viewer](https://demos.telerik.com/blazor-ui/pdfviewer/overview) By default, the [Blazor PDF Viewer](https://demos.telerik.com/blazor-ui/pdfviewer/overview) displays all its built-in tools in the order below. Use the *tool tag* if you need to define a tool explicitly in a [custom toolbar configuration](#toolbar-configuration). +#### Command Tools: + @[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) | Tool Name | Tool Tag | Description | | --- | --- | --- | +| Open | `PdfViewerToolBarOpenTool` | An open command. Displayed in a submenu toggled on click of the hamburger menu. Fires the [`OnOpen` event]({%slug pdfviewer-events%}#onopen). | +| Download | `PdfViewerToolBarDownloadTool` | A download command. Displayed in a submenu toggled on click of the hamburger menu. Fires the [`OnDownload` event]({%slug pdfviewer-events%}#ondownload). | +| Print | `PdfViewerToolBarPrintTool` | A print command. Displayed in a submenu toggled on click of the hamburger menu. The component also provides a [`Print` method]({%slug pdfviewer-overview%}#pdfviewer-reference-and-methods). Printing uses an additional browser window with only the PDF document inside. This window may require user confirmation or appropriate browser settings to display. | | Pager | `PdfViewerToolBarPagerTool` | A pager to navigate the PDF document via automatic scrolling. Paging requires the [`Height` parameter]({%slug pdfviewer-overview%}#pdfviewer-parameters) to be set, otherwise the component expands and doesn't have its own scrollbar. | | Zoom | `PdfViewerToolBarZoomTool` | Zoom in and zoom out buttons with an additional dropdown with common options (Fit to page, Fit to width, 100%, etc.) | | Selection | `PdfViewerToolBarSelectionTool` | Two toggle buttons that enable either text selection or panning. | | Search | `PdfViewerToolBarSearchTool` | A search button. It opens an additional search bar that contains a textbox and arrow buttons to navigate the search results. | -| Open | `PdfViewerToolBarOpenTool` | An open button. It fires the [`OnOpen` event]({%slug pdfviewer-events%}#onopen). | -| Download | `PdfViewerToolBarDownloadTool` | A download button. It fires the [`OnDownload` event]({%slug pdfviewer-events%}#ondownload). | -| Print | `PdfViewerToolBarPrintTool` | A print button. The component also provides a [`Print` method]({%slug pdfviewer-overview%}#pdfviewer-reference-and-methods). Printing uses an additional browser window with only the PDF document inside. This window may require user confirmation or appropriate browser settings to display. | -| Annotations | `PdfViewerToolBarAnnotationsTool` | .... | +| Annotations | `PdfViewerToolBarAnnotationsTool` | A button that toggles the Annotations bar. Explore the [available annotation types and how to work with them]({%slug pdfviewer-annotations%}). | + +#### Layout Tools: -By default, the toolbar also includes separators (``) and spacers (``). Separators render as a vertical line. Spacers consume the available empty space and push the rest of the tools next to one another. +@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout) +| Tool Name | Tool Tag | Description | +| --- | --- | --- | +| Separator | `PdfViewerToolBarSeparator` | Renders a vertical line. This is not included in the Toolbar by default but you can use it to visually separate the desired tools. | +| Spacer | `PdfViewerToolBarSpacer` | Consumes the available empty space and pushes the rest of the tools next to one another. | ## Custom Tools diff --git a/upgrade/rendering-changes/3-4-0.md b/upgrade/rendering-changes/3-4-0.md index 102cd989ab..1758b74061 100644 --- a/upgrade/rendering-changes/3-4-0.md +++ b/upgrade/rendering-changes/3-4-0.md @@ -33,5 +33,5 @@ Previous to the 3.4.0 version we used `k-state-*` CSS classes to denote that the ## See also -* [Use best practives when overriding theme styles]({%slug themes-override%}#best-practices) +* [Use best practices when overriding theme styles]({%slug themes-override%}#best-practices) diff --git a/upgrade/rendering-changes/3-6-0.md b/upgrade/rendering-changes/3-6-0.md index 93ad258172..fda1229095 100644 --- a/upgrade/rendering-changes/3-6-0.md +++ b/upgrade/rendering-changes/3-6-0.md @@ -99,4 +99,4 @@ position: 995 ## See also -* [Use best practives when overriding theme styles]({%slug themes-override%}#best-practices) +* [Use best practices when overriding theme styles]({%slug themes-override%}#best-practices) diff --git a/upgrade/rendering-changes/4-0-0.md b/upgrade/rendering-changes/4-0-0.md index 745f3bdcd4..90bce320a2 100644 --- a/upgrade/rendering-changes/4-0-0.md +++ b/upgrade/rendering-changes/4-0-0.md @@ -241,4 +241,4 @@ The following changes are applicable when `AutoUpload = "false"`, so the **Clear ## See Also -* [Use best practives when overriding theme styles]({%slug themes-override%}#best-practices) +* [Use best practices when overriding theme styles]({%slug themes-override%}#best-practices) diff --git a/upgrade/rendering-changes/4-3-0.md b/upgrade/rendering-changes/4-3-0.md index c2f7fdd88c..653aa910a8 100644 --- a/upgrade/rendering-changes/4-3-0.md +++ b/upgrade/rendering-changes/4-3-0.md @@ -128,4 +128,4 @@ Such dialogs are any edit forms, filter menus, column menus, editor's tools, as ## See Also -* [Use best practives when overriding theme styles]({%slug themes-override%}#best-practices) +* [Use best practices when overriding theme styles]({%slug themes-override%}#best-practices) diff --git a/upgrade/rendering-changes/4-6-0.md b/upgrade/rendering-changes/4-6-0.md index 9caeaec8e7..8ffaab16cf 100644 --- a/upgrade/rendering-changes/4-6-0.md +++ b/upgrade/rendering-changes/4-6-0.md @@ -72,4 +72,4 @@ Removed the `k-filter-toolbar-item` CSS class from the `