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

Merged
merged 5 commits into from
Jun 30, 2025
Merged
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
12 changes: 6 additions & 6 deletions wpf/Pdf-Viewer/Searching-Text.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: post
title: Search text in PDF files using WPF PDF Viewer | Syncfusion<sup>&reg;</sup>;
description: Learn about Searching Text support in Syncfusion<sup>&reg;</sup>; Essential Studio&reg; WPF Pdf Viewer control, its elements and more.
title: Search text in PDF files using WPF PDF Viewer | Syncfusion&reg;
description: Learn about Searching Text 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 @@ -85,7 +85,7 @@ The [FindText](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.P

### Find and get the bounds of a text

The [FindText(String, out Dictionary<Int32, List<RectangleF>>)](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_FindText_System_String_System_Collections_Generic_Dictionary_System_Int32_System_Collections_Generic_List_System_Drawing_RectangleF____) method takes the input argument as the given text. It provides a dictionary that contains the page index and the list of rectangular coordinates(bounds) of the text found on that page. The below code snippet shows how to get the bounds of the given text:
The [FindText](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_FindText_System_String_System_Collections_Generic_Dictionary_System_Int32_System_Collections_Generic_List_System_Drawing_RectangleF____) method takes the input argument as the given text. It provides a dictionary that contains the page index and the list of rectangular coordinates(bounds) of the text found on that page. The below code snippet shows how to get the bounds of the given text:

{% tabs %}
{% highlight c# %}
Expand All @@ -109,7 +109,7 @@ private void PdfViewer_DocumentLoaded(object sender, EventArgs args)

### Find and get the bounds of a text on the desired page

The [FindText(String, Int32, out List<RectangleF>)](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_FindText_System_String_System_Int32_System_Collections_Generic_List_System_Drawing_RectangleF___) method takes the input arguments as the text to be found along with the desired page index and provides a list of values that contains the rectangular coordinates(bounds) of the found text. The below code snippet shows how to get the bounds of the given text on a particular page:
The [FindText](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_FindText_System_String_System_Int32_System_Collections_Generic_List_System_Drawing_RectangleF___) method takes the input arguments as the text to be found along with the desired page index and provides a list of values that contains the rectangular coordinates(bounds) of the found text. The below code snippet shows how to get the bounds of the given text on a particular page:

{% tabs %}
{% highlight c# %}
Expand All @@ -133,7 +133,7 @@ private void PdfViewer_DocumentLoaded(object sender, EventArgs args)

### Find and get the bounds of the list of text

The [FindText(List<String>, out Dictionary<Int32, List<TextSearchResult>>)](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_FindText_System_Collections_Generic_List_System_String__System_Collections_Generic_Dictionary_System_Int32_System_Collections_Generic_List_Syncfusion_Windows_PdfViewer_TextSearchResult____) method takes the input argument as the list of text that needs to be found. It provides a list of ‘TextSearchResult’, which contains the found text and its rectangular coordinates(bounds). The below code snippet shows how to get the bounds of the found text from the Text Search Result:
The [FindText](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_FindText_System_Collections_Generic_List_System_String__System_Collections_Generic_Dictionary_System_Int32_System_Collections_Generic_List_Syncfusion_Windows_PdfViewer_TextSearchResult____) method takes the input argument as the list of text that needs to be found. It provides a list of ‘TextSearchResult’, which contains the found text and its rectangular coordinates(bounds). The below code snippet shows how to get the bounds of the found text from the Text Search Result:

{% tabs %}
{% highlight c# %}
Expand All @@ -159,7 +159,7 @@ private void PdfViewer_DocumentLoaded(object sender, EventArgs args)

### Find and get the bounds of the list of text on the desired page

The [FindText(List<String>, Int32, out List<MatchedItem>)](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_FindText_System_Collections_Generic_List_System_String__System_Int32_System_Collections_Generic_List_Syncfusion_Pdf_Parsing_MatchedItem___) method takes the input argument as the list of text to be found along with the desired page index and provides the list of [MatchedItem](https://help.syncfusion.com/cr/wpf/Syncfusion.Pdf.Parsing.MatchedItem.html), which contains the matched text, and its rectangular coordinates(bounds). The below code snippet illustrates how to get the bounds of the text from the matched item:
The [FindText](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_FindText_System_Collections_Generic_List_System_String__System_Int32_System_Collections_Generic_List_Syncfusion_Pdf_Parsing_MatchedItem___) method takes the input argument as the list of text to be found along with the desired page index and provides the list of [MatchedItem](https://help.syncfusion.com/cr/wpf/Syncfusion.Pdf.Parsing.MatchedItem.html), which contains the matched text, and its rectangular coordinates(bounds). The below code snippet illustrates how to get the bounds of the text from the matched item:

{% 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
Loading