Skip to content

Commit 1989a38

Browse files
Merge pull request #1830 from Syncfusion-Content/development
DOCINFRA-2341_merged_using_automation
2 parents 06be371 + fd15e44 commit 1989a38

33 files changed

+250
-41
lines changed

wpf-toc.html

Lines changed: 2 additions & 1 deletion
Large diffs are not rendered by default.

wpf/Diagram/Automatic-Layouts/Automatic-Layouts.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ N> `AvoidSegmentOverlapping` is not valid for `RadialTreeLayout`.
327327

328328
## Customize margin in layout
329329

330-
The [`Margin`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.Layout.LayoutBase.html#Syncfusion_UI_Xaml_Diagram_Layout_LayoutBase_Margin) property of `DirectedTreeLayout` is used to provide space between the bounds of the tree layout to the diagram. The default margin value is `50`.
330+
The [`Margin`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.Layout.LayoutBase.html#Syncfusion_UI_Xaml_Diagram_Layout_LayoutBase_Margin) property of [`LayoutBase`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.Layout.LayoutBase.html) is used to provide space between the bounds of the tree layout to the diagram. The default margin value is `50`.
331331

332332
{% tabs %}
333333
{% highlight xaml %}
@@ -347,8 +347,6 @@ diagram.LayoutManager = new LayoutManager()
347347

348348
{% endtabs %}
349349

350-
N> `Margin` is not valid for `RadialTreeLayout`.
351-
352350
## See Also
353351

354352
[How to create parent and child relationship by drag and drop nodes?](https://support.syncfusion.com/kb/article/10008/how-to-create-parent-and-child-relationship-by-drag-and-drop-nodes-in-wpf-diagram-sfdiagram)

wpf/Diagram/Printing.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ Printer section.
7777

7878
![Printer List in WPF Diagram](Printing_images/wpf-diagram-printer-list.png)
7979

80+
#### Printer Properties
81+
82+
The **Printer Properties** option allows you to configure advanced settings for the selected printer before printing the diagram. The available options may vary depending on the printer model and driver, but commonly include:
83+
84+
- **Paper Size**: Select from supported paper sizes such as A4, Letter, Legal, etc.
85+
- **Orientation**: Choose between Portrait and Landscape.
86+
87+
To access these settings, click the **Printer Properties** button in the Print Preview window after selecting your printer. This allows you to customize the print output according to your requirements.
88+
89+
![Printer Properties in WPF Diagram](Printing_images/wpf-diagram-printer-properties.png)
90+
8091
### Scaling
8192
SfDiagram provides support to scale the diagram whether to print as single page or split into multiple pages. Scaling options can be changed by setting the `PrintingService.PrintManager.SelectedScaleIndex`
8293
property.
Loading
Loading

wpf/Diagram/Snapping/DefineSnapping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Refer to the [SnapSettings](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xam
1717

1818
## Snap-to-objects
1919

20-
The snap-to-object provides visual cues to assist with aligning and spacing diagram. A node can be snapped with its neighboring objects based on certain alignments (same size and same position). Such alignments are visually represented as smart guide lines, which are in cyan shade color and its color code is #83F6F0.
20+
The snap-to-object provides visual cues to assist with aligning and spacing diagram. A node or group can be snapped with its neighboring objects based on certain alignments (same size and same position). Such alignments are visually represented as smart guide lines, which are in cyan shade color and its color code is #83F6F0.
2121

2222
Refer to the members of [SnapToObject](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.SnapToObject.html).
2323

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
layout: post
3+
title: Getting the clicked location in a page in WPF Pdf Viewer | Syncfusion®
4+
description: Calculate the exact clicked point on a page in the Syncfusion® WPF PDF Viewer control using the PageClicked event.
5+
platform: wpf
6+
control: PDF Viewer
7+
documentation: ug
8+
---
9+
10+
# Determining the Clicked Position in the WPF PDF Viewer
11+
12+
Use the [PageClicked](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_PageClicked) event of the Syncfusion WPF PDF Viewer control to capture the exact location where the user clicks on a PDF page. The event provides pixel coordinates, which can be converted to PDF points and adjusted for the viewer’s zoom level to yield accurate positions on the document.
13+
14+
Refer to the code snippet below for implementation details
15+
16+
{% tabs %}
17+
{% highlight c# %}
18+
19+
private void PdfViewer_PageClicked(object sender, Syncfusion.Windows.PdfViewer.PageClickedEventArgs args)
20+
{
21+
//Get the current point where the mouse is clicked. The value is in pixels.
22+
Point currentPointInPixels = args.Position;
23+
24+
//Convert the point from pixels to points.
25+
PdfUnitConvertor convertor = new PdfUnitConvertor();
26+
System.Drawing.PointF currentPoint = convertor.ConvertFromPixels( new System.Drawing.PointF((float)currentPointInPixels.X, (float)currentPointInPixels.Y), PdfGraphicsUnit.Point);
27+
28+
//Convert the point based on the zoom factor.
29+
float zoomFactor = (float)pdfViewer.ZoomPercentage / 100;
30+
System.Drawing.PointF finalPoint = new System.Drawing.PointF(currentPoint.X / zoomFactor, currentPoint.Y / zoomFactor);
31+
32+
//Display the point through message box.
33+
MessageBox.Show("The point clicked is: " + finalPoint.ToString());
34+
}
35+
36+
{% endhighlight %}
37+
38+
{% highlight vbnet %}
39+
40+
Private Sub PdfViewer_PageClicked(sender As Object, args As Syncfusion.Windows.PdfViewer.PageClickedEventArgs)
41+
' Get the current point where the mouse is clicked. The value is in pixels.
42+
Dim currentPointInPixels As Point = args.Position
43+
44+
' Convert the point from pixels to points.
45+
Dim convertor As New PdfUnitConvertor()
46+
Dim currentPoint As System.Drawing.PointF = convertor.ConvertFromPixels(New System.Drawing.PointF(CSng(currentPointInPixels.X), CSng(currentPointInPixels.Y)), PdfGraphicsUnit.Point)
47+
48+
' Convert the point based on the zoom factor.
49+
Dim zoomFactor As Single = CSng(pdfViewer.ZoomPercentage) / 100
50+
Dim finalPoint As New System.Drawing.PointF(currentPoint.X / zoomFactor, currentPoint.Y / zoomFactor)
51+
52+
' Display the point through message box.
53+
MessageBox.Show("The point clicked is: " & finalPoint.ToString())
54+
End Sub
55+
56+
{% endhighlight %}
57+
{% endtabs %}
58+
59+
60+

wpf/Pdf-Viewer/Organize-Pages.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation: ug
99

1010
# Organize Pages in WPF Pdf Viewer
1111

12-
Organize pages support allows you to rotate, rearrange, and delete pages from a PDF document using a miniature preview of the PDF pages.
12+
Organize pages support allows you to rotate, rearrange, insert and delete pages from a PDF document using a miniature preview of the PDF pages.
1313

1414
Use the following steps to organize the PDF page(s) in [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html):
1515

@@ -28,6 +28,12 @@ Use the following steps to organize the PDF page(s) in [PdfViewerControl](https:
2828
4. You can rearrange the page(s) by dragging and dropping them.
2929

3030
![WPF PDF Viewer Rearrange Pages](OrganizePages_Images/wpf-pdf-viewer-rearrange-pages.png)
31+
32+
5. You can insert a blank page or any PDF page(s) using the Organize Pages toolbar.
33+
![WPF PDF Viewer insert Pages](OrganizePages_Images/wpf-pdf-viewer-insert-pages-toolbar.png)
34+
6.You can insert a blank page or any PDF page(s),and perform clipboard actions like Cut, Copy, and Paste using the more option in the context menu that appears when hovering over a pages.
35+
![WPF PDF Viewer insert Pages option button](OrganizePages_Images/wpf-pdf-viewer-Option-button.png)
36+
![WPF PDF Viewer option button context menu](OrganizePages_Images/wpf-pdf-viewer-Option-button-contextmenu.png)
3137

3238
## Rotating PDF page(s)
3339

@@ -240,6 +246,21 @@ pdfViewerControl.PageOrganizer.RemovePagesCommand.Execute(new int[] { 0, 1 });
240246
{% endhighlight %}
241247
{% endtabs %}
242248

249+
## Insert Page(s) Customization
250+
Insert page feature allows users to choose where to add pages using the **Insert Pages** window.Users can access this via from either the Organize Pages toolbar or the context menu that appears when hovering over a pages.
251+
In the window, there are three options **First**, **Last**, and **Page**. Selecting **First** inserts pages at the document's beginning, while **Last** adds them at the end. The **Page** option lets users specify a position using **Location** **Before** adds pages before the selected page, and **After** inserts them after.
252+
253+
N> The **Location** is accessible only when the **Page** radio button is selected.
254+
### From file
255+
When users want to insert pages using the **From File** option, a browser window will open to select a PDF. Once selected, all pages from the PDF are inserted into the document based on the customization in the **Insert Pages** window.
256+
257+
![WPF PDF Viewer insert page window ](OrganizePages_Images/wpf-pdf-viewer-insert-page-window.png)
258+
259+
### Blank page
260+
When users want to insert page a page using the **Blank Page** option, a single blank page will be added to the document as per the Customization in the **Insert Pages** window.
261+
262+
![WPF PDF Viewer insert page window blank page ](OrganizePages_Images/wpf-pdf-viewer-insert-page-window-blank-page.png)
263+
243264
## Get the selected page indexes
244265

245266
You can get the selected page indexes of the PDF document in the organizing pages window. The [PageSelected](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html#Syncfusion_Windows_PdfViewer_PdfViewerControl_PageSelected) event indicates that a page(s) is selected and the [SelectedPages](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PageSelectedEventArgs.html#Syncfusion_Windows_PdfViewer_PageSelectedEventArgs_SelectedPages) property of the [PageSelectedEventArgs](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PageSelectedEventArgs.html) provides you the index of the pages that are currently selected. The following code shows how to wire the event in [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html).
Loading
Loading

0 commit comments

Comments
 (0)