Skip to content

Commit 279e3ec

Browse files
authored
Merge pull request #3567 from syncfusion-content/1039012_Hotfix
Task(1039012): Update WPF PDFViewer Getting started content hotfix
2 parents dd37ab6 + 3546322 commit 279e3ec

75 files changed

Lines changed: 1083 additions & 986 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Document-Processing/PDF/PDF-Viewer/winforms/Bookmark-Navigation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ documentation: ug
1111

1212
[WinForms PDF Viewer](https://www.syncfusion.com/pdf-viewer-sdk/winforms-pdf-viewer) control allows users to navigate to the bookmarks present in the loaded PDF document at the UI level.
1313

14-
## Steps to perform bookmark navigation in PdfViewerControl.
14+
## Steps to perform bookmark navigation in PdfViewerControl
1515

16-
1. Open the bookmarks contained PDF document to enable the bookmark button in [PdfViewerControl](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl.html).
16+
1. Open a PDF document containing bookmarks to enable the bookmark button in [PdfViewerControl](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl.html).
1717
2. Clicking on the bookmark button from the left pane will list the bookmarks present in the PDF document.
1818
3. To jump to a specific section, click its name in the bookmark pane.
19-
4. If the bookmark has some children, you can explore them by clicking on the “+” button to the left of it.
19+
4. If the bookmark has child bookmarks, you can explore them by clicking on the “+” button to the left of it.
2020

2121
![Bookmark Button in WinForms PDF Viewer toolbar](Bookmark_Navigation_images/Bookmark_Navigation_images1.png)
2222

@@ -93,7 +93,7 @@ private void PdfViewer_DocumentLoaded(object sender, EventArgs args)
9393
{% endhighlight %}
9494
{% endtabs %}
9595

96-
N> The sample project to perform the operation is available in the [GitHub](https://github.com/SyncfusionExamples/WinForms-PDFViewer-Examples/tree/master/Bookmarks Navigation/PDFBookmarks).
96+
N> The sample project to perform the operation is available in the [GitHub](https://github.com/SyncfusionExamples/WinForms-PDFViewer-Examples/tree/master/Bookmarks%20Navigation/PDFBookmarks).
9797

9898
## Enabling and disabling bookmark feature
9999

@@ -127,6 +127,6 @@ pdfViewerControl.IsBookmarkEnabled = false
127127
{% endhighlight %}
128128
{% endtabs %}
129129

130-
The following screenshot shown the Bookmark navigation in PDF Viewer.
130+
The following screenshot shows the Bookmark navigation in PDF Viewer.
131131

132132
![Bookmark Navigation](Bookmark_Navigation_images/Bookmark_Navigation_images2.png)

Document-Processing/PDF/PDF-Viewer/winforms/Getting-Started.md

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ You can create a **Windows Forms Application** using Visual Studio via [Microsof
1919

2020
## Assemblies Deployment
2121

22-
To add a WinForms PdfViewer component to your application by installing it via NuGet packages(Recommended) or by manually adding the required assemblies to the project.
22+
To add a WinForms PdfViewer component to your application by installing it via NuGet packages (Recommended) or by manually adding the required assemblies to the project.
2323

2424
{% tabcontents %}
2525
{% tabcontent NuGet Package %}
2626

27-
The [WinForms PDF Viewer](https://www.syncfusion.com/pdf-viewer-sdk/winforms-pdf-viewer) (PdfViewerControl) and dependent assemblies can be found from the below location in your machine.
27+
The [WinForms PDF Viewer](https://www.syncfusion.com/pdf-viewer-sdk/winforms-pdf-viewer) (PdfViewerControl) and dependent assemblies can be found at the following location on your machine.
2828

2929
### Install Syncfusion<sup style="font-size:70%">&reg;</sup> Windows Forms PdfViewer NuGet packages
3030

@@ -38,7 +38,7 @@ To add **Windows Forms PdfViewer** component in the application, open the NuGet
3838

3939
### Add Syncfusion® WinForms PdfViewer Assemblies
4040

41-
Below table describes, list of assemblies required to be added in project when the [WinForms PdfViewer](https://www.syncfusion.com/pdf-viewer-sdk/winforms-pdf-viewer) control is used in your application.
41+
The table below lists the required assemblies to be added in project when the [WinForms PdfViewer](https://www.syncfusion.com/pdf-viewer-sdk/winforms-pdf-viewer) control is used in your application.
4242

4343
<table>
4444
<tr>
@@ -60,117 +60,117 @@ This library is responsible for Pdfium integration and image generation, enhanci
6060
<tr>
6161
<td>
6262
Syncfusion.PdfViewer.Windows.dll</td><td>
63-
This component contains the rendering area and other related UI elements.</td></tr>
63+
This assembly contains the rendering area and other related UI elements.</td></tr>
6464
<tr>
6565
<td>
6666
Syncfusion.Shared.Base.dll</td><td>
67-
This component contains various UI controls (ColorPickerPalette and Numeric UpDown) that are used in the PDF Viewer.</td></tr>
67+
This assembly contains various UI controls (ColorPickerPalette and Numeric UpDown) that are used in the PDF Viewer.</td></tr>
6868
</table>
6969

7070
{% endtabcontent %}
7171

7272
{% endtabcontents %}
7373

7474
N>* Starting with version 23.1.x, Syncfusion PdfToImageConverter is necessary for PdfViewer applications.
75-
N>* Starting with v16.2.0.x, if you reference Syncfusion<sup>&reg;</sup>; 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&reg; license key in your Windows Forms application to use our components.
75+
N>* Starting with version 16.2.0.x, if you reference Syncfusion<sup>&reg;</sup>; assemblies from trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to [this licensing guide](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion&reg; license key in your Windows Forms application to use our components.
7676

7777

7878
## Add Windows Forms PdfViewer component
7979

80-
WinForms PdfViewer control can be added to an application either through the designer (XAML) or programmatically using code.
80+
WinForms PdfViewer control can be added to an application either through the Windows Forms Designer or programmatically using code.
8181

8282
{% tabcontents %}
8383
{% tabcontent Via Designer %}
8484

85-
1. Open your form in the designer. Add the Syncfusion<sup>&reg;</sup>; controls to your .NET toolbox in Visual Studio if you haven't done so already (the install would have automatically done this unless you selected not to complete toolbox integration during installation).
85+
1.Open your form in the designer. Add the Syncfusion<sup>&reg;</sup>; controls to your .NET toolbox in Visual Studio if you haven't done so already (the install would have automatically done this unless you selected not to complete toolbox integration during installation).
8686

8787
![Windows forms pdfviewer drag and drop from toolbox](Getting-Started_images/Getting-Started_img1.png)
8888

89-
2. Drag the PdfViewerControl from the toolbox onto the form. Appearance and behavior related aspects of the PdfViewerControl can be controlled by setting the appropriate properties through the properties grid.
89+
2.Drag the PdfViewerControl from the toolbox onto the form. Appearance and behavior related aspects of the PdfViewerControl can be controlled by setting the appropriate properties through the properties grid.
9090

9191
![Windows forms pdfviewer displays properties window of control](Getting-Started_images/Getting-Started_img2.png)
9292

93-
3. This will add the instance 'pdfViewerControl1' to the Designer cs file. The PDF can be loaded in the Form1.cs file using the [Load](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_Forms_PdfViewer_PdfViewerControl_Load_System_String_) method.
93+
3.This will add the instance 'pdfViewerControl1' to the Designer.cs file. The PDF can be loaded in the Form1.cs file using the [Load](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_Forms_PdfViewer_PdfViewerControl_Load_System_String_) method.
9494

95-
{% tabs %}
96-
{% highlight c# tabtitle="C#" %}
95+
{% tabs %}
96+
{% highlight c# tabtitle="C#" %}
9797

98-
//Loading the document in the PdfViewerControl
99-
pdfViewerControl1.Load("Sample.pdf");
98+
//Loading the document in the PdfViewerControl
99+
pdfViewerControl1.Load("Sample.pdf");
100100

101-
{% endhighlight %}
102-
{% highlight vb tabtitle="VB.NET" %}
101+
{% endhighlight %}
102+
{% highlight vb tabtitle="VB.NET" %}
103103

104-
'Loading the document in the PdfViewerControl
105-
pdfViewerControl1.Load("Sample.pdf")
104+
'Loading the document in the PdfViewerControl
105+
pdfViewerControl1.Load("Sample.pdf")
106106

107-
{% endhighlight %}
108-
{% endtabs %}
107+
{% endhighlight %}
108+
{% endtabs %}
109109

110110

111-
{% endtabcontent %}
111+
{% endtabcontent %}
112112

113-
{% tabcontent Via Coding %}
113+
{% tabcontent Via Coding %}
114114

115-
1. Add Syncfusion.Windows.Forms.PdfViewer namespace in Form1.cs.
115+
1.Add Syncfusion.Windows.Forms.PdfViewer namespace in Form1.cs.
116116

117117

118-
{% tabs %}
119-
{% highlight c# tabtitle="C#" %}
118+
{% tabs %}
119+
{% highlight c# tabtitle="C#" %}
120120

121-
using Syncfusion.Windows.Forms.PdfViewer;
121+
using Syncfusion.Windows.Forms.PdfViewer;
122122

123-
{% endhighlight %}
124-
{% highlight vb tabtitle="VB.NET" %}
123+
{% endhighlight %}
124+
{% highlight vb tabtitle="VB.NET" %}
125125

126-
Imports Syncfusion.Windows.Forms.PdfViewer
126+
Imports Syncfusion.Windows.Forms.PdfViewer
127127

128-
{% endhighlight %}
129-
{% endtabs %}
128+
{% endhighlight %}
129+
{% endtabs %}
130130

131131

132-
2. Create PdfViewerControl instance and load the PDF in Form1.cs.
132+
2.Create a PdfViewerControl instance and load the PDF inside Constructor in Form1.cs. Also place the sample PDF document in the project folder.
133133

134-
{% tabs %}
135-
{% highlight c# tabtitle="C#" %}
134+
{% tabs %}
135+
{% highlight c# tabtitle="C#" %}
136136

137-
//Initializing the PdfViewerControl
138-
PdfViewerControl pdfViewerControl1 = new PdfViewerControl();
137+
//Initializing the PdfViewerControl
138+
PdfViewerControl pdfViewerControl1 = new PdfViewerControl();
139139

140-
//Add PdfViewerControl to the Form
141-
Controls.Add(pdfViewerControl1);
142-
//Docking the control to all edges of its containing control and sizing appropriately.
143-
pdfViewerControl1.Dock = DockStyle.Fill;
140+
//Add PdfViewerControl to the Form
141+
Controls.Add(pdfViewerControl1);
142+
//Docking the control to all edges of its containing control and sizing appropriately.
143+
pdfViewerControl1.Dock = DockStyle.Fill;
144144

145-
//Loading the document in the PdfViewerControl
146-
pdfViewerControl1.Load("Sample.pdf");
145+
//Loading the document in the PdfViewerControl
146+
pdfViewerControl1.Load(@"../../Sample.pdf");
147147

148-
{% endhighlight %}
149-
{% highlight vb tabtitle="VB.NET" %}
148+
{% endhighlight %}
149+
{% highlight vb tabtitle="VB.NET" %}
150150

151-
'Initializing the PdfViewerControl
152-
Dim pdfViewerControl1 As PdfViewerControl = New PdfViewerControl()
151+
'Initializing the PdfViewerControl
152+
Dim pdfViewerControl1 As PdfViewerControl = New PdfViewerControl()
153153

154-
'Add PdfViewerControl to the Form
155-
Controls.Add(pdfViewerControl1)
156-
'Docking the control to all edges of its containing control and sizing appropriately.
157-
pdfViewerControl1.Dock = DockStyle.Fill
154+
'Add PdfViewerControl to the Form
155+
Controls.Add(pdfViewerControl1)
156+
'Docking the control to all edges of its containing control and sizing appropriately.
157+
pdfViewerControl1.Dock = DockStyle.Fill
158158

159-
'Loading the document in the PdfViewerControl
160-
pdfViewerControl1.Load("Sample.pdf")
159+
'Loading the document in the PdfViewerControl
160+
pdfViewerControl1.Load(@"../../Sample.pdf")
161161

162-
{% endhighlight %}
163-
{% endtabs %}
162+
{% endhighlight %}
163+
{% endtabs %}
164164

165165

166-
{% endtabcontent %}
167-
168-
{% endtabcontents %}
166+
{% endtabcontent %}
167+
168+
{% endtabcontents %}
169169

170170

171171
N>[View Sample in GitHub.](https://github.com/syncfusion/pdf-viewer-sdk-winforms-demos/tree/master/pdfviewer/Getting%20Started/Pdf%20Viewer%20Demo)
172172

173-
N> You can also explore our [WinForms PDF Viewer example](https://github.com/syncfusion/winforms-demos/tree/master/pdfviewer) that shows you how to render and configure the PDF Viewer. Looking for the full WinForms PDF Viewer component overview, features, pricing, and documentation? Visit the [WinForms PDF Viewer](https://www.syncfusion.com/pdf-viewer-sdk/winforms-pdf-viewer) page.
173+
N> You can also explore our [WinForms PDF Viewer example](https://github.com/syncfusion/pdf-viewer-sdk-winforms-demos/tree/master/pdfviewer) that shows you how to render and configure the PDF Viewer. Looking for the full WinForms PDF Viewer component overview, features, pricing, and documentation? Visit the [WinForms PDF Viewer](https://www.syncfusion.com/pdf-viewer-sdk/winforms-pdf-viewer) page.
174174

175175
## See Also
176176
- [Working with PdfViewerControl](./working-with-pdf-viewer)

Document-Processing/PDF/PDF-Viewer/winforms/How-To/Get-document-information.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ string fileName = pdfViewer.DocumentInformation.FileName;
3131
'Initialize the PDF Viewer
3232
pdfViewer As New PdfViewerControl()
3333
'Loads the PDF document in PDF Viewer
34-
pdfViewer.Load("../../Data/Barcode.pdf")
34+
pdfViewer.Load("input.pdf")
3535

3636
'Gets the filename of loaded PDF document
3737
Dim fileName As String = pdfViewer.DocumentInformation.FileName
@@ -60,7 +60,7 @@ string filePath = pdfViewer.DocumentInformation.FilePath;
6060
'Initialize the PDF Viewer
6161
pdfViewer As New PdfViewerControl()
6262
'Loads the PDF document in PDF Viewer
63-
pdfViewer.Load("../../Data/Barcode.pdf")
63+
pdfViewer.Load("input.pdf")
6464

6565
'Gets the file path of loaded PDF document
6666
Dim filePath As String = pdfViewer.DocumentInformation.FilePath

Document-Processing/PDF/PDF-Viewer/winforms/How-To/Hide-or-Disabling-Toolbar-Buttons.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ control: PdfViewerControl
77
documentation: ug
88
---
99

10-
# Hide or disable the Toolbar Button
10+
# Hide or disable Toolbar Buttons
1111

1212
In the WinForms PDF Viewer, there is an API called [ToolbarSettings](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.PdfViewer.DocumentToolbarSettings.html) that allows you to access and manage toolbar buttons. To hide a specific button, use the IsVisible property associated with that button. By setting IsVisible to false, the button will be hidden from the toolbar.
1313

1414
The following code snippet demonstrates how to hide the Open and Save buttons in the WinForms PDF Viewer control.
1515

1616
{% tabs %}
1717
{%highlight c#%}
18-
//Load the document ot PDFViewer control
19-
pdfviewerControl.Load("Input.pdf");
20-
21-
//Change the visibility of open and save button
18+
//Load the document to PDFViewer control
19+
pdfviewerControl.Load("Input.pdf");
20+
21+
//Change the visibility of Open and Save buttons
2222
pdfviewerControl.ToolbarSettings.OpenButton.IsVisible = false;
2323
pdfviewerControl.ToolbarSettings.SaveButton.IsVisible = false;
2424

@@ -35,6 +35,6 @@ pdfviewerControl.ToolbarSettings.SaveButton.IsVisible = False
3535
{%endhighlight%}
3636
{% endtabs %}
3737

38-
The following is the image of a PDF document which hides the Open and Save button in Toolbar.
38+
The following image shows the PDF Viewer with the Open and Save buttons hidden in the toolbar.
3939

4040
![Hide or disable Toolbar Buttons in Windows PdfViewer](Hide-or-Disabling-Toolbar-Buttons_images/Hide-or-Disabling-Toolbar-Button_img1.png)

Document-Processing/PDF/PDF-Viewer/winforms/How-To/How-to-make-Winforms-PdfViewer-have-enriched-features-like-WPF-PdfViewer.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ documentation: ug
88
---
99
# How to Add WPF PdfViewer Features to WinForms PdfViewer
1010

11-
To leverage the advanced features offered by the WPF PdfViewer, such as adding annotations, form filling, signatures, stamps, sticky notes, and more, you can [integrate the WPF PdfViewer into the Windows Forms]( https://support.syncfusion.com/kb/article/7882/how-to-host-pdf-viewer-in-windows-forms-application ) and take advantage of its extensive feature sets.
11+
To leverage the advanced features offered by the WPF PdfViewer, such as adding annotations, form filling, signatures, stamps, sticky notes, and more, you can [integrate the WPF PdfViewer into the Windows Forms](https://support.syncfusion.com/kb/article/7882/how-to-host-pdf-viewer-in-windows-forms-application) and take advantage of its extensive feature sets.
1212

13-
we can host a WPF PdfViewer control within a Windows Forms application using an ElementHost. By embedding the WPF PdfViewer, you can access advanced features available in the WPF control while maintaining a Windows Forms interface.
13+
You can host a WPF PdfViewer control within a Windows Forms application using an ElementHost. By embedding the WPF PdfViewer, you can access advanced features available in the WPF control while maintaining a Windows Forms interface.
1414

1515
## Steps to host the WPF PdfViewer in the WinForms application
1616

17-
1. Add an WPF UserControl and install the [Syncfusion.PdfViewer.WPF](https://www.nuget.org/packages/Syncfusion.PdfViewer.WPF) NuGet package to your WinForms application.
17+
1. Add a WPF UserControl and install the [Syncfusion.PdfViewer.WPF](https://www.nuget.org/packages/Syncfusion.PdfViewer.WPF) NuGet package to your WinForms application.
1818

19-
2. Add the following Syncfusion&reg; namespace in XAML to make use of the WPF [PdfViewerControl.](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html)
19+
2. Add the following Syncfusion&reg; namespace in XAML to make use of the WPF [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html).
2020

2121
~~~xaml
2222
<UserControl
@@ -36,13 +36,15 @@ we can host a WPF PdfViewer control within a Windows Forms application using an
3636

3737
{% tabs %}
3838
{% highlight c# %}
39+
using System.Windows;
40+
using System.Windows.Controls;
3941

4042
/// <summary>
41-
/// Interaction logic for PdfViewer.xaml
43+
/// Interaction logic for PdfViewerUserControl.xaml
4244
/// </summary>
4345
public partial class PdfViewerUserControl : UserControl
4446
{
45-
public PdfViewer()
47+
public PdfViewerUserControl()
4648
{
4749
InitializeComponent();
4850
}
@@ -56,7 +58,7 @@ we can host a WPF PdfViewer control within a Windows Forms application using an
5658
{%endhighlight%}
5759
{% endtabs %}
5860

59-
5. Add a panel to the form. Create an ElementHost object in the Form and add the created UserControl's object as child to the ElementHost object. Add the elementHost as a child to the panel as mentioned below.
61+
5. Add a panel to the form. Create an ElementHost object in the Form and add the created UserControl's instance as a child of the ElementHost object. Add the elementHost as a child of the panel as mentioned below.
6062

6163
{% tabs %}
6264
{% highlight c# %}
@@ -104,4 +106,4 @@ namespace SampleWF
104106
{%endhighlight%}
105107
{% endtabs %}
106108

107-
You can find the complete sample in the [Github](https://github.com/SyncfusionExamples/WinForms-PDFViewer-Examples/tree/master/How-to/Host-WPFPdfViewer-in-Winforms/HostedPdfViewer) for your reference.
109+
You can find the complete sample in the [GitHub](https://github.com/SyncfusionExamples/WinForms-PDFViewer-Examples/tree/master/How-to/Host-WPFPdfViewer-in-Winforms/HostedPdfViewer) for your reference.

0 commit comments

Comments
 (0)