Skip to content

963927 - Ensure links in the WPF Pdfviewer UG #1813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
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 @@ -9,7 +9,7 @@ documentation: ug

# Change the Selection color of the annotations

PDF Viewer allows you to change the selection color of both the locked and unlocked annotations with the `SelectorSettings` property of the [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html) and [PdfDocumentView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html) classes. The following code sample illustrates the same.
PDF Viewer allows you to change the selection color of both the locked and unlocked annotations with the [SelectorSettings](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_SelectorSettings) property of the [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html) and [PdfDocumentView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html) classes. The following code sample illustrates the same.

{% tabs %}
{% highlight c# %}
Expand Down
6 changes: 3 additions & 3 deletions wpf/Pdf-Viewer/Navigating-through-the-pages.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Page Navigation in WPF Pdf Viewer control | Syncfusion<sup>&reg;</sup>;
description: Learn about Page Navigation support in Syncfusion<sup>&reg;</sup>; Essential Studio&reg; WPF Pdf Viewer control, its elements and more.
title: Page Navigation in WPF Pdf Viewer control | Syncfusion&reg;
description: Learn about Page Navigation support in Syncfusion&reg; Essential Studio&reg; WPF Pdf Viewer control, its elements and more.
platform: wpf
control: PDF Viewer
documentation: ug
Expand Down Expand Up @@ -32,7 +32,7 @@ pdfViewer.GotoPage(2)
{% endtabs %}

## Navigate to the horizontal and vertical offset
You can now scroll to the given horizontal and vertical offset of the PDF document programmatically using the [ScrollTo](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_ScrollTo_System_Double_) method of [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html). Refer to the following code to scroll the PDF document to the horizontal and vertical offset of 160 and 400 respectively.
You can now scroll to the given horizontal and vertical offset of the PDF document programmatically using the [ScrollTo](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_ScrollTo_System_Double_System_Double_) method of [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html). Refer to the following code to scroll the PDF document to the horizontal and vertical offset of 160 and 400 respectively.

{% tabs %}
{% highlight C# %}
Expand Down
6 changes: 3 additions & 3 deletions wpf/Pdf-Viewer/Select-and-copy-text.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Select and Copy Text in PDF files using WPF PDF Viewer | Syncfusion<sup>&reg;</sup>;
description: Learn about Select and Copy Text support in Syncfusion<sup>&reg;</sup>; Essential Studio&reg; WPF Pdf Viewer control, its elements and more.
title: Select and Copy Text from PDF using WPF PDF Viewer | Syncfusion&reg;
description: Learn about Select and Copy Text support in Syncfusion&reg; Essential Studio&reg; WPF Pdf Viewer control.
platform: wpf
control: PDF Viewer
documentation: ug
Expand All @@ -15,7 +15,7 @@ N> From version 19.4.0.48, we have updated our default text extraction engine to

## Detecting the completion of text selection

When the text selection is completed, the [TextSelectionCompleted](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html) event will be raised. Refer to the following code snippet for wiring the event.
When the text selection is completed, the [TextSelectionCompleted](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_TextSelectionCompleted) event will be raised. Refer to the following code snippet for wiring the event.

{% tabs %}
{% highlight c# %}
Expand Down
10 changes: 5 additions & 5 deletions wpf/Pdf-Viewer/Viewing-PDF-Files.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Viewing PDF Files in WPF Pdf Viewer control | Syncfusion<sup>&reg;</sup>;
description: Learn about Viewing PDF Files support in Syncfusion<sup>&reg;</sup>; Essential Studio&reg; WPF Pdf Viewer control, its elements and more.
title: Viewing PDF Files in WPF Pdf Viewer control | Syncfusion&reg;
description: Learn about Viewing PDF Files support in Syncfusion&reg; Essential Studio&reg; WPF Pdf Viewer control, its elements and more.
platform: wpf
control: PDF Viewer
documentation: ug
Expand Down Expand Up @@ -95,7 +95,7 @@ namespace PdfViewerDemo

## View PDF file using the ItemSource property

You can also view a PDF file using the [ItemSource](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_ItemSource) property of [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_ItemSource). The property accepts a string file path, a [Stream](https://learn.microsoft.com/en-us/dotnet/api/system.io.stream?view=net-7.0&redirectedfrom=MSDN), and a [PdfLoadedDocument](https://help.syncfusion.com/cr/file-formats/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) object.
You can also view a PDF file using the [ItemSource](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_ItemSource) property of [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html). The property accepts a string file path, a [Stream](https://learn.microsoft.com/en-us/dotnet/api/system.io.stream?view=net-7.0&redirectedfrom=MSDN), and a [PdfLoadedDocument](https://help.syncfusion.com/cr/file-formats/Syncfusion.Pdf.Parsing.PdfLoadedDocument.html) object.

{% tabs %}
{% highlight c# %}
Expand Down Expand Up @@ -142,7 +142,7 @@ pdfViewer.ItemSource = pdfLoadedDocument;

## View PDF files without using the toolbar

The [PdfDocumentView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html) control allows you to view the PDF files without toolbar using the [Load](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html) methods from code behind. Refer to the following steps to perform the same.
The [PdfDocumentView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html) control allows you to view the PDF files without toolbar using the [Load](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_Load_System_String_) methods from code behind. Refer to the following steps to perform the same.

1. Add the [PdfDocumentView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html) control in the MainWindow.xaml.

Expand Down Expand Up @@ -243,7 +243,7 @@ namespace PdfViewerDemo
{% endhighlight %}
{% endtabs %}

If you open a file using the toolbar, you can obtain the information in the [DocumentLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html) event. Refer to the following code to achieve the same.
If you open a file using the toolbar, you can obtain the information in the [DocumentLoaded](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_DocumentLoaded) event. Refer to the following code to achieve the same.

{% tabs %}
{% highlight c# %}
Expand Down
14 changes: 7 additions & 7 deletions wpf/Pdf-Viewer/Working-With-PDF-Coordinates.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Working With PDF Coordinates in WPF Pdf Viewer control | Syncfusion<sup>&reg;</sup>;
description: Learn about PDF Coordinates support in Syncfusion<sup>&reg;</sup>; Essential Studio&reg; WPF Pdf Viewer control, its elements and more.
title: PDF Coordinates in WPF Pdf Viewer control | Syncfusion&reg;
description: Learn about PDF Coordinates support in Syncfusion&reg; Essential Studio&reg; WPF Pdf Viewer control, its elements and more.
platform: wpf
control: PDF Viewer
documentation: ug
Expand All @@ -17,7 +17,7 @@ The WPF PDF Viewer specifies the position of points in the client area(viewport)

![WPF PDF Viewer Client Rectangle](PDF_Coordinates_Images/Client-Rectangle.png)

The client rectangle can be obtained by the `ClientRectangle` property of the PDF Viewer.
The client rectangle can be obtained by the [ClientRectangle](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_ClientRectangle) property of the PDF Viewer.

{% tabs %}
{% highlight c# %}
Expand Down Expand Up @@ -53,7 +53,7 @@ pdfViewerControl.ScrollTo(m_currentHorizontalOffset+10, m_currentVerticalOffset+

## Convert PDF Viewer's coordinates to PDF page coordinates

The user can convert the client coordinates to the PDF page coordinates using the `ConvertClientPointToPagePoint` method by passing the client rectangle point and page number as input parameters. The user can get the page number of the client area using the `GetPageNumberFromClientPoint` method by passing the client rectangle point as the input parameter. The following code snippet explains how to convert the clicked client area position to a page point.
The user can convert the client coordinates to the PDF page coordinates using the [ConvertClientPointToPagePoint](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_ConvertClientPointToPagePoint_System_Windows_Point_System_Int32_) method by passing the client rectangle point and page number as input parameters. The user can get the page number of the client area using the [GetPageNumberFromClientPoint](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_GetPageNumberFromClientPoint_System_Windows_Point_) method by passing the client rectangle point as the input parameter. The following code snippet explains how to convert the clicked client area position to a page point.

{% tabs %}
{% highlight c# %}
Expand All @@ -75,7 +75,7 @@ private void PdfViewerControl_PageClicked(object sender, PageClickedEventArgs e)

## Convert PDF page coordinates to PDF Viewer's coordinates

The user can also convert the PDF page coordinates to the client coordinates using the `ConvertPagePointToClientPoint` method by passing the page point and page number as input parameters. The following code snippet explains how to convert a shape annotation's position in the page coordinates to a client point.
The user can also convert the PDF page coordinates to the client coordinates using the [ConvertPagePointToClientPoint](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_ConvertPagePointToClientPoint_System_Windows_Point_System_Int32_) method by passing the page point and page number as input parameters. The following code snippet explains how to convert a shape annotation's position in the page coordinates to a client point.

{% tabs %}
{% highlight c# %}
Expand All @@ -99,7 +99,7 @@ private void PdfViewer_ShapeAnnotationChanged(object sender, ShapeAnnotationChan

## Convert PDF page coordinates to scroll coordinates

The user can obtain the scroll coordinates using the `ConvertPagePointToScrollPoint` method by passing the page point and page number as input parameters. The following code example explains how to convert a shape annotation’s position in the page coordinates to a scroll point in the PDF Viewer.
The user can obtain the scroll coordinates using the [ConvertPagePointToScrollPoint](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_ConvertPagePointToScrollingPoint_System_Windows_Point_System_Int32_) method by passing the page point and page number as input parameters. The following code example explains how to convert a shape annotation’s position in the page coordinates to a scroll point in the PDF Viewer.

{% tabs %}
{% highlight c# %}
Expand All @@ -123,7 +123,7 @@ private void PdfViewer_ShapeAnnotationChanged(object sender, ShapeAnnotationChan

## Bring a particular region into view

The user can bring the given rectangular region into view and zoom in to the document to fit the region in the PDF Viewer's client area (viewport) using the `ZoomToRect` method by passing the rectangular region as an input parameter. The following code snippet explains how to bring a particular region into view.
The user can bring the given rectangular region into view and zoom in to the document to fit the region in the PDF Viewer's client area (viewport) using the [ZoomToRect](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_ZoomToRect_System_Windows_Rect_) method by passing the rectangular region as an input parameter. The following code snippet explains how to bring a particular region into view.

{% tabs %}
{% highlight c# %}
Expand Down
10 changes: 5 additions & 5 deletions wpf/Pdf-Viewer/Working-with-Annotations/File-Link-Annotation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: File Link Annotation in WPF Pdf Viewer control | Syncfusion<sup>&reg;</sup>;
description: Learn about File Link Annotation support in Syncfusion<sup>&reg;</sup>; Essential Studio<sup>&reg;</sup>; WPF Pdf Viewer control, its elements and more.
title: File Link Annotation in WPF Pdf Viewer control | Syncfusion&reg;
description: Learn about File Link Annotation support in Syncfusion&reg; Essential Studio&reg; WPF Pdf Viewer control, its elements and more.
platform: wpf
control: PDF Viewer
documentation: ug
Expand All @@ -13,7 +13,7 @@ The PDF viewer supports file link annotations, which means that if you open a PD

## How to obtain the details of the of the annotation and the file linked with the annotation?

The `FileLinkAnnotationClicked` event will be raised when you click the annotation in PDF pages. Refer to the following code example to wire the `FileLinkAnnotationClicked` event with the PDF Viewer.
The [FileLinkAnnotationClicked](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_FileLinkAnnotationClicked) event will be raised when you click the annotation in PDF pages. Refer to the following code example to wire the `FileLinkAnnotationClicked` event with the PDF Viewer.

{% tabs %}
{% highlight C# %}
Expand All @@ -23,9 +23,9 @@ pdfViewer.FileLinkAnnotationClicked += PdfViewer_FileLinkAnnotationClicked;
{% endhighlight %}
{% endtabs %}

Using the `FileLinkAnnotationClickedEventArgs`, you can obtain the page number, bounds of the annotation through the PageNumber and Bounds properties respectively.
Using the [FileLinkAnnotationClickedEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.FileLinkAnnotationClickedEventArgs.html) you can obtain the page number, bounds of the annotation through the [PageNumber](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.FileLinkAnnotationClickedEventArgs.html#Syncfusion_Windows_PdfViewer_FileLinkAnnotationClickedEventArgs_PageNumber) and [Bounds](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.FileLinkAnnotationClickedEventArgs.html#Syncfusion_Windows_PdfViewer_FileLinkAnnotationClickedEventArgs_Bounds) properties respectively.

Similarly, you can obtain the details of the file linked with the annotation using the `Settings` property in the `FileLinkAnnotationClickedEventArgs`. Refer to the following code example to obtain the details of the of the annotation and the file linked with the annotation
Similarly, you can obtain the details of the file linked with the annotation using the [Settings](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.FileLinkAnnotationClickedEventArgs.html#Syncfusion_Windows_PdfViewer_FileLinkAnnotationClickedEventArgs_Settings) property in the [FileLinkAnnotationClickedEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.FileLinkAnnotationClickedEventArgs.html). Refer to the following code example to obtain the details of the of the annotation and the file linked with the annotation

{% tabs %}
{% highlight C# %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ The PdfViewerControl notifies through events, when `AnnotationChangedAction` suc

### StampAnnotationChanged Event

The `StampAnnotationChanged` event occurs when the `Action` performed in stamp annotation. It provides the common information and annotation properties which are available in `Settings` through the `StampAnnotationChangedEventArgs`. The user can modify the annotation properties through Settings`.
The [StampAnnotationChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_StampAnnotationChanged) event occurs when the [Action](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.AnnotationChangedEventArgs.html#Syncfusion_Windows_PdfViewer_AnnotationChangedEventArgs_Action) performed in stamp annotation. It provides the common information and annotation properties which are available in `Settings` through the [StampAnnotationChangedEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.StampAnnotationChangedEventArgs.html). The user can modify the annotation properties through [Settings](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.StampAnnotationChangedEventArgs.html#Syncfusion_Windows_PdfViewer_StampAnnotationChangedEventArgs_Settings).

The following code shows how to write the StampAnnotationChanged event in PdfViewerControl

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Sticky Note Annotation in WPF Pdf Viewer control | Syncfusion<sup>&reg;</sup>;
description: Learn about Sticky Note Annotation support in Syncfusion<sup>&reg;</sup>; Essential Studio<sup>&reg;</sup>; WPF Pdf Viewer control, its elements and more.
title: Sticky Note Annotation in WPF Pdf Viewer control | Syncfusion&reg;
description: Learn about Sticky Note Annotation support in Syncfusion&reg; Essential Studio&reg; WPF Pdf Viewer control, its elements and more.
platform: wpf
control: PDF Viewer
documentation: ug
Expand Down Expand Up @@ -273,7 +273,7 @@ The PdfViewerControl notifies through events, when `AnnotationChangedAction` suc

### StickyNoteAnnotationChanged Event

The `StickyNoteAnnotationChanged` event occurs when the `Action` performed in sticky note annotation. It provides the common information and annotation properties which are available in `Settings` through the `StickyNoteAnnotationChangedEventArgs`. The user can modify the annotation properties through Settings`.
The [StickyNoteAnnotationChanged](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_StickyNoteAnnotationChanged) event occurs when the [Action](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.AnnotationChangedEventArgs.html#Syncfusion_Windows_PdfViewer_AnnotationChangedEventArgs_Action) performed in sticky note annotation. It provides the common information and annotation properties which are available in `Settings` through the [StickyNoteAnnotationChangedEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.StickyNoteAnnotationChangedEventArgs.html). The user can modify the annotation properties through [Settings](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.StickyNoteAnnotationChangedEventArgs.html#Syncfusion_Windows_PdfViewer_StickyNoteAnnotationChangedEventArgs_Settings).

The following code shows how to write the StickyNoteAnnotationChanged event in PdfViewerControl

Expand Down
Loading