From 014930ec079e37f014ccecde66e0d4f5cc5353dc Mon Sep 17 00:00:00 2001 From: Silambharasan K Date: Mon, 13 Jul 2026 11:06:24 +0530 Subject: [PATCH 1/8] Task(1040469): Need to improve UG documentation for UWP PDFViewer using code studio AI tools --- .../Bookmark-navigation.md | 10 +++-- .../Creating-custom-toolbar.md | 16 +++---- .../uwp/Concepts-and-Features/Hyperlink.md | 39 ++++++++-------- .../uwp/Concepts-and-Features/Printing-PDF.md | 44 ++++++++++--------- .../Working-with-annotations.md | 14 +++--- .../Working-with-text-search.md | 26 ++++++----- .../PDF/PDF-Viewer/uwp/Getting-Started.md | 33 ++++++++------ .../uwp/How-to/Customize-the-scrollbar.md | 14 +++--- .../PDF/PDF-Viewer/uwp/Overview.md | 2 +- 9 files changed, 106 insertions(+), 92 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md index eb2d22607a..175ecd81c2 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md @@ -7,9 +7,9 @@ control: SfPdfViewerControl documentation: ug --- -# Bookmark navigation in UWP PDF Viewer (SfPdfViewer) +# Bookmark Navigation in UWP PDF Viewer (SfPdfViewer) -PDF Viewer allows users to navigate to the bookmarks present in the loaded PDF document. +The SfPdfViewer control allows users to navigate to the bookmarks present in the loaded PDF document. This section covers programmatic navigation using the `GoToBookmark` method. ## Programmatically navigate to a bookmark destination @@ -24,13 +24,15 @@ PdfLoadedDocument loadedDocument = new PdfLoadedDocument(documentStream); //Retrieves the bookmark collection from the loaded PDF document PdfBookmarkBase bookmark = loadedDocument.Bookmarks; -//Navigate to the specified bookmark destination offset +//Navigates to the specified bookmark destination pdfViewerControl.GoToBookmark(bookmark[0]); {% endhighlight %} {% endtabs %} ## See Also +- [UWP PDF Viewer Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/overview) - [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-page-navigation) - [Hyperlink](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/hyperlink) -- [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) \ No newline at end of file +- [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) +- [GoToBookmark API Reference](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md index 5ea10fee45..82400b464c 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md @@ -9,33 +9,33 @@ documentation: ug # Creating a custom toolbar in UWP PDF Viewer (SfPdfViewer) -PdfViewer does not have a toolbar by default. But a custom toolbar can be designed at the sample with its buttons wired to the PdfViewer APIs. +The SfPdfViewer control does not include a built-in toolbar by default; however, a custom toolbar can be designed at the application level, with its buttons wired to the SfPdfViewer APIs. ## Creating separate UIs for desktop and mobile -Create a new UWP project (the name "PdfViewerCustomToolbar" is used here). It will by default have a MainPage.xaml file, a MainPage.xaml.cs file. Create a new folder in the project with name "DeviceFamily-Mobile" and create another XAML file with the same name MainPage.xaml in this folder. Open this file and set the class property to MainPage.xaml.cs. +Create a new UWP project (the name "PdfViewerCustomToolbar" is used here). By default, the project will contain a `MainPage.xaml` file and a `MainPage.xaml.cs` code-behind file. Create a new folder in the project with the name "DeviceFamily-Mobile", and create another XAML file named `MainPage.xaml` in this folder. Open this file and set the `x:Class` attribute to `MainPage.xaml.cs`. {% tabs %} {% highlight xaml %} -x:Class="PdfViewerCustomToolbar.MainPage"; +x:Class="PdfViewerCustomToolbar.MainPage" {% endhighlight %} {% endtabs %} -Make sure that both the xaml files are in the same namespace "PdfViewerCustomToolbar" +Make sure that both XAML files are in the same namespace, "PdfViewerCustomToolbar". {%tabs%} {%highlight xaml%} -xmlns:local="using:PdfViewerCustomToolbar"; +xmlns:local="using:PdfViewerCustomToolbar" {%endhighlight%} {%endtabs%} -The reason for two XAML files is that same UI design cannot be used for both desktop and mobile. So, one XAML file is used for desktop UI and the other is for mobile UI. The MainPage.xaml.cs file serve as the common code behind for both XAML pages. +Two XAML files are used because the same UI design cannot be shared between desktop and mobile. One XAML file is used for the desktop UI, while the other is used for the mobile UI. The `MainPage.xaml.cs` file serves as the common code-behind for both XAML pages. -In the constructor of MainPage set the DataContext to PdfViewer. +In the constructor of `MainPage`, set the `DataContext` to the SfPdfViewer instance. {%tabs%} {%highlight c#%} @@ -45,7 +45,7 @@ this.DataContext = pdfViewer; {%endhighlight%} {%endtabs%} -The UI design of the application for desktop and mobile is illustrated in the following documentation pages. The link to the common sample can be found at the ends of both the documentation pages. +The UI design of the application for desktop and mobile is illustrated in the following documentation pages. The link to the common sample can be found at the end of each documentation page. 1. [Desktop design](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/ui-design-for-desktop) 2. [Mobile design](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/ui-design-for-mobile) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md index a1d72a5939..475ef823ae 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md @@ -9,15 +9,15 @@ documentation: ug # Hyperlink in UWP PDF Viewer (SfPdfViewer) -PDF Viewer supports hyperlink navigation which detects document link and web link present in the pages of the PDF document. Tapping on the TOC and hyperlink will behave in the following manner. +The PdfViewer control supports hyperlink navigation that detects document links and web links present in the PDF document pages. Tapping a table of contents (TOC) entry or hyperlink behaves as follows: -1) If the tapped text contains web link, then the URI associated with the hyperlink will be opened in the default browser. +1) If the tapped text contains a web link, the URI associated with the hyperlink is opened in the default browser. -2) If the tapped text contains document link, then the PDF Viewer navigates to the destination page index which is associated with it. +2) If the tapped text contains a document link, the PDF Viewer navigates to the associated destination page index. ## How to disable hyperlink navigation in PDF document using PDF Viewer control? -You can disable the hyperlink navigation by setting the “AllowHyperlinkNavigation” property of PDF Viewer to false. By default, hyperlink navigation will be enabled in PDF Viewer. +You can disable hyperlink navigation by setting the `AllowHyperlinkNavigation` property of the PDF Viewer to `false`. By default, hyperlink navigation is enabled in the PDF Viewer. {% tabs %} {% highlight xaml %} @@ -29,7 +29,7 @@ You can disable the hyperlink navigation by setting the “AllowHyperlinkNavigat ## How to acquire the properties of clicked URI from PDF Viewer? -You can acquire the details of the hyperlink that is tapped in the PDF Viewer control from the HyperlinkEventArgs of HyperlinkPointerPressed event. Refer to the following code example for more details. +You can acquire the details of the hyperlink that is tapped in the PDF Viewer control from the `HyperlinkEventArgs` of the `HyperlinkPointerPressed` event. Refer to the following code example for more details. {% tabs %} {% highlight xaml %} @@ -44,7 +44,7 @@ You can acquire the details of the hyperlink that is tapped in the PDF Viewer co public void pdfViewerControl_HyperlinkPointerPressed(object sender,HyperlinkEventArgs args) { - // Gets or sets a value indicating whether the hyperlink navigation was handled. + // Gets or sets a value indicating whether the hyperlink navigation was handled. args.Handled = false; // Gets the hyperlink being clicked. @@ -53,15 +53,14 @@ You can acquire the details of the hyperlink that is tapped in the PDF Viewer co // Gets the current page index of the hyperlink. int pageIndex = args.PageIndex; - //Gets the destination page index of the hyperlink. + // Gets the destination page index of the hyperlink. int destinationPageIndex = args.DestinationPageIndex; - //Gets the bounds of the hyperlink is being clicked. + // Gets the bounds of the hyperlink being clicked. RectangleF hyperlinkBound = args.Bounds; - //Gets the whether the tapped hyper link is a Web Link or Document Link. - HyperlinkType linkType = args.HyperlinkType - + // Gets whether the tapped hyperlink is a Web Link or Document Link. + HyperlinkType linkType = args.HyperlinkType; } @@ -70,7 +69,7 @@ You can acquire the details of the hyperlink that is tapped in the PDF Viewer co ## How to detect whether the mouse pointer is over the hyperlink text? -The event `HyperlinkPointerMoved` will be raised when the mouse pointer is moved over the hyperlink text. Refer to the following code example for more details. +The `HyperlinkPointerMoved` event is raised when the mouse pointer is moved over the hyperlink text. Refer to the following code example for more details. {% tabs %} {% highlight xaml %} @@ -85,19 +84,19 @@ The event `HyperlinkPointerMoved` will be raised when the mouse pointer is moved public void pdfViewerControl_HyperlinkPointerMoved(object sender,HyperlinkEventArgs args) { - // Gets or sets a value indicating whether the hyperlink navigation was handled. + // Gets or sets a value indicating whether the hyperlink navigation was handled. args.Handled = false; - // Gets the hyperlink being clicked. + // Gets the hyperlink under the pointer. string uri = args.URI; // Gets the current page index of the hyperlink. int pageIndex = args.PageIndex; - //Gets the destination page index of the hyperlink. + // Gets the destination page index of the hyperlink. int destinationPageIndex = args.DestinationPageIndex; - //Gets the bounds of the hyperlink is being clicked. + // Gets the bounds of the hyperlink under the pointer. RectangleF hyperlinkBound = args.Bounds; //Gets the whether the tapped hyper link is a Web Link or Document Link. @@ -110,21 +109,21 @@ The event `HyperlinkPointerMoved` will be raised when the mouse pointer is moved ## How to restrict the URI navigation from the PDF Viewer? -By default, web link or document link navigation is performed on tapping the hyperlink text. This navigation can be restricted using the property 'Handled' of the `HyperlinkEventArgs`. Refer to the following code snippet for more details. +By default, web link or document link navigation is performed on tapping the hyperlink text. This navigation can be restricted using the `Handled` property of the `HyperlinkEventArgs`. Refer to the following code snippet for more details. {% tabs %} {% highlight c# %} public void pdfViewerControl_HyperlinkPointerPressed(object sender,HyperlinkEventArgs args) { - // Setting the property to true will restrict the URI navigation inside the PDF Viewer control. In default, the value is false. - args.Handled = false; + // Setting the property to true will restrict the URI navigation inside the PDF Viewer control. By default, the value is false. + args.Handled = true; } {% endhighlight %} {% endtabs %} ## See Also -- [Bookmark](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/bookmark-navigation) +- [Bookmark Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/bookmark-navigation) - [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) - [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-page-navigation) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md index 718243b1a3..5bb717e661 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md @@ -9,9 +9,9 @@ documentation: ug # Printing PDF in UWP PDF Viewer (SfPdfViewer) -Printing can be done using the Print method or by using the Print command. +Printing can be done using the `Print` method or by using the `PrintCommand`. This section covers synchronous printing, asynchronous printing with cancellation, exception handling, quality factor configuration, and print preview customization. -The following code shows how to perform the print operation using Print method. Here 'buffer' is the byte array read from the PDF file either using FileOpenPicker or from Assets folder, as illustrated in the [Viewing PDF](https://help.syncfusion.com/uwp/pdf-viewer/concepts-and-features/viewing-pdf) section. +The following code shows how to perform the print operation using the `Print` method. Here, `buffer` is the byte array read from the PDF file either using `FileOpenPicker` or from the Assets folder, as illustrated in the [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) section. {% tabs %} {% highlight c# %} @@ -40,7 +40,7 @@ End Sub {% endhighlight %} {% endtabs %} -The following code shows how to bind the PrintCommand to a Button +The following code shows how to bind the `PrintCommand` to a Button. {% tabs %} {% highlight xaml %} @@ -58,17 +58,17 @@ The PDF Viewer allows you to print the PDF document asynchronously using the `Pr {% tabs %} {% highlight c# %} -//Asynchronously prints the document loaded in the PDF viewer +// Asynchronously prints the document loaded in the PDF viewer. pdfViewer.PrintAsync(cancellationTokenSource); {% endhighlight %} {% endtabs %} -In the above code sample, the `cancellationTokenSource` enables you to cancel the asynchronous printing when it is in progress +In the above code sample, the `cancellationTokenSource` enables you to cancel the asynchronous printing when it is in progress. ### Cancel the asynchronous PDF printing -You can raise the cancel request when printing is in progress +You can raise the cancel request when printing is in progress. {% tabs %} {% highlight c# %} @@ -81,13 +81,13 @@ private void cancelButton_Clicked(object sender, EventArgs e) {% endhighlight %} {% endtabs %} - In the above code sample, the cancellationTokenSource instance is the same as the one given as the argument when printing the PDF document asynchronously. + In the above code sample, the `cancellationTokenSource` instance is the same as the one given as the argument when printing the PDF document asynchronously. - N> Calling the above method will not have any effect once the printing is complete. It will stop the printing process only when it is in progress. + N> Calling this method has no effect once printing is complete. It stops the printing process only when it is in progress. ### Handling exceptions while performing the asynchronous print -When the `PrintAsync` is called, the PDF Viewer will show the print previewer. Exceptions will be thrown if the print cannot be performed. The exceptions will be propagated back to the caller of this method. We recommend catching these exceptions as follows. +When the `PrintAsync` method is called, the PDF Viewer will show the print previewer. Exceptions will be thrown if the print cannot be performed. The exceptions will be propagated back to the caller of this method. Catch these exceptions as follows. {% tabs %} {% highlight c# %} @@ -97,13 +97,13 @@ When the `PrintAsync` is called, the PDF Viewer will show the print previewer. E try { - //Sets the name of the printed document. - pdfViewer.PrinterSettings.DocumentName = “PdfFileName.pdf”; + // Sets the name of the printed document. + pdfViewer.PrinterSettings.DocumentName = "PdfFileName.pdf"; - //Asynchronously prints the document loaded in the PDF viewer - await pdfViewerControl.PrintAsync(cancellationToken); + // Asynchronously prints the document loaded in the PDF viewer. + await pdfViewer.PrintAsync(cancellationToken); } - catch (Exception e) + catch (Exception ex) { ContentDialog printErrorDialog = new ContentDialog() { @@ -126,23 +126,25 @@ N> The [`SfPdfViewer`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.Pdf The PDF Viewer allows the user to set and retrieve the quality factor for print by using the [`QualityFactor`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.PrinterSettings.html#Syncfusion_Windows_PdfViewer_PrinterSettings_QualityFactor) property. The default value of this API is set to 1, and the values are restricted between 1 and 5. The values falling below the range are taken as 1, which represents the lowest page quality, and those above the range are taken as 5, which represents the highest page quality. Refer to the following code sample to set the quality factor for the print. +{% tabs %} {% highlight c# %} -//Sets the quality factor for the print. +// Sets the quality factor for the print. pdfViewer.PrinterSettings.QualityFactor = 2; {% endhighlight %} +{% endtabs %} N> Printing with quality factors higher than 2 will work as expected in the x64 configuration but may cause `System.OutOfMemoryException` in the x86 configuration due to the limited memory capacity of this architecture. ## Customizing the print previewer -You can customize the print options displayed in the print previewer while performing a print operation in the PDF Viewer control. The event `PrintTaskRequested` will be raised when you call the Print method to print a PDF document. +You can customize the print options displayed in the print previewer while performing a print operation in the PDF Viewer control. The `PrintTaskRequested` event will be raised when you call the `Print` method to print a PDF document. {% tabs %} {% highlight c# %} -//Wire up the PrintTaskRequested event with the PdfViewer_PrintTaskRequested +// Wire up the PrintTaskRequested event with the PdfViewer_PrintTaskRequested. pdfViewer.PrintTaskRequested += PdfViewer_PrintTaskRequested; {% endhighlight %} @@ -157,20 +159,20 @@ private void PdfViewer_PrintTaskRequested(object sender, SfPdfViewerPrintTaskReq { PrintTask printTask = null; - //Create a print task to customize the print options + // Create a print task to customize the print options. printTask = e.Request.CreatePrintTask("Printing", sourceRequested => { PrintTaskOptionDetails printDetailedOptions = PrintTaskOptionDetails.GetFromPrintTaskOptions(printTask.Options); IList displayedOptions = printDetailedOptions.DisplayedOptions; - //Allows to add the required print options + // Allows adding the required print options. displayedOptions.Add(Windows.Graphics.Printing.StandardPrintTaskOptions.CustomPageRanges); printTask.Options.PageRangeOptions.AllowCurrentPage = true; printTask.Options.PageRangeOptions.AllowAllPages = true; printTask.Options.PageRangeOptions.AllowCustomSetOfPages = true; - // Set the pdfViewerControl�s print document source + // Sets the pdfViewerControl's print document source. sourceRequested.SetSource(e.PrintDocumentSource); e.PrintTask = printTask; @@ -204,7 +206,7 @@ pdfViewerControl.PrintTaskRequested+= PrintTaskRequested; {% endhighlight %} {% endtabs %} -N>Though if you specify any print options to be displayed, only those that are supported by the selected printer are shown in the print preview UI. The print UI won't show options that the selected printer doesn't support. The print options will appear in the order in which they are added. +N> Even if you specify print options to be displayed, only those supported by the selected printer are shown in the print preview UI. The print UI will not show options that the selected printer does not support. Print options will appear in the order in which they are added. ## See Also - [Export Pages](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/exporting-pages-as-image) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md index 3174881c70..92d7ef69c0 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md @@ -7,7 +7,7 @@ control: PDF viewer documentation: ug --- -# Working with annotations in UWP PDF Viewer +# Working with Annotations in UWP PDF Viewer PDF Viewer allows user to include annotations in PDF files and provides options to modify or remove the existing annotations. The supported annotations are below. @@ -32,9 +32,9 @@ PDF viewer provides the following events. 5. AnnotationRemoved 6. AnnotationMovedOrResized -The properties of the annotation involved in the event can be obtained from the `AnnotationProperties` property of the event args parameter of each event except AnnotationMovedOrResized. Since the annotation properties are obtained from the same `AnnotationProperties` instance for all events except AnnotationMovedOrResized, only the AnnotationAdded event is illustrated below. +The properties of the annotation involved in an event can be obtained from the `AnnotationProperties` property of the event args parameter. This pattern is shared by all events except `AnnotationMovedOrResized`, so only the `AnnotationAdded` event is illustrated below. -The properties of the included annotation can be obtained by casting the `AnnotationAddedEventArgs` parameter's AnnotationProperties property to the property of corresponding annotation type. +To obtain properties for a specific annotation type, cast `AnnotationProperties` to the corresponding type (for example, `TextMarkupProperties`). {% highlight c# %} @@ -93,7 +93,7 @@ private void PdfViewer_AnnotationAdded(object sender, AnnotationMovedOrResizedEv ## Enable and disable selection of annotations -By default, PdfViewer allows the user to select the annotations by tapping on it, this action is followed by the appearance of the selector around the selected annotation. The selection of annotations can be disabled by setting `IsReadOnly` property of `AnnotationSettings` class to true. The default value of this API will be false. +By default, the SfPdfViewer control allows users to select annotations by tapping on them, and a selector appears around the selected annotation. The selection of annotations can be disabled by setting the `IsReadOnly` property of the `AnnotationSettings` class to `true`. The default value of this property is `false`. {% highlight c# %} @@ -128,7 +128,7 @@ The PDF viewer supports removing a single annotation and all the annotations in ### Remove a selected annotation -The following code snippet illustrates removing a selected annotation from the PDF document. +The following code snippet removes a selected annotation from the PDF document. {% tabs %} {% highlight xaml %} @@ -158,7 +158,7 @@ private void deleteAnnotationButton_clicked(object sender, RoutedEventArgs e) ### Remove all annotations -The following code snippet illustrates removing all annotations from the PDF. +The following code snippet removes all annotations from the PDF. {% highlight c# %} @@ -179,7 +179,7 @@ var annotations = pdfViewer.AnnotationCollection; ## How to show or hide the annotations present in the PDF? -Use the [`AnnotationVisibility`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_AnnotationVisibility) property to change the visibility of the annotations present in a PDF document. By default, the visibility of the annotation is `Visibility.Visible`. +Use the [`AnnotationVisibility`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_AnnotationVisibility) property to change the visibility of the annotations present in a PDF document. By default, the visibility of annotations is `Visibility.Visible`. {% highlight c# %} diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md index d1add11d73..cf7e7bf768 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md @@ -13,7 +13,7 @@ Text search can be done in two ways, by using the SearchText method or by using In all code snippets found below, 'buffer' is the byte array read from the PDF file either using FileOpenPicker or from Assets folder, as illustrated in the [Viewing PDF](https://help.syncfusion.com/uwp/pdf-viewer/concepts-and-features/viewing-pdf) section. -**Using search methods** +## Using Search Methods The following code shows how to initiate the text search using the method. {% tabs %} @@ -26,7 +26,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchText("the"); } {% endhighlight %} @@ -53,7 +53,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchNextText("the"); } {% endhighlight %} @@ -80,7 +80,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchPrevText("the"); } {% endhighlight %} @@ -97,9 +97,9 @@ End Sub {% endhighlight %} {% endtabs %} -**Using search commands** +## Using Search Commands -The following code shows how to search for the next instance using SearchNextCommand. +The following code shows how to search for the next instance using `SearchNextCommand`. {% tabs %} {% highlight xaml %} @@ -109,17 +109,19 @@ The following code shows how to search for the next instance using SearchNextCom {% endhighlight %} {% endtabs %} -The following code shows how to search for the previous instance using SearchPreviousCommand. + +The following code shows how to search for the previous instance using `SearchPreviousCommand`. + {% tabs %} {% highlight xaml %} - + {% endhighlight %} {% endtabs %} -**Using asynchronous search methods** +## Using Asynchronous Search Methods The PDF viewer allows the users to perform text search asynchronously using the [SearchTextAsync](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_SearchTextAsync_System_String_System_Threading_CancellationToken_) method. The user can also cancel the asynchronous text search when it is in progress. @@ -135,7 +137,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void SearchButton_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchTextAsync(targetText, cts.Token); } @@ -158,7 +160,7 @@ CancellationTokenSource cts = new CancellationTokenSource(); private void SearchNextButton_Click(object sender, RoutedEventArgs e) { - //Searches for the next text instance in the PDF Document. + // Searches for the next text instance in the PDF document. pdfViewer.SearchNextTextAsync(targetText, cts.Token); } @@ -179,7 +181,7 @@ CancellationTokenSource cts = new CancellationTokenSource(); private void SearchPreviousButton_Click(object sender, RoutedEventArgs e) { - //Searches for the previous instance of the text in the PDF Document. + // Searches for the previous instance of the text in the PDF document. pdfViewer.SearchPreviousTextAsync(targetText, cts.Token); } diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md index 8fc9a60c41..bc70d6b7cd 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md @@ -19,14 +19,14 @@ You can create a **UWP Application** using Visual Studio via [Microsoft Template ## Assemblies Deployment -You can add a UWP PdfViewer component to your application by installing it via NuGet packages (recommended) or by manually adding the required assemblies to the project. +You can add a UWP PDF Viewer component to your application by installing it via NuGet packages (recommended) or by manually adding the required assemblies to the project. {% tabcontents %} {% tabcontent NuGet Package %} -### Install Syncfusion® UWP PdfViewer NuGet Package +### Install Syncfusion® UWP PDF Viewer NuGet Package -To add **UWP PdfViewer** component in the application, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install: +To add the **UWP PDF Viewer** component in the application, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install: • [Syncfusion.SfPdfViewer.UWP](https://www.nuget.org/packages/Syncfusion.SfPdfViewer.UWP) @@ -34,9 +34,9 @@ To add **UWP PdfViewer** component in the application, open the NuGet package ma {% tabcontent Assemblies (.dll) %} -### Add Syncfusion® UWP PdfViewer Assemblies +### Add Syncfusion® UWP PDF Viewer Assemblies -Below table describes, list of assemblies required to be added in project when the UWP PdfViewer control is used in your application. +The following table lists the assemblies required when the UWP PDF Viewer control is used in your application. @@ -69,21 +69,25 @@ Below table describes, list of assemblies required to be added in project when t
-Each assembly must be placed together with its corresponding resource files (i.e., the resource files for an assembly should reside in the same folder as that assembly). The assemblies do not all have to be in a single folder — each assembly may live in its own folder so long as its resource files are kept alongside it. The screenshot shows only the SfPdfViewer assembly for brevity. +Each assembly must be placed together with its corresponding resource files; that is, the resource files for an assembly should reside in the same folder as that assembly. + +The assemblies do not all have to be in a single folder. Each assembly may live in its own folder, as long as its resource files are kept alongside it. The screenshot shows only the SfPdfViewer assembly for brevity. ![Dependent assemblies needed for SfPdfViewerControl](Getting-Started_images/Getting-Started_img3.jpeg) This co-location matters only if you move assemblies out of their installed location. If you relocate an assembly, be sure to move its resource files with it and place them in the same folder as that assembly. -N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion® license key in your UWP application to use our components. - {% endtabcontent %} {% endtabcontents %} -## Add UWP PdfViewer component +## Licensing + +N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to register the Syncfusion® license key in your UWP application to use our components. + +## Add UWP PDF Viewer component -UWP PdfViewer control can be added to an application either through the designer (XAML) or programmatically using code. +UWP PDF Viewer control can be added to an application either through the designer (XAML) or programmatically using code. Use the **Via Designer** tab if you prefer a drag-and-drop workflow; use the **Via Coding** tab if you want to add the control directly in XAML or C#. {% tabcontents %} @@ -95,7 +99,7 @@ UWP PdfViewer control can be added to an application either through the designer ![SfPdfViewerControl in visual studio toolbox](Getting-Started_images/Getting-Started_img1.jpeg) -3. Drag `SfPdfViewerControl`(https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) and drop in to the Designer area from the Toolbox. +3. Drag the [`SfPdfViewerControl`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) and drop it into the Designer area from the Toolbox. When you drag the SfPdfViewerControl toolbox item to the window, it automatically adds the required assembly references to the current application. @@ -103,9 +107,9 @@ When you drag the SfPdfViewerControl toolbox item to the window, it automaticall {% tabcontent Via Coding %} -The SfPdfViewerControl is available in the following namespace [_Syncfusion.Windows.PdfViewer_](https://help.syncfusion.com/cr/UWP/Syncfusion.Windows.PdfViewer.html) and it can be created using XAML or programmatically using C#. +The SfPdfViewerControl is available in the [`Syncfusion.Windows.PdfViewer`](https://help.syncfusion.com/cr/UWP/Syncfusion.Windows.PdfViewer.html) namespace and can be created using XAML or programmatically using C#. -1. Add the Syncfusion PdfViewer namespace +1. Add the Syncfusion PDF Viewer namespace. {% tabs %} {% highlight xaml tabtitle="MainPage.xaml" %} xmlns:syncfusion="using:Syncfusion.Windows.PdfViewer" @@ -131,6 +135,7 @@ After adding the `SfPdfViewerControl`, you can load a PDF document using data bi 2. Create a simple class (`PdfReport.cs`) that provides the PDF stream. +N> Replace `PdfViewerExample` in the manifest resource path below with your project's default namespace. {% tabs %} {% highlight c# tabtitle="PdfReport.cs" %} @@ -245,4 +250,6 @@ Press Ctrl+F5 (Windows) or +F5 (m - [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) - [UWP PDF Viewer Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/overview) - [Magnification](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-magnification) +- [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-page-navigation) +- [Text Search](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-text-search) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md b/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md index 4dda7479f4..8350a61188 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md @@ -7,11 +7,13 @@ control: PDF viewer documentation: ug --- -# Customize the scrollbar in UWP PDF Viewer +# Customize the Scrollbar in UWP PDF Viewer + +This section explains how to customize the scrollbar appearance and width in the SfPdfViewer control. ## Customize the color of the scrollbar thumb -The PDF viewer uses the [ScrollViewer] (https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-19041) control to scroll the pages of a PDF. The color of the vertical and horizontal scrollbar thumbs can be customized using the following code. +The PDF Viewer uses the [`ScrollViewer`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-19041) control to scroll the pages of a PDF. The color of the vertical and horizontal scrollbar thumbs can be customized using the following code. {% tabs %} {% highlight xaml %} @@ -28,14 +30,14 @@ The PDF viewer uses the [ScrollViewer] (https://docs.microsoft.com/en-us/uwp/api ## Customize the width of the vertical scrollbar -The width of the vertical scrollbar of the [ScrollViewer](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) can be modified by using the [VerticalScrollBarWidth](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_VerticalScrollBarWidth) property. The default value of the API is as same as the default width of the vertical scrollbar of the [ScrollViewer](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) control. +The width of the vertical scrollbar of the [`ScrollViewer`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) can be modified by using the [`VerticalScrollBarWidth`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_VerticalScrollBarWidth) property. The default value of this property matches the default width of the vertical scrollbar of the [`ScrollViewer`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) control. {% tabs %} {% highlight c# %} -//Sets the width of the vertical scrollbar in the PDF Viewer. -pdfViewerControl.VerticalScrollBarWidth = 100; -//Gets the width of the vertical scrollbar in the PDF Viewer. +// Sets the width of the vertical scrollbar in the PDF Viewer. +pdfViewerControl.VerticalScrollBarWidth = 100; +// Gets the width of the vertical scrollbar in the PDF Viewer. double verticalScrollBarWidth = pdfViewerControl.VerticalScrollBarWidth; {% endhighlight %} diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md b/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md index 92c2810dcd..753e2303d6 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md @@ -9,7 +9,7 @@ documentation: ug # UWP PDF Viewer (SfPdfViewer) Overview -The [PDF viewer](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) for Universal Windows Platform is a native control for viewing and printing PDF documents. The control internally makes use of the Windows rendering engine (Windows.Data.Pdf) for rendering the pages of the PDF document. +The [PDF viewer](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) for Universal Windows Platform is a native control for viewing and printing PDF documents. The control uses the Windows rendering engine (`Windows.Data.Pdf`) to render the pages of the PDF document. ## In This Section From 078abe883df3a104d30a3acfe3b3cdd70d855a10 Mon Sep 17 00:00:00 2001 From: Silambharasan K Date: Mon, 13 Jul 2026 11:06:24 +0530 Subject: [PATCH 2/8] Task(1040469): Need to improve UG documentation for UWP PDFViewer using code studio AI tools --- .../Bookmark-navigation.md | 10 +++-- .../Creating-custom-toolbar.md | 16 +++---- .../uwp/Concepts-and-Features/Hyperlink.md | 39 ++++++++-------- .../uwp/Concepts-and-Features/Printing-PDF.md | 44 ++++++++++--------- .../Working-with-annotations.md | 14 +++--- .../Working-with-text-search.md | 26 ++++++----- .../PDF/PDF-Viewer/uwp/Getting-Started.md | 33 ++++++++------ .../uwp/How-to/Customize-the-scrollbar.md | 14 +++--- .../PDF/PDF-Viewer/uwp/Overview.md | 2 +- 9 files changed, 106 insertions(+), 92 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md index eb2d22607a..175ecd81c2 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md @@ -7,9 +7,9 @@ control: SfPdfViewerControl documentation: ug --- -# Bookmark navigation in UWP PDF Viewer (SfPdfViewer) +# Bookmark Navigation in UWP PDF Viewer (SfPdfViewer) -PDF Viewer allows users to navigate to the bookmarks present in the loaded PDF document. +The SfPdfViewer control allows users to navigate to the bookmarks present in the loaded PDF document. This section covers programmatic navigation using the `GoToBookmark` method. ## Programmatically navigate to a bookmark destination @@ -24,13 +24,15 @@ PdfLoadedDocument loadedDocument = new PdfLoadedDocument(documentStream); //Retrieves the bookmark collection from the loaded PDF document PdfBookmarkBase bookmark = loadedDocument.Bookmarks; -//Navigate to the specified bookmark destination offset +//Navigates to the specified bookmark destination pdfViewerControl.GoToBookmark(bookmark[0]); {% endhighlight %} {% endtabs %} ## See Also +- [UWP PDF Viewer Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/overview) - [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-page-navigation) - [Hyperlink](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/hyperlink) -- [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) \ No newline at end of file +- [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) +- [GoToBookmark API Reference](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md index 5ea10fee45..82400b464c 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md @@ -9,33 +9,33 @@ documentation: ug # Creating a custom toolbar in UWP PDF Viewer (SfPdfViewer) -PdfViewer does not have a toolbar by default. But a custom toolbar can be designed at the sample with its buttons wired to the PdfViewer APIs. +The SfPdfViewer control does not include a built-in toolbar by default; however, a custom toolbar can be designed at the application level, with its buttons wired to the SfPdfViewer APIs. ## Creating separate UIs for desktop and mobile -Create a new UWP project (the name "PdfViewerCustomToolbar" is used here). It will by default have a MainPage.xaml file, a MainPage.xaml.cs file. Create a new folder in the project with name "DeviceFamily-Mobile" and create another XAML file with the same name MainPage.xaml in this folder. Open this file and set the class property to MainPage.xaml.cs. +Create a new UWP project (the name "PdfViewerCustomToolbar" is used here). By default, the project will contain a `MainPage.xaml` file and a `MainPage.xaml.cs` code-behind file. Create a new folder in the project with the name "DeviceFamily-Mobile", and create another XAML file named `MainPage.xaml` in this folder. Open this file and set the `x:Class` attribute to `MainPage.xaml.cs`. {% tabs %} {% highlight xaml %} -x:Class="PdfViewerCustomToolbar.MainPage"; +x:Class="PdfViewerCustomToolbar.MainPage" {% endhighlight %} {% endtabs %} -Make sure that both the xaml files are in the same namespace "PdfViewerCustomToolbar" +Make sure that both XAML files are in the same namespace, "PdfViewerCustomToolbar". {%tabs%} {%highlight xaml%} -xmlns:local="using:PdfViewerCustomToolbar"; +xmlns:local="using:PdfViewerCustomToolbar" {%endhighlight%} {%endtabs%} -The reason for two XAML files is that same UI design cannot be used for both desktop and mobile. So, one XAML file is used for desktop UI and the other is for mobile UI. The MainPage.xaml.cs file serve as the common code behind for both XAML pages. +Two XAML files are used because the same UI design cannot be shared between desktop and mobile. One XAML file is used for the desktop UI, while the other is used for the mobile UI. The `MainPage.xaml.cs` file serves as the common code-behind for both XAML pages. -In the constructor of MainPage set the DataContext to PdfViewer. +In the constructor of `MainPage`, set the `DataContext` to the SfPdfViewer instance. {%tabs%} {%highlight c#%} @@ -45,7 +45,7 @@ this.DataContext = pdfViewer; {%endhighlight%} {%endtabs%} -The UI design of the application for desktop and mobile is illustrated in the following documentation pages. The link to the common sample can be found at the ends of both the documentation pages. +The UI design of the application for desktop and mobile is illustrated in the following documentation pages. The link to the common sample can be found at the end of each documentation page. 1. [Desktop design](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/ui-design-for-desktop) 2. [Mobile design](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/ui-design-for-mobile) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md index a1d72a5939..475ef823ae 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md @@ -9,15 +9,15 @@ documentation: ug # Hyperlink in UWP PDF Viewer (SfPdfViewer) -PDF Viewer supports hyperlink navigation which detects document link and web link present in the pages of the PDF document. Tapping on the TOC and hyperlink will behave in the following manner. +The PdfViewer control supports hyperlink navigation that detects document links and web links present in the PDF document pages. Tapping a table of contents (TOC) entry or hyperlink behaves as follows: -1) If the tapped text contains web link, then the URI associated with the hyperlink will be opened in the default browser. +1) If the tapped text contains a web link, the URI associated with the hyperlink is opened in the default browser. -2) If the tapped text contains document link, then the PDF Viewer navigates to the destination page index which is associated with it. +2) If the tapped text contains a document link, the PDF Viewer navigates to the associated destination page index. ## How to disable hyperlink navigation in PDF document using PDF Viewer control? -You can disable the hyperlink navigation by setting the “AllowHyperlinkNavigation” property of PDF Viewer to false. By default, hyperlink navigation will be enabled in PDF Viewer. +You can disable hyperlink navigation by setting the `AllowHyperlinkNavigation` property of the PDF Viewer to `false`. By default, hyperlink navigation is enabled in the PDF Viewer. {% tabs %} {% highlight xaml %} @@ -29,7 +29,7 @@ You can disable the hyperlink navigation by setting the “AllowHyperlinkNavigat ## How to acquire the properties of clicked URI from PDF Viewer? -You can acquire the details of the hyperlink that is tapped in the PDF Viewer control from the HyperlinkEventArgs of HyperlinkPointerPressed event. Refer to the following code example for more details. +You can acquire the details of the hyperlink that is tapped in the PDF Viewer control from the `HyperlinkEventArgs` of the `HyperlinkPointerPressed` event. Refer to the following code example for more details. {% tabs %} {% highlight xaml %} @@ -44,7 +44,7 @@ You can acquire the details of the hyperlink that is tapped in the PDF Viewer co public void pdfViewerControl_HyperlinkPointerPressed(object sender,HyperlinkEventArgs args) { - // Gets or sets a value indicating whether the hyperlink navigation was handled. + // Gets or sets a value indicating whether the hyperlink navigation was handled. args.Handled = false; // Gets the hyperlink being clicked. @@ -53,15 +53,14 @@ You can acquire the details of the hyperlink that is tapped in the PDF Viewer co // Gets the current page index of the hyperlink. int pageIndex = args.PageIndex; - //Gets the destination page index of the hyperlink. + // Gets the destination page index of the hyperlink. int destinationPageIndex = args.DestinationPageIndex; - //Gets the bounds of the hyperlink is being clicked. + // Gets the bounds of the hyperlink being clicked. RectangleF hyperlinkBound = args.Bounds; - //Gets the whether the tapped hyper link is a Web Link or Document Link. - HyperlinkType linkType = args.HyperlinkType - + // Gets whether the tapped hyperlink is a Web Link or Document Link. + HyperlinkType linkType = args.HyperlinkType; } @@ -70,7 +69,7 @@ You can acquire the details of the hyperlink that is tapped in the PDF Viewer co ## How to detect whether the mouse pointer is over the hyperlink text? -The event `HyperlinkPointerMoved` will be raised when the mouse pointer is moved over the hyperlink text. Refer to the following code example for more details. +The `HyperlinkPointerMoved` event is raised when the mouse pointer is moved over the hyperlink text. Refer to the following code example for more details. {% tabs %} {% highlight xaml %} @@ -85,19 +84,19 @@ The event `HyperlinkPointerMoved` will be raised when the mouse pointer is moved public void pdfViewerControl_HyperlinkPointerMoved(object sender,HyperlinkEventArgs args) { - // Gets or sets a value indicating whether the hyperlink navigation was handled. + // Gets or sets a value indicating whether the hyperlink navigation was handled. args.Handled = false; - // Gets the hyperlink being clicked. + // Gets the hyperlink under the pointer. string uri = args.URI; // Gets the current page index of the hyperlink. int pageIndex = args.PageIndex; - //Gets the destination page index of the hyperlink. + // Gets the destination page index of the hyperlink. int destinationPageIndex = args.DestinationPageIndex; - //Gets the bounds of the hyperlink is being clicked. + // Gets the bounds of the hyperlink under the pointer. RectangleF hyperlinkBound = args.Bounds; //Gets the whether the tapped hyper link is a Web Link or Document Link. @@ -110,21 +109,21 @@ The event `HyperlinkPointerMoved` will be raised when the mouse pointer is moved ## How to restrict the URI navigation from the PDF Viewer? -By default, web link or document link navigation is performed on tapping the hyperlink text. This navigation can be restricted using the property 'Handled' of the `HyperlinkEventArgs`. Refer to the following code snippet for more details. +By default, web link or document link navigation is performed on tapping the hyperlink text. This navigation can be restricted using the `Handled` property of the `HyperlinkEventArgs`. Refer to the following code snippet for more details. {% tabs %} {% highlight c# %} public void pdfViewerControl_HyperlinkPointerPressed(object sender,HyperlinkEventArgs args) { - // Setting the property to true will restrict the URI navigation inside the PDF Viewer control. In default, the value is false. - args.Handled = false; + // Setting the property to true will restrict the URI navigation inside the PDF Viewer control. By default, the value is false. + args.Handled = true; } {% endhighlight %} {% endtabs %} ## See Also -- [Bookmark](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/bookmark-navigation) +- [Bookmark Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/bookmark-navigation) - [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) - [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-page-navigation) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md index 718243b1a3..5bb717e661 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md @@ -9,9 +9,9 @@ documentation: ug # Printing PDF in UWP PDF Viewer (SfPdfViewer) -Printing can be done using the Print method or by using the Print command. +Printing can be done using the `Print` method or by using the `PrintCommand`. This section covers synchronous printing, asynchronous printing with cancellation, exception handling, quality factor configuration, and print preview customization. -The following code shows how to perform the print operation using Print method. Here 'buffer' is the byte array read from the PDF file either using FileOpenPicker or from Assets folder, as illustrated in the [Viewing PDF](https://help.syncfusion.com/uwp/pdf-viewer/concepts-and-features/viewing-pdf) section. +The following code shows how to perform the print operation using the `Print` method. Here, `buffer` is the byte array read from the PDF file either using `FileOpenPicker` or from the Assets folder, as illustrated in the [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) section. {% tabs %} {% highlight c# %} @@ -40,7 +40,7 @@ End Sub {% endhighlight %} {% endtabs %} -The following code shows how to bind the PrintCommand to a Button +The following code shows how to bind the `PrintCommand` to a Button. {% tabs %} {% highlight xaml %} @@ -58,17 +58,17 @@ The PDF Viewer allows you to print the PDF document asynchronously using the `Pr {% tabs %} {% highlight c# %} -//Asynchronously prints the document loaded in the PDF viewer +// Asynchronously prints the document loaded in the PDF viewer. pdfViewer.PrintAsync(cancellationTokenSource); {% endhighlight %} {% endtabs %} -In the above code sample, the `cancellationTokenSource` enables you to cancel the asynchronous printing when it is in progress +In the above code sample, the `cancellationTokenSource` enables you to cancel the asynchronous printing when it is in progress. ### Cancel the asynchronous PDF printing -You can raise the cancel request when printing is in progress +You can raise the cancel request when printing is in progress. {% tabs %} {% highlight c# %} @@ -81,13 +81,13 @@ private void cancelButton_Clicked(object sender, EventArgs e) {% endhighlight %} {% endtabs %} - In the above code sample, the cancellationTokenSource instance is the same as the one given as the argument when printing the PDF document asynchronously. + In the above code sample, the `cancellationTokenSource` instance is the same as the one given as the argument when printing the PDF document asynchronously. - N> Calling the above method will not have any effect once the printing is complete. It will stop the printing process only when it is in progress. + N> Calling this method has no effect once printing is complete. It stops the printing process only when it is in progress. ### Handling exceptions while performing the asynchronous print -When the `PrintAsync` is called, the PDF Viewer will show the print previewer. Exceptions will be thrown if the print cannot be performed. The exceptions will be propagated back to the caller of this method. We recommend catching these exceptions as follows. +When the `PrintAsync` method is called, the PDF Viewer will show the print previewer. Exceptions will be thrown if the print cannot be performed. The exceptions will be propagated back to the caller of this method. Catch these exceptions as follows. {% tabs %} {% highlight c# %} @@ -97,13 +97,13 @@ When the `PrintAsync` is called, the PDF Viewer will show the print previewer. E try { - //Sets the name of the printed document. - pdfViewer.PrinterSettings.DocumentName = “PdfFileName.pdf”; + // Sets the name of the printed document. + pdfViewer.PrinterSettings.DocumentName = "PdfFileName.pdf"; - //Asynchronously prints the document loaded in the PDF viewer - await pdfViewerControl.PrintAsync(cancellationToken); + // Asynchronously prints the document loaded in the PDF viewer. + await pdfViewer.PrintAsync(cancellationToken); } - catch (Exception e) + catch (Exception ex) { ContentDialog printErrorDialog = new ContentDialog() { @@ -126,23 +126,25 @@ N> The [`SfPdfViewer`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.Pdf The PDF Viewer allows the user to set and retrieve the quality factor for print by using the [`QualityFactor`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.PrinterSettings.html#Syncfusion_Windows_PdfViewer_PrinterSettings_QualityFactor) property. The default value of this API is set to 1, and the values are restricted between 1 and 5. The values falling below the range are taken as 1, which represents the lowest page quality, and those above the range are taken as 5, which represents the highest page quality. Refer to the following code sample to set the quality factor for the print. +{% tabs %} {% highlight c# %} -//Sets the quality factor for the print. +// Sets the quality factor for the print. pdfViewer.PrinterSettings.QualityFactor = 2; {% endhighlight %} +{% endtabs %} N> Printing with quality factors higher than 2 will work as expected in the x64 configuration but may cause `System.OutOfMemoryException` in the x86 configuration due to the limited memory capacity of this architecture. ## Customizing the print previewer -You can customize the print options displayed in the print previewer while performing a print operation in the PDF Viewer control. The event `PrintTaskRequested` will be raised when you call the Print method to print a PDF document. +You can customize the print options displayed in the print previewer while performing a print operation in the PDF Viewer control. The `PrintTaskRequested` event will be raised when you call the `Print` method to print a PDF document. {% tabs %} {% highlight c# %} -//Wire up the PrintTaskRequested event with the PdfViewer_PrintTaskRequested +// Wire up the PrintTaskRequested event with the PdfViewer_PrintTaskRequested. pdfViewer.PrintTaskRequested += PdfViewer_PrintTaskRequested; {% endhighlight %} @@ -157,20 +159,20 @@ private void PdfViewer_PrintTaskRequested(object sender, SfPdfViewerPrintTaskReq { PrintTask printTask = null; - //Create a print task to customize the print options + // Create a print task to customize the print options. printTask = e.Request.CreatePrintTask("Printing", sourceRequested => { PrintTaskOptionDetails printDetailedOptions = PrintTaskOptionDetails.GetFromPrintTaskOptions(printTask.Options); IList displayedOptions = printDetailedOptions.DisplayedOptions; - //Allows to add the required print options + // Allows adding the required print options. displayedOptions.Add(Windows.Graphics.Printing.StandardPrintTaskOptions.CustomPageRanges); printTask.Options.PageRangeOptions.AllowCurrentPage = true; printTask.Options.PageRangeOptions.AllowAllPages = true; printTask.Options.PageRangeOptions.AllowCustomSetOfPages = true; - // Set the pdfViewerControl�s print document source + // Sets the pdfViewerControl's print document source. sourceRequested.SetSource(e.PrintDocumentSource); e.PrintTask = printTask; @@ -204,7 +206,7 @@ pdfViewerControl.PrintTaskRequested+= PrintTaskRequested; {% endhighlight %} {% endtabs %} -N>Though if you specify any print options to be displayed, only those that are supported by the selected printer are shown in the print preview UI. The print UI won't show options that the selected printer doesn't support. The print options will appear in the order in which they are added. +N> Even if you specify print options to be displayed, only those supported by the selected printer are shown in the print preview UI. The print UI will not show options that the selected printer does not support. Print options will appear in the order in which they are added. ## See Also - [Export Pages](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/exporting-pages-as-image) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md index 3174881c70..92d7ef69c0 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md @@ -7,7 +7,7 @@ control: PDF viewer documentation: ug --- -# Working with annotations in UWP PDF Viewer +# Working with Annotations in UWP PDF Viewer PDF Viewer allows user to include annotations in PDF files and provides options to modify or remove the existing annotations. The supported annotations are below. @@ -32,9 +32,9 @@ PDF viewer provides the following events. 5. AnnotationRemoved 6. AnnotationMovedOrResized -The properties of the annotation involved in the event can be obtained from the `AnnotationProperties` property of the event args parameter of each event except AnnotationMovedOrResized. Since the annotation properties are obtained from the same `AnnotationProperties` instance for all events except AnnotationMovedOrResized, only the AnnotationAdded event is illustrated below. +The properties of the annotation involved in an event can be obtained from the `AnnotationProperties` property of the event args parameter. This pattern is shared by all events except `AnnotationMovedOrResized`, so only the `AnnotationAdded` event is illustrated below. -The properties of the included annotation can be obtained by casting the `AnnotationAddedEventArgs` parameter's AnnotationProperties property to the property of corresponding annotation type. +To obtain properties for a specific annotation type, cast `AnnotationProperties` to the corresponding type (for example, `TextMarkupProperties`). {% highlight c# %} @@ -93,7 +93,7 @@ private void PdfViewer_AnnotationAdded(object sender, AnnotationMovedOrResizedEv ## Enable and disable selection of annotations -By default, PdfViewer allows the user to select the annotations by tapping on it, this action is followed by the appearance of the selector around the selected annotation. The selection of annotations can be disabled by setting `IsReadOnly` property of `AnnotationSettings` class to true. The default value of this API will be false. +By default, the SfPdfViewer control allows users to select annotations by tapping on them, and a selector appears around the selected annotation. The selection of annotations can be disabled by setting the `IsReadOnly` property of the `AnnotationSettings` class to `true`. The default value of this property is `false`. {% highlight c# %} @@ -128,7 +128,7 @@ The PDF viewer supports removing a single annotation and all the annotations in ### Remove a selected annotation -The following code snippet illustrates removing a selected annotation from the PDF document. +The following code snippet removes a selected annotation from the PDF document. {% tabs %} {% highlight xaml %} @@ -158,7 +158,7 @@ private void deleteAnnotationButton_clicked(object sender, RoutedEventArgs e) ### Remove all annotations -The following code snippet illustrates removing all annotations from the PDF. +The following code snippet removes all annotations from the PDF. {% highlight c# %} @@ -179,7 +179,7 @@ var annotations = pdfViewer.AnnotationCollection; ## How to show or hide the annotations present in the PDF? -Use the [`AnnotationVisibility`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_AnnotationVisibility) property to change the visibility of the annotations present in a PDF document. By default, the visibility of the annotation is `Visibility.Visible`. +Use the [`AnnotationVisibility`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_AnnotationVisibility) property to change the visibility of the annotations present in a PDF document. By default, the visibility of annotations is `Visibility.Visible`. {% highlight c# %} diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md index d1add11d73..cf7e7bf768 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md @@ -13,7 +13,7 @@ Text search can be done in two ways, by using the SearchText method or by using In all code snippets found below, 'buffer' is the byte array read from the PDF file either using FileOpenPicker or from Assets folder, as illustrated in the [Viewing PDF](https://help.syncfusion.com/uwp/pdf-viewer/concepts-and-features/viewing-pdf) section. -**Using search methods** +## Using Search Methods The following code shows how to initiate the text search using the method. {% tabs %} @@ -26,7 +26,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchText("the"); } {% endhighlight %} @@ -53,7 +53,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchNextText("the"); } {% endhighlight %} @@ -80,7 +80,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchPrevText("the"); } {% endhighlight %} @@ -97,9 +97,9 @@ End Sub {% endhighlight %} {% endtabs %} -**Using search commands** +## Using Search Commands -The following code shows how to search for the next instance using SearchNextCommand. +The following code shows how to search for the next instance using `SearchNextCommand`. {% tabs %} {% highlight xaml %} @@ -109,17 +109,19 @@ The following code shows how to search for the next instance using SearchNextCom {% endhighlight %} {% endtabs %} -The following code shows how to search for the previous instance using SearchPreviousCommand. + +The following code shows how to search for the previous instance using `SearchPreviousCommand`. + {% tabs %} {% highlight xaml %} - + {% endhighlight %} {% endtabs %} -**Using asynchronous search methods** +## Using Asynchronous Search Methods The PDF viewer allows the users to perform text search asynchronously using the [SearchTextAsync](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_SearchTextAsync_System_String_System_Threading_CancellationToken_) method. The user can also cancel the asynchronous text search when it is in progress. @@ -135,7 +137,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void SearchButton_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchTextAsync(targetText, cts.Token); } @@ -158,7 +160,7 @@ CancellationTokenSource cts = new CancellationTokenSource(); private void SearchNextButton_Click(object sender, RoutedEventArgs e) { - //Searches for the next text instance in the PDF Document. + // Searches for the next text instance in the PDF document. pdfViewer.SearchNextTextAsync(targetText, cts.Token); } @@ -179,7 +181,7 @@ CancellationTokenSource cts = new CancellationTokenSource(); private void SearchPreviousButton_Click(object sender, RoutedEventArgs e) { - //Searches for the previous instance of the text in the PDF Document. + // Searches for the previous instance of the text in the PDF document. pdfViewer.SearchPreviousTextAsync(targetText, cts.Token); } diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md index 8fc9a60c41..bc70d6b7cd 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md @@ -19,14 +19,14 @@ You can create a **UWP Application** using Visual Studio via [Microsoft Template ## Assemblies Deployment -You can add a UWP PdfViewer component to your application by installing it via NuGet packages (recommended) or by manually adding the required assemblies to the project. +You can add a UWP PDF Viewer component to your application by installing it via NuGet packages (recommended) or by manually adding the required assemblies to the project. {% tabcontents %} {% tabcontent NuGet Package %} -### Install Syncfusion® UWP PdfViewer NuGet Package +### Install Syncfusion® UWP PDF Viewer NuGet Package -To add **UWP PdfViewer** component in the application, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install: +To add the **UWP PDF Viewer** component in the application, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install: • [Syncfusion.SfPdfViewer.UWP](https://www.nuget.org/packages/Syncfusion.SfPdfViewer.UWP) @@ -34,9 +34,9 @@ To add **UWP PdfViewer** component in the application, open the NuGet package ma {% tabcontent Assemblies (.dll) %} -### Add Syncfusion® UWP PdfViewer Assemblies +### Add Syncfusion® UWP PDF Viewer Assemblies -Below table describes, list of assemblies required to be added in project when the UWP PdfViewer control is used in your application. +The following table lists the assemblies required when the UWP PDF Viewer control is used in your application. @@ -69,21 +69,25 @@ Below table describes, list of assemblies required to be added in project when t
-Each assembly must be placed together with its corresponding resource files (i.e., the resource files for an assembly should reside in the same folder as that assembly). The assemblies do not all have to be in a single folder — each assembly may live in its own folder so long as its resource files are kept alongside it. The screenshot shows only the SfPdfViewer assembly for brevity. +Each assembly must be placed together with its corresponding resource files; that is, the resource files for an assembly should reside in the same folder as that assembly. + +The assemblies do not all have to be in a single folder. Each assembly may live in its own folder, as long as its resource files are kept alongside it. The screenshot shows only the SfPdfViewer assembly for brevity. ![Dependent assemblies needed for SfPdfViewerControl](Getting-Started_images/Getting-Started_img3.jpeg) This co-location matters only if you move assemblies out of their installed location. If you relocate an assembly, be sure to move its resource files with it and place them in the same folder as that assembly. -N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion® license key in your UWP application to use our components. - {% endtabcontent %} {% endtabcontents %} -## Add UWP PdfViewer component +## Licensing + +N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to register the Syncfusion® license key in your UWP application to use our components. + +## Add UWP PDF Viewer component -UWP PdfViewer control can be added to an application either through the designer (XAML) or programmatically using code. +UWP PDF Viewer control can be added to an application either through the designer (XAML) or programmatically using code. Use the **Via Designer** tab if you prefer a drag-and-drop workflow; use the **Via Coding** tab if you want to add the control directly in XAML or C#. {% tabcontents %} @@ -95,7 +99,7 @@ UWP PdfViewer control can be added to an application either through the designer ![SfPdfViewerControl in visual studio toolbox](Getting-Started_images/Getting-Started_img1.jpeg) -3. Drag `SfPdfViewerControl`(https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) and drop in to the Designer area from the Toolbox. +3. Drag the [`SfPdfViewerControl`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) and drop it into the Designer area from the Toolbox. When you drag the SfPdfViewerControl toolbox item to the window, it automatically adds the required assembly references to the current application. @@ -103,9 +107,9 @@ When you drag the SfPdfViewerControl toolbox item to the window, it automaticall {% tabcontent Via Coding %} -The SfPdfViewerControl is available in the following namespace [_Syncfusion.Windows.PdfViewer_](https://help.syncfusion.com/cr/UWP/Syncfusion.Windows.PdfViewer.html) and it can be created using XAML or programmatically using C#. +The SfPdfViewerControl is available in the [`Syncfusion.Windows.PdfViewer`](https://help.syncfusion.com/cr/UWP/Syncfusion.Windows.PdfViewer.html) namespace and can be created using XAML or programmatically using C#. -1. Add the Syncfusion PdfViewer namespace +1. Add the Syncfusion PDF Viewer namespace. {% tabs %} {% highlight xaml tabtitle="MainPage.xaml" %} xmlns:syncfusion="using:Syncfusion.Windows.PdfViewer" @@ -131,6 +135,7 @@ After adding the `SfPdfViewerControl`, you can load a PDF document using data bi 2. Create a simple class (`PdfReport.cs`) that provides the PDF stream. +N> Replace `PdfViewerExample` in the manifest resource path below with your project's default namespace. {% tabs %} {% highlight c# tabtitle="PdfReport.cs" %} @@ -245,4 +250,6 @@ Press Ctrl+F5 (Windows) or +F5 (m - [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) - [UWP PDF Viewer Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/overview) - [Magnification](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-magnification) +- [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-page-navigation) +- [Text Search](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-text-search) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md b/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md index 4dda7479f4..8350a61188 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md @@ -7,11 +7,13 @@ control: PDF viewer documentation: ug --- -# Customize the scrollbar in UWP PDF Viewer +# Customize the Scrollbar in UWP PDF Viewer + +This section explains how to customize the scrollbar appearance and width in the SfPdfViewer control. ## Customize the color of the scrollbar thumb -The PDF viewer uses the [ScrollViewer] (https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-19041) control to scroll the pages of a PDF. The color of the vertical and horizontal scrollbar thumbs can be customized using the following code. +The PDF Viewer uses the [`ScrollViewer`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-19041) control to scroll the pages of a PDF. The color of the vertical and horizontal scrollbar thumbs can be customized using the following code. {% tabs %} {% highlight xaml %} @@ -28,14 +30,14 @@ The PDF viewer uses the [ScrollViewer] (https://docs.microsoft.com/en-us/uwp/api ## Customize the width of the vertical scrollbar -The width of the vertical scrollbar of the [ScrollViewer](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) can be modified by using the [VerticalScrollBarWidth](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_VerticalScrollBarWidth) property. The default value of the API is as same as the default width of the vertical scrollbar of the [ScrollViewer](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) control. +The width of the vertical scrollbar of the [`ScrollViewer`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) can be modified by using the [`VerticalScrollBarWidth`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_VerticalScrollBarWidth) property. The default value of this property matches the default width of the vertical scrollbar of the [`ScrollViewer`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) control. {% tabs %} {% highlight c# %} -//Sets the width of the vertical scrollbar in the PDF Viewer. -pdfViewerControl.VerticalScrollBarWidth = 100; -//Gets the width of the vertical scrollbar in the PDF Viewer. +// Sets the width of the vertical scrollbar in the PDF Viewer. +pdfViewerControl.VerticalScrollBarWidth = 100; +// Gets the width of the vertical scrollbar in the PDF Viewer. double verticalScrollBarWidth = pdfViewerControl.VerticalScrollBarWidth; {% endhighlight %} diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md b/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md index 92c2810dcd..753e2303d6 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md @@ -9,7 +9,7 @@ documentation: ug # UWP PDF Viewer (SfPdfViewer) Overview -The [PDF viewer](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) for Universal Windows Platform is a native control for viewing and printing PDF documents. The control internally makes use of the Windows rendering engine (Windows.Data.Pdf) for rendering the pages of the PDF document. +The [PDF viewer](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) for Universal Windows Platform is a native control for viewing and printing PDF documents. The control uses the Windows rendering engine (`Windows.Data.Pdf`) to render the pages of the PDF document. ## In This Section From 67509ee57cee42f3ee6835509f037075d53aa98a Mon Sep 17 00:00:00 2001 From: Silambharasan K Date: Tue, 14 Jul 2026 13:47:11 +0530 Subject: [PATCH 3/8] Addressed feedbacks --- .../PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md | 2 +- Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md index 475ef823ae..ae20d2ba8d 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md @@ -9,7 +9,7 @@ documentation: ug # Hyperlink in UWP PDF Viewer (SfPdfViewer) -The PdfViewer control supports hyperlink navigation that detects document links and web links present in the PDF document pages. Tapping a table of contents (TOC) entry or hyperlink behaves as follows: +The PDF Viewer control supports hyperlink navigation that detects document links and web links present in the PDF document pages. Tapping a table of contents (TOC) entry or hyperlink behaves as follows: 1) If the tapped text contains a web link, the URI associated with the hyperlink is opened in the default browser. diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md index bc70d6b7cd..9660fb0ca8 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md @@ -81,8 +81,6 @@ This co-location matters only if you move assemblies out of their installed loca {% endtabcontents %} -## Licensing - N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to register the Syncfusion® license key in your UWP application to use our components. ## Add UWP PDF Viewer component From db2c16b279b8120f1805d1aacfe4596a48519709 Mon Sep 17 00:00:00 2001 From: Silambharasan K Date: Tue, 14 Jul 2026 13:53:37 +0530 Subject: [PATCH 4/8] Addressed feedbacks --- Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md index 9660fb0ca8..0e5ce48b6e 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md @@ -77,12 +77,12 @@ The assemblies do not all have to be in a single folder. Each assembly may live This co-location matters only if you move assemblies out of their installed location. If you relocate an assembly, be sure to move its resource files with it and place them in the same folder as that assembly. +N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to register the Syncfusion® license key in your UWP application to use our components. + {% endtabcontent %} {% endtabcontents %} -N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to register the Syncfusion® license key in your UWP application to use our components. - ## Add UWP PDF Viewer component UWP PDF Viewer control can be added to an application either through the designer (XAML) or programmatically using code. Use the **Via Designer** tab if you prefer a drag-and-drop workflow; use the **Via Coding** tab if you want to add the control directly in XAML or C#. From 49ca96feee4e060d7aacaacea5e0070a6a9f1f2f Mon Sep 17 00:00:00 2001 From: Silambharasan K Date: Mon, 13 Jul 2026 11:06:24 +0530 Subject: [PATCH 5/8] Task(1040469): Need to improve UG documentation for UWP PDFViewer using code studio AI tools --- .../Bookmark-navigation.md | 10 +++-- .../Creating-custom-toolbar.md | 16 +++---- .../uwp/Concepts-and-Features/Hyperlink.md | 39 ++++++++-------- .../uwp/Concepts-and-Features/Printing-PDF.md | 44 ++++++++++--------- .../Working-with-annotations.md | 14 +++--- .../Working-with-text-search.md | 26 ++++++----- .../PDF/PDF-Viewer/uwp/Getting-Started.md | 33 ++++++++------ .../uwp/How-to/Customize-the-scrollbar.md | 14 +++--- .../PDF/PDF-Viewer/uwp/Overview.md | 2 +- 9 files changed, 106 insertions(+), 92 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md index eb2d22607a..175ecd81c2 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Bookmark-navigation.md @@ -7,9 +7,9 @@ control: SfPdfViewerControl documentation: ug --- -# Bookmark navigation in UWP PDF Viewer (SfPdfViewer) +# Bookmark Navigation in UWP PDF Viewer (SfPdfViewer) -PDF Viewer allows users to navigate to the bookmarks present in the loaded PDF document. +The SfPdfViewer control allows users to navigate to the bookmarks present in the loaded PDF document. This section covers programmatic navigation using the `GoToBookmark` method. ## Programmatically navigate to a bookmark destination @@ -24,13 +24,15 @@ PdfLoadedDocument loadedDocument = new PdfLoadedDocument(documentStream); //Retrieves the bookmark collection from the loaded PDF document PdfBookmarkBase bookmark = loadedDocument.Bookmarks; -//Navigate to the specified bookmark destination offset +//Navigates to the specified bookmark destination pdfViewerControl.GoToBookmark(bookmark[0]); {% endhighlight %} {% endtabs %} ## See Also +- [UWP PDF Viewer Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/overview) - [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-page-navigation) - [Hyperlink](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/hyperlink) -- [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) \ No newline at end of file +- [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) +- [GoToBookmark API Reference](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md index 5ea10fee45..82400b464c 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Creating-custom-toolbar.md @@ -9,33 +9,33 @@ documentation: ug # Creating a custom toolbar in UWP PDF Viewer (SfPdfViewer) -PdfViewer does not have a toolbar by default. But a custom toolbar can be designed at the sample with its buttons wired to the PdfViewer APIs. +The SfPdfViewer control does not include a built-in toolbar by default; however, a custom toolbar can be designed at the application level, with its buttons wired to the SfPdfViewer APIs. ## Creating separate UIs for desktop and mobile -Create a new UWP project (the name "PdfViewerCustomToolbar" is used here). It will by default have a MainPage.xaml file, a MainPage.xaml.cs file. Create a new folder in the project with name "DeviceFamily-Mobile" and create another XAML file with the same name MainPage.xaml in this folder. Open this file and set the class property to MainPage.xaml.cs. +Create a new UWP project (the name "PdfViewerCustomToolbar" is used here). By default, the project will contain a `MainPage.xaml` file and a `MainPage.xaml.cs` code-behind file. Create a new folder in the project with the name "DeviceFamily-Mobile", and create another XAML file named `MainPage.xaml` in this folder. Open this file and set the `x:Class` attribute to `MainPage.xaml.cs`. {% tabs %} {% highlight xaml %} -x:Class="PdfViewerCustomToolbar.MainPage"; +x:Class="PdfViewerCustomToolbar.MainPage" {% endhighlight %} {% endtabs %} -Make sure that both the xaml files are in the same namespace "PdfViewerCustomToolbar" +Make sure that both XAML files are in the same namespace, "PdfViewerCustomToolbar". {%tabs%} {%highlight xaml%} -xmlns:local="using:PdfViewerCustomToolbar"; +xmlns:local="using:PdfViewerCustomToolbar" {%endhighlight%} {%endtabs%} -The reason for two XAML files is that same UI design cannot be used for both desktop and mobile. So, one XAML file is used for desktop UI and the other is for mobile UI. The MainPage.xaml.cs file serve as the common code behind for both XAML pages. +Two XAML files are used because the same UI design cannot be shared between desktop and mobile. One XAML file is used for the desktop UI, while the other is used for the mobile UI. The `MainPage.xaml.cs` file serves as the common code-behind for both XAML pages. -In the constructor of MainPage set the DataContext to PdfViewer. +In the constructor of `MainPage`, set the `DataContext` to the SfPdfViewer instance. {%tabs%} {%highlight c#%} @@ -45,7 +45,7 @@ this.DataContext = pdfViewer; {%endhighlight%} {%endtabs%} -The UI design of the application for desktop and mobile is illustrated in the following documentation pages. The link to the common sample can be found at the ends of both the documentation pages. +The UI design of the application for desktop and mobile is illustrated in the following documentation pages. The link to the common sample can be found at the end of each documentation page. 1. [Desktop design](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/ui-design-for-desktop) 2. [Mobile design](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/ui-design-for-mobile) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md index a1d72a5939..475ef823ae 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md @@ -9,15 +9,15 @@ documentation: ug # Hyperlink in UWP PDF Viewer (SfPdfViewer) -PDF Viewer supports hyperlink navigation which detects document link and web link present in the pages of the PDF document. Tapping on the TOC and hyperlink will behave in the following manner. +The PdfViewer control supports hyperlink navigation that detects document links and web links present in the PDF document pages. Tapping a table of contents (TOC) entry or hyperlink behaves as follows: -1) If the tapped text contains web link, then the URI associated with the hyperlink will be opened in the default browser. +1) If the tapped text contains a web link, the URI associated with the hyperlink is opened in the default browser. -2) If the tapped text contains document link, then the PDF Viewer navigates to the destination page index which is associated with it. +2) If the tapped text contains a document link, the PDF Viewer navigates to the associated destination page index. ## How to disable hyperlink navigation in PDF document using PDF Viewer control? -You can disable the hyperlink navigation by setting the “AllowHyperlinkNavigation” property of PDF Viewer to false. By default, hyperlink navigation will be enabled in PDF Viewer. +You can disable hyperlink navigation by setting the `AllowHyperlinkNavigation` property of the PDF Viewer to `false`. By default, hyperlink navigation is enabled in the PDF Viewer. {% tabs %} {% highlight xaml %} @@ -29,7 +29,7 @@ You can disable the hyperlink navigation by setting the “AllowHyperlinkNavigat ## How to acquire the properties of clicked URI from PDF Viewer? -You can acquire the details of the hyperlink that is tapped in the PDF Viewer control from the HyperlinkEventArgs of HyperlinkPointerPressed event. Refer to the following code example for more details. +You can acquire the details of the hyperlink that is tapped in the PDF Viewer control from the `HyperlinkEventArgs` of the `HyperlinkPointerPressed` event. Refer to the following code example for more details. {% tabs %} {% highlight xaml %} @@ -44,7 +44,7 @@ You can acquire the details of the hyperlink that is tapped in the PDF Viewer co public void pdfViewerControl_HyperlinkPointerPressed(object sender,HyperlinkEventArgs args) { - // Gets or sets a value indicating whether the hyperlink navigation was handled. + // Gets or sets a value indicating whether the hyperlink navigation was handled. args.Handled = false; // Gets the hyperlink being clicked. @@ -53,15 +53,14 @@ You can acquire the details of the hyperlink that is tapped in the PDF Viewer co // Gets the current page index of the hyperlink. int pageIndex = args.PageIndex; - //Gets the destination page index of the hyperlink. + // Gets the destination page index of the hyperlink. int destinationPageIndex = args.DestinationPageIndex; - //Gets the bounds of the hyperlink is being clicked. + // Gets the bounds of the hyperlink being clicked. RectangleF hyperlinkBound = args.Bounds; - //Gets the whether the tapped hyper link is a Web Link or Document Link. - HyperlinkType linkType = args.HyperlinkType - + // Gets whether the tapped hyperlink is a Web Link or Document Link. + HyperlinkType linkType = args.HyperlinkType; } @@ -70,7 +69,7 @@ You can acquire the details of the hyperlink that is tapped in the PDF Viewer co ## How to detect whether the mouse pointer is over the hyperlink text? -The event `HyperlinkPointerMoved` will be raised when the mouse pointer is moved over the hyperlink text. Refer to the following code example for more details. +The `HyperlinkPointerMoved` event is raised when the mouse pointer is moved over the hyperlink text. Refer to the following code example for more details. {% tabs %} {% highlight xaml %} @@ -85,19 +84,19 @@ The event `HyperlinkPointerMoved` will be raised when the mouse pointer is moved public void pdfViewerControl_HyperlinkPointerMoved(object sender,HyperlinkEventArgs args) { - // Gets or sets a value indicating whether the hyperlink navigation was handled. + // Gets or sets a value indicating whether the hyperlink navigation was handled. args.Handled = false; - // Gets the hyperlink being clicked. + // Gets the hyperlink under the pointer. string uri = args.URI; // Gets the current page index of the hyperlink. int pageIndex = args.PageIndex; - //Gets the destination page index of the hyperlink. + // Gets the destination page index of the hyperlink. int destinationPageIndex = args.DestinationPageIndex; - //Gets the bounds of the hyperlink is being clicked. + // Gets the bounds of the hyperlink under the pointer. RectangleF hyperlinkBound = args.Bounds; //Gets the whether the tapped hyper link is a Web Link or Document Link. @@ -110,21 +109,21 @@ The event `HyperlinkPointerMoved` will be raised when the mouse pointer is moved ## How to restrict the URI navigation from the PDF Viewer? -By default, web link or document link navigation is performed on tapping the hyperlink text. This navigation can be restricted using the property 'Handled' of the `HyperlinkEventArgs`. Refer to the following code snippet for more details. +By default, web link or document link navigation is performed on tapping the hyperlink text. This navigation can be restricted using the `Handled` property of the `HyperlinkEventArgs`. Refer to the following code snippet for more details. {% tabs %} {% highlight c# %} public void pdfViewerControl_HyperlinkPointerPressed(object sender,HyperlinkEventArgs args) { - // Setting the property to true will restrict the URI navigation inside the PDF Viewer control. In default, the value is false. - args.Handled = false; + // Setting the property to true will restrict the URI navigation inside the PDF Viewer control. By default, the value is false. + args.Handled = true; } {% endhighlight %} {% endtabs %} ## See Also -- [Bookmark](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/bookmark-navigation) +- [Bookmark Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/bookmark-navigation) - [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) - [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-page-navigation) \ No newline at end of file diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md index 718243b1a3..5bb717e661 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Printing-PDF.md @@ -9,9 +9,9 @@ documentation: ug # Printing PDF in UWP PDF Viewer (SfPdfViewer) -Printing can be done using the Print method or by using the Print command. +Printing can be done using the `Print` method or by using the `PrintCommand`. This section covers synchronous printing, asynchronous printing with cancellation, exception handling, quality factor configuration, and print preview customization. -The following code shows how to perform the print operation using Print method. Here 'buffer' is the byte array read from the PDF file either using FileOpenPicker or from Assets folder, as illustrated in the [Viewing PDF](https://help.syncfusion.com/uwp/pdf-viewer/concepts-and-features/viewing-pdf) section. +The following code shows how to perform the print operation using the `Print` method. Here, `buffer` is the byte array read from the PDF file either using `FileOpenPicker` or from the Assets folder, as illustrated in the [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) section. {% tabs %} {% highlight c# %} @@ -40,7 +40,7 @@ End Sub {% endhighlight %} {% endtabs %} -The following code shows how to bind the PrintCommand to a Button +The following code shows how to bind the `PrintCommand` to a Button. {% tabs %} {% highlight xaml %} @@ -58,17 +58,17 @@ The PDF Viewer allows you to print the PDF document asynchronously using the `Pr {% tabs %} {% highlight c# %} -//Asynchronously prints the document loaded in the PDF viewer +// Asynchronously prints the document loaded in the PDF viewer. pdfViewer.PrintAsync(cancellationTokenSource); {% endhighlight %} {% endtabs %} -In the above code sample, the `cancellationTokenSource` enables you to cancel the asynchronous printing when it is in progress +In the above code sample, the `cancellationTokenSource` enables you to cancel the asynchronous printing when it is in progress. ### Cancel the asynchronous PDF printing -You can raise the cancel request when printing is in progress +You can raise the cancel request when printing is in progress. {% tabs %} {% highlight c# %} @@ -81,13 +81,13 @@ private void cancelButton_Clicked(object sender, EventArgs e) {% endhighlight %} {% endtabs %} - In the above code sample, the cancellationTokenSource instance is the same as the one given as the argument when printing the PDF document asynchronously. + In the above code sample, the `cancellationTokenSource` instance is the same as the one given as the argument when printing the PDF document asynchronously. - N> Calling the above method will not have any effect once the printing is complete. It will stop the printing process only when it is in progress. + N> Calling this method has no effect once printing is complete. It stops the printing process only when it is in progress. ### Handling exceptions while performing the asynchronous print -When the `PrintAsync` is called, the PDF Viewer will show the print previewer. Exceptions will be thrown if the print cannot be performed. The exceptions will be propagated back to the caller of this method. We recommend catching these exceptions as follows. +When the `PrintAsync` method is called, the PDF Viewer will show the print previewer. Exceptions will be thrown if the print cannot be performed. The exceptions will be propagated back to the caller of this method. Catch these exceptions as follows. {% tabs %} {% highlight c# %} @@ -97,13 +97,13 @@ When the `PrintAsync` is called, the PDF Viewer will show the print previewer. E try { - //Sets the name of the printed document. - pdfViewer.PrinterSettings.DocumentName = “PdfFileName.pdf”; + // Sets the name of the printed document. + pdfViewer.PrinterSettings.DocumentName = "PdfFileName.pdf"; - //Asynchronously prints the document loaded in the PDF viewer - await pdfViewerControl.PrintAsync(cancellationToken); + // Asynchronously prints the document loaded in the PDF viewer. + await pdfViewer.PrintAsync(cancellationToken); } - catch (Exception e) + catch (Exception ex) { ContentDialog printErrorDialog = new ContentDialog() { @@ -126,23 +126,25 @@ N> The [`SfPdfViewer`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.Pdf The PDF Viewer allows the user to set and retrieve the quality factor for print by using the [`QualityFactor`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.PrinterSettings.html#Syncfusion_Windows_PdfViewer_PrinterSettings_QualityFactor) property. The default value of this API is set to 1, and the values are restricted between 1 and 5. The values falling below the range are taken as 1, which represents the lowest page quality, and those above the range are taken as 5, which represents the highest page quality. Refer to the following code sample to set the quality factor for the print. +{% tabs %} {% highlight c# %} -//Sets the quality factor for the print. +// Sets the quality factor for the print. pdfViewer.PrinterSettings.QualityFactor = 2; {% endhighlight %} +{% endtabs %} N> Printing with quality factors higher than 2 will work as expected in the x64 configuration but may cause `System.OutOfMemoryException` in the x86 configuration due to the limited memory capacity of this architecture. ## Customizing the print previewer -You can customize the print options displayed in the print previewer while performing a print operation in the PDF Viewer control. The event `PrintTaskRequested` will be raised when you call the Print method to print a PDF document. +You can customize the print options displayed in the print previewer while performing a print operation in the PDF Viewer control. The `PrintTaskRequested` event will be raised when you call the `Print` method to print a PDF document. {% tabs %} {% highlight c# %} -//Wire up the PrintTaskRequested event with the PdfViewer_PrintTaskRequested +// Wire up the PrintTaskRequested event with the PdfViewer_PrintTaskRequested. pdfViewer.PrintTaskRequested += PdfViewer_PrintTaskRequested; {% endhighlight %} @@ -157,20 +159,20 @@ private void PdfViewer_PrintTaskRequested(object sender, SfPdfViewerPrintTaskReq { PrintTask printTask = null; - //Create a print task to customize the print options + // Create a print task to customize the print options. printTask = e.Request.CreatePrintTask("Printing", sourceRequested => { PrintTaskOptionDetails printDetailedOptions = PrintTaskOptionDetails.GetFromPrintTaskOptions(printTask.Options); IList displayedOptions = printDetailedOptions.DisplayedOptions; - //Allows to add the required print options + // Allows adding the required print options. displayedOptions.Add(Windows.Graphics.Printing.StandardPrintTaskOptions.CustomPageRanges); printTask.Options.PageRangeOptions.AllowCurrentPage = true; printTask.Options.PageRangeOptions.AllowAllPages = true; printTask.Options.PageRangeOptions.AllowCustomSetOfPages = true; - // Set the pdfViewerControl�s print document source + // Sets the pdfViewerControl's print document source. sourceRequested.SetSource(e.PrintDocumentSource); e.PrintTask = printTask; @@ -204,7 +206,7 @@ pdfViewerControl.PrintTaskRequested+= PrintTaskRequested; {% endhighlight %} {% endtabs %} -N>Though if you specify any print options to be displayed, only those that are supported by the selected printer are shown in the print preview UI. The print UI won't show options that the selected printer doesn't support. The print options will appear in the order in which they are added. +N> Even if you specify print options to be displayed, only those supported by the selected printer are shown in the print preview UI. The print UI will not show options that the selected printer does not support. Print options will appear in the order in which they are added. ## See Also - [Export Pages](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/exporting-pages-as-image) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md index 3174881c70..92d7ef69c0 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-annotations.md @@ -7,7 +7,7 @@ control: PDF viewer documentation: ug --- -# Working with annotations in UWP PDF Viewer +# Working with Annotations in UWP PDF Viewer PDF Viewer allows user to include annotations in PDF files and provides options to modify or remove the existing annotations. The supported annotations are below. @@ -32,9 +32,9 @@ PDF viewer provides the following events. 5. AnnotationRemoved 6. AnnotationMovedOrResized -The properties of the annotation involved in the event can be obtained from the `AnnotationProperties` property of the event args parameter of each event except AnnotationMovedOrResized. Since the annotation properties are obtained from the same `AnnotationProperties` instance for all events except AnnotationMovedOrResized, only the AnnotationAdded event is illustrated below. +The properties of the annotation involved in an event can be obtained from the `AnnotationProperties` property of the event args parameter. This pattern is shared by all events except `AnnotationMovedOrResized`, so only the `AnnotationAdded` event is illustrated below. -The properties of the included annotation can be obtained by casting the `AnnotationAddedEventArgs` parameter's AnnotationProperties property to the property of corresponding annotation type. +To obtain properties for a specific annotation type, cast `AnnotationProperties` to the corresponding type (for example, `TextMarkupProperties`). {% highlight c# %} @@ -93,7 +93,7 @@ private void PdfViewer_AnnotationAdded(object sender, AnnotationMovedOrResizedEv ## Enable and disable selection of annotations -By default, PdfViewer allows the user to select the annotations by tapping on it, this action is followed by the appearance of the selector around the selected annotation. The selection of annotations can be disabled by setting `IsReadOnly` property of `AnnotationSettings` class to true. The default value of this API will be false. +By default, the SfPdfViewer control allows users to select annotations by tapping on them, and a selector appears around the selected annotation. The selection of annotations can be disabled by setting the `IsReadOnly` property of the `AnnotationSettings` class to `true`. The default value of this property is `false`. {% highlight c# %} @@ -128,7 +128,7 @@ The PDF viewer supports removing a single annotation and all the annotations in ### Remove a selected annotation -The following code snippet illustrates removing a selected annotation from the PDF document. +The following code snippet removes a selected annotation from the PDF document. {% tabs %} {% highlight xaml %} @@ -158,7 +158,7 @@ private void deleteAnnotationButton_clicked(object sender, RoutedEventArgs e) ### Remove all annotations -The following code snippet illustrates removing all annotations from the PDF. +The following code snippet removes all annotations from the PDF. {% highlight c# %} @@ -179,7 +179,7 @@ var annotations = pdfViewer.AnnotationCollection; ## How to show or hide the annotations present in the PDF? -Use the [`AnnotationVisibility`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_AnnotationVisibility) property to change the visibility of the annotations present in a PDF document. By default, the visibility of the annotation is `Visibility.Visible`. +Use the [`AnnotationVisibility`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_AnnotationVisibility) property to change the visibility of the annotations present in a PDF document. By default, the visibility of annotations is `Visibility.Visible`. {% highlight c# %} diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md index d1add11d73..cf7e7bf768 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Working-with-text-search.md @@ -13,7 +13,7 @@ Text search can be done in two ways, by using the SearchText method or by using In all code snippets found below, 'buffer' is the byte array read from the PDF file either using FileOpenPicker or from Assets folder, as illustrated in the [Viewing PDF](https://help.syncfusion.com/uwp/pdf-viewer/concepts-and-features/viewing-pdf) section. -**Using search methods** +## Using Search Methods The following code shows how to initiate the text search using the method. {% tabs %} @@ -26,7 +26,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchText("the"); } {% endhighlight %} @@ -53,7 +53,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchNextText("the"); } {% endhighlight %} @@ -80,7 +80,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void Button_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchPrevText("the"); } {% endhighlight %} @@ -97,9 +97,9 @@ End Sub {% endhighlight %} {% endtabs %} -**Using search commands** +## Using Search Commands -The following code shows how to search for the next instance using SearchNextCommand. +The following code shows how to search for the next instance using `SearchNextCommand`. {% tabs %} {% highlight xaml %} @@ -109,17 +109,19 @@ The following code shows how to search for the next instance using SearchNextCom {% endhighlight %} {% endtabs %} -The following code shows how to search for the previous instance using SearchPreviousCommand. + +The following code shows how to search for the previous instance using `SearchPreviousCommand`. + {% tabs %} {% highlight xaml %} - + {% endhighlight %} {% endtabs %} -**Using asynchronous search methods** +## Using Asynchronous Search Methods The PDF viewer allows the users to perform text search asynchronously using the [SearchTextAsync](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_SearchTextAsync_System_String_System_Threading_CancellationToken_) method. The user can also cancel the asynchronous text search when it is in progress. @@ -135,7 +137,7 @@ private void Page_Loaded(object sender, RoutedEventArgs e) private void SearchButton_Click(object sender, RoutedEventArgs e) { - //Searches for the text in the PDF Document. + // Searches for the text in the PDF document. pdfViewer.SearchTextAsync(targetText, cts.Token); } @@ -158,7 +160,7 @@ CancellationTokenSource cts = new CancellationTokenSource(); private void SearchNextButton_Click(object sender, RoutedEventArgs e) { - //Searches for the next text instance in the PDF Document. + // Searches for the next text instance in the PDF document. pdfViewer.SearchNextTextAsync(targetText, cts.Token); } @@ -179,7 +181,7 @@ CancellationTokenSource cts = new CancellationTokenSource(); private void SearchPreviousButton_Click(object sender, RoutedEventArgs e) { - //Searches for the previous instance of the text in the PDF Document. + // Searches for the previous instance of the text in the PDF document. pdfViewer.SearchPreviousTextAsync(targetText, cts.Token); } diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md index 8fc9a60c41..bc70d6b7cd 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md @@ -19,14 +19,14 @@ You can create a **UWP Application** using Visual Studio via [Microsoft Template ## Assemblies Deployment -You can add a UWP PdfViewer component to your application by installing it via NuGet packages (recommended) or by manually adding the required assemblies to the project. +You can add a UWP PDF Viewer component to your application by installing it via NuGet packages (recommended) or by manually adding the required assemblies to the project. {% tabcontents %} {% tabcontent NuGet Package %} -### Install Syncfusion® UWP PdfViewer NuGet Package +### Install Syncfusion® UWP PDF Viewer NuGet Package -To add **UWP PdfViewer** component in the application, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install: +To add the **UWP PDF Viewer** component in the application, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install: • [Syncfusion.SfPdfViewer.UWP](https://www.nuget.org/packages/Syncfusion.SfPdfViewer.UWP) @@ -34,9 +34,9 @@ To add **UWP PdfViewer** component in the application, open the NuGet package ma {% tabcontent Assemblies (.dll) %} -### Add Syncfusion® UWP PdfViewer Assemblies +### Add Syncfusion® UWP PDF Viewer Assemblies -Below table describes, list of assemblies required to be added in project when the UWP PdfViewer control is used in your application. +The following table lists the assemblies required when the UWP PDF Viewer control is used in your application. @@ -69,21 +69,25 @@ Below table describes, list of assemblies required to be added in project when t
-Each assembly must be placed together with its corresponding resource files (i.e., the resource files for an assembly should reside in the same folder as that assembly). The assemblies do not all have to be in a single folder — each assembly may live in its own folder so long as its resource files are kept alongside it. The screenshot shows only the SfPdfViewer assembly for brevity. +Each assembly must be placed together with its corresponding resource files; that is, the resource files for an assembly should reside in the same folder as that assembly. + +The assemblies do not all have to be in a single folder. Each assembly may live in its own folder, as long as its resource files are kept alongside it. The screenshot shows only the SfPdfViewer assembly for brevity. ![Dependent assemblies needed for SfPdfViewerControl](Getting-Started_images/Getting-Started_img3.jpeg) This co-location matters only if you move assemblies out of their installed location. If you relocate an assembly, be sure to move its resource files with it and place them in the same folder as that assembly. -N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion® license key in your UWP application to use our components. - {% endtabcontent %} {% endtabcontents %} -## Add UWP PdfViewer component +## Licensing + +N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to register the Syncfusion® license key in your UWP application to use our components. + +## Add UWP PDF Viewer component -UWP PdfViewer control can be added to an application either through the designer (XAML) or programmatically using code. +UWP PDF Viewer control can be added to an application either through the designer (XAML) or programmatically using code. Use the **Via Designer** tab if you prefer a drag-and-drop workflow; use the **Via Coding** tab if you want to add the control directly in XAML or C#. {% tabcontents %} @@ -95,7 +99,7 @@ UWP PdfViewer control can be added to an application either through the designer ![SfPdfViewerControl in visual studio toolbox](Getting-Started_images/Getting-Started_img1.jpeg) -3. Drag `SfPdfViewerControl`(https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) and drop in to the Designer area from the Toolbox. +3. Drag the [`SfPdfViewerControl`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) and drop it into the Designer area from the Toolbox. When you drag the SfPdfViewerControl toolbox item to the window, it automatically adds the required assembly references to the current application. @@ -103,9 +107,9 @@ When you drag the SfPdfViewerControl toolbox item to the window, it automaticall {% tabcontent Via Coding %} -The SfPdfViewerControl is available in the following namespace [_Syncfusion.Windows.PdfViewer_](https://help.syncfusion.com/cr/UWP/Syncfusion.Windows.PdfViewer.html) and it can be created using XAML or programmatically using C#. +The SfPdfViewerControl is available in the [`Syncfusion.Windows.PdfViewer`](https://help.syncfusion.com/cr/UWP/Syncfusion.Windows.PdfViewer.html) namespace and can be created using XAML or programmatically using C#. -1. Add the Syncfusion PdfViewer namespace +1. Add the Syncfusion PDF Viewer namespace. {% tabs %} {% highlight xaml tabtitle="MainPage.xaml" %} xmlns:syncfusion="using:Syncfusion.Windows.PdfViewer" @@ -131,6 +135,7 @@ After adding the `SfPdfViewerControl`, you can load a PDF document using data bi 2. Create a simple class (`PdfReport.cs`) that provides the PDF stream. +N> Replace `PdfViewerExample` in the manifest resource path below with your project's default namespace. {% tabs %} {% highlight c# tabtitle="PdfReport.cs" %} @@ -245,4 +250,6 @@ Press Ctrl+F5 (Windows) or +F5 (m - [Viewing PDF](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/viewing-pdf) - [UWP PDF Viewer Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/overview) - [Magnification](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-magnification) +- [Page Navigation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-page-navigation) +- [Text Search](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/uwp/concepts-and-features/working-with-text-search) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md b/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md index 4dda7479f4..8350a61188 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/How-to/Customize-the-scrollbar.md @@ -7,11 +7,13 @@ control: PDF viewer documentation: ug --- -# Customize the scrollbar in UWP PDF Viewer +# Customize the Scrollbar in UWP PDF Viewer + +This section explains how to customize the scrollbar appearance and width in the SfPdfViewer control. ## Customize the color of the scrollbar thumb -The PDF viewer uses the [ScrollViewer] (https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-19041) control to scroll the pages of a PDF. The color of the vertical and horizontal scrollbar thumbs can be customized using the following code. +The PDF Viewer uses the [`ScrollViewer`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-19041) control to scroll the pages of a PDF. The color of the vertical and horizontal scrollbar thumbs can be customized using the following code. {% tabs %} {% highlight xaml %} @@ -28,14 +30,14 @@ The PDF viewer uses the [ScrollViewer] (https://docs.microsoft.com/en-us/uwp/api ## Customize the width of the vertical scrollbar -The width of the vertical scrollbar of the [ScrollViewer](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) can be modified by using the [VerticalScrollBarWidth](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_VerticalScrollBarWidth) property. The default value of the API is as same as the default width of the vertical scrollbar of the [ScrollViewer](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) control. +The width of the vertical scrollbar of the [`ScrollViewer`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) can be modified by using the [`VerticalScrollBarWidth`](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html#Syncfusion_Windows_PdfViewer_SfPdfViewerControl_VerticalScrollBarWidth) property. The default value of this property matches the default width of the vertical scrollbar of the [`ScrollViewer`](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.scrollviewer?view=winrt-20348) control. {% tabs %} {% highlight c# %} -//Sets the width of the vertical scrollbar in the PDF Viewer. -pdfViewerControl.VerticalScrollBarWidth = 100; -//Gets the width of the vertical scrollbar in the PDF Viewer. +// Sets the width of the vertical scrollbar in the PDF Viewer. +pdfViewerControl.VerticalScrollBarWidth = 100; +// Gets the width of the vertical scrollbar in the PDF Viewer. double verticalScrollBarWidth = pdfViewerControl.VerticalScrollBarWidth; {% endhighlight %} diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md b/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md index 92c2810dcd..753e2303d6 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Overview.md @@ -9,7 +9,7 @@ documentation: ug # UWP PDF Viewer (SfPdfViewer) Overview -The [PDF viewer](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) for Universal Windows Platform is a native control for viewing and printing PDF documents. The control internally makes use of the Windows rendering engine (Windows.Data.Pdf) for rendering the pages of the PDF document. +The [PDF viewer](https://help.syncfusion.com/cr/uwp/Syncfusion.Windows.PdfViewer.SfPdfViewerControl.html) for Universal Windows Platform is a native control for viewing and printing PDF documents. The control uses the Windows rendering engine (`Windows.Data.Pdf`) to render the pages of the PDF document. ## In This Section From 12f0bcd3f133f8228221e9b6039dff8760224948 Mon Sep 17 00:00:00 2001 From: Silambharasan K Date: Tue, 14 Jul 2026 13:47:11 +0530 Subject: [PATCH 6/8] Addressed feedbacks --- .../PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md | 2 +- Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md index 475ef823ae..ae20d2ba8d 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Concepts-and-Features/Hyperlink.md @@ -9,7 +9,7 @@ documentation: ug # Hyperlink in UWP PDF Viewer (SfPdfViewer) -The PdfViewer control supports hyperlink navigation that detects document links and web links present in the PDF document pages. Tapping a table of contents (TOC) entry or hyperlink behaves as follows: +The PDF Viewer control supports hyperlink navigation that detects document links and web links present in the PDF document pages. Tapping a table of contents (TOC) entry or hyperlink behaves as follows: 1) If the tapped text contains a web link, the URI associated with the hyperlink is opened in the default browser. diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md index bc70d6b7cd..9660fb0ca8 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md @@ -81,8 +81,6 @@ This co-location matters only if you move assemblies out of their installed loca {% endtabcontents %} -## Licensing - N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to register the Syncfusion® license key in your UWP application to use our components. ## Add UWP PDF Viewer component From d1c715b0d2588a551d7695da005de9f76026209f Mon Sep 17 00:00:00 2001 From: Silambharasan K Date: Tue, 14 Jul 2026 13:53:37 +0530 Subject: [PATCH 7/8] Addressed feedbacks --- Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md index 9660fb0ca8..0e5ce48b6e 100644 --- a/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md +++ b/Document-Processing/PDF/PDF-Viewer/uwp/Getting-Started.md @@ -77,12 +77,12 @@ The assemblies do not all have to be in a single folder. Each assembly may live This co-location matters only if you move assemblies out of their installed location. If you relocate an assembly, be sure to move its resource files with it and place them in the same folder as that assembly. +N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to register the Syncfusion® license key in your UWP application to use our components. + {% endtabcontent %} {% endtabcontents %} -N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to register the Syncfusion® license key in your UWP application to use our components. - ## Add UWP PDF Viewer component UWP PDF Viewer control can be added to an application either through the designer (XAML) or programmatically using code. Use the **Via Designer** tab if you prefer a drag-and-drop workflow; use the **Via Coding** tab if you want to add the control directly in XAML or C#. From 7686571a141389033e731eb2fb19d44a5ab368d1 Mon Sep 17 00:00:00 2001 From: Silambharasan K Date: Thu, 16 Jul 2026 12:39:10 +0530 Subject: [PATCH 8/8] Updated proper image for Coordinates-Conversion.md --- .../PDF/PDF-Viewer/maui/Coordinates-Conversion.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/maui/Coordinates-Conversion.md b/Document-Processing/PDF/PDF-Viewer/maui/Coordinates-Conversion.md index dc38f98042..c47c4d6059 100644 --- a/Document-Processing/PDF/PDF-Viewer/maui/Coordinates-Conversion.md +++ b/Document-Processing/PDF/PDF-Viewer/maui/Coordinates-Conversion.md @@ -16,7 +16,7 @@ PDF Viewer allows users to obtain the PDF page coordinates relative to the PDF V The [ClientRectangle](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_ClientRectangle) in the MAUI PdfViewer control is a rectangular area that represents the dimensions of the client area or viewport. The client area denotes the visible portion of the PDF document within the control. In the MAUI PDF Viewer, this client rectangle is illustrated by the red rectangle in the following figure. -![Client rectangle in .NET MAUI PDF Viewer](Images\Coordinates-Conversion\Client-Coordinates.png) +![Client rectangle in .NET MAUI PDF Viewer](Images/Coordinates-Conversion/Client-Rectangle.png) The client rectangle can be obtained by the [ClientRectangle](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_ClientRectangle) property of the PDF Viewer. The following code sample explains the same. @@ -31,7 +31,7 @@ Rect clientRectangle = PdfViewer.ClientRectangle; The MAUI PDF Viewer specifies the position of points in the client area (viewport) using client coordinates. The upper-left corner of the client area (viewport) of the control is the origin for client coordinates. The client coordinates in the MAUI PDF Viewer are shown in the following figure. -![Client coordinates in .NET MAUI PDF Viewer](Images\Coordinates-Conversion\Client-Coordinates.png) +![Client coordinates in .NET MAUI PDF Viewer](Images/Coordinates-Conversion/Client-Coordinates.png) ### Get the page number from a client point @@ -57,7 +57,7 @@ private void PdfViewer_Tapped(object sender, GestureEventArgs e) PDF page coordinates are represented in terms of a device-independent coordinate system called user space, which is independent of the output device that will be used for printing or display. The user space coordinates system is initialized to a default state for each page of a PDF document. The length of a unit is 1/72 inch, which is equivalent to one point (pt). As an example, the dimensions of a letter-sized paper in PDF page coordinates are shown in the diagram below. -![Page coordinates in .NET MAUI PDF Viewer](Images\Coordinates-Conversion\Page-Coordinates.png) +![Page coordinates in .NET MAUI PDF Viewer](Images/Coordinates-Conversion/Page-Coordinates.png) ## Scroll coordinates Scroll coordinates in the MAUI PDF Viewer denote pixel-based positions as pages are scrolled. They indicate precise locations within the entire document. The coordinate system originates from the top-left corner of the visible area.