Skip to content

Commit ede1fae

Browse files
authored
Merge pull request #439 from telerik/yoan/strikethrough
Release changes
2 parents 02abc79 + d1cc123 commit ede1fae

File tree

12 files changed

+271
-4
lines changed

12 files changed

+271
-4
lines changed

libraries/radpdfprocessing/editing/radfixeddocumenteditor.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ The character properties that are responsible for the look of the runs are liste
173173
* __Single__: The underline is a single line.
174174

175175
* __UnderlineColor__: The color of the underline.
176+
177+
* __StrikethroughPattern__: Тhe strikethrough pattern. Two patterns are supported.
178+
* __None__: There is no strikethrough. This is the default value.
179+
* __Single__: The strikethrough is a single line.
180+
181+
* __StrikethroughColor__: The color of the strikethrough.
176182

177183

178184
### Inserting a Run

libraries/radpdfprocessing/editing/text-and-graphic-properties.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ These properties hold the parameters used for text fragments. The following para
5959
* __UnderlinePattern__: The underline pattern. The property is an enumeration of type [UnderlinePattern](https://docs.telerik.com/devtools/document-processing/api/Telerik.Windows.Documents.Fixed.Model.Editing.Flow.UnderlinePattern.html). Two patterns are supported:
6060
* __None__: There is no underline. This is the default value.
6161
* __Single__: The underline is a single line.
62+
63+
* __UnderlineColor__: The color of the underline.
64+
65+
* __StrikethroughPattern__: The strikethrough pattern. The property is an enumeration of type [StrikethroughPattern](https://docs.telerik.com/devtools/document-processing/api/Telerik.Windows.Documents.Fixed.Model.Editing.Flow.StrikethroughPattern.html). Two patterns are supported:
66+
* __None__: There is no strikethrough. This is the default value.
67+
* __Single__: The strikethrough is a single line.
68+
69+
* __StrikethroughColor__: The color of the strikethrough.
6270

6371
* __CharacterSpacing__: The character spacing for text fragments. The property is of type `double?`.
6472

libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/features.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,50 @@ Link Annotations
199199
Yes
200200
</td><td>
201201

202-
</td></tr><tr><td>
202+
</td></tr>
203+
204+
<tr>
205+
<td>Widget Annotations</td>
206+
<td>Yes</td>
207+
<td></td>
208+
</tr>
209+
<tr>
210+
<td>Stamp Annotations</td>
211+
<td>Yes</td>
212+
<td></td>
213+
</tr>
214+
<tr>
215+
<td>Line Annotations</td>
216+
<td>Yes</td>
217+
<td></td>
218+
</tr>
219+
<tr>
220+
<td>Text Annotations</td>
221+
<td>Yes</td>
222+
<td></td>
223+
</tr>
224+
<tr>
225+
<td>Underline Annotations</td>
226+
<td>Yes</td>
227+
<td></td>
228+
</tr>
229+
<tr>
230+
<td>StrikeOut Annotations</td>
231+
<td>Yes</td>
232+
<td></td>
233+
</tr>
234+
<tr>
235+
<td>Squiggly Annotations</td>
236+
<td>Yes</td>
237+
<td></td>
238+
</tr>
239+
<tr>
240+
<td>Highlight Annotations</td>
241+
<td>Yes</td>
242+
<td></td>
243+
</tr>
244+
245+
<tr><td>
203246

204247
<b>
205248
Graphics
6.43 KB
Loading
5.73 KB
Loading
3.22 KB
Loading
25.4 KB
Loading
57.5 KB
Loading
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: Line
3+
page_title: Line Annotation
4+
description: Line annotations display a single straight line on the page.
5+
slug: radpdfprocessing-model-annotations-line
6+
tags: annotation, overview, pdfprocessing, line
7+
published: True
8+
position: 5
9+
---
10+
11+
# Line Annotation
12+
13+
A **Line annotation** displays a single straight line on the page. When opened, it displays a pop-up window containing the text of the associated note.
14+
15+
The **LineAnnotation** class is a derivative of the **MarkupAnnotation** (descendent of **ContentAnnotation**) and it exposes the following properties:
16+
17+
|Property|Description|
18+
|---|---|
19+
|**Start**|Gets or sets the starting point of the annotation.|
20+
|**End**|Gets or sets the ending point of the annotation.|
21+
|**StartLineEndingType**|Gets or sets the line ending type for the start of the line.|
22+
|**EndLineEndingType**|Gets or sets the line ending type for the end of the line.|
23+
|**Opacity**|Gets or sets the opacity of the annotation.|
24+
|**Contents**|Gets or sets the text that shall be displayed for the annotation.|
25+
|**Color**|Gets or sets the color of the annotation.|
26+
|**Content**|Gets the source defining the visual content of the annotation. This content is with bigger priority compared to the annotation appearance characteristics and text properties and it is visualized by default when opening the exported document in some PDF viewer.|
27+
28+
### Creating a LineAnnotation
29+
30+
```csharp
31+
RadFixedDocument document = new RadFixedDocument();
32+
RadFixedPage page = document.Pages.AddPage();
33+
34+
LineAnnotation annotation = page.Annotations.AddLine(new Point(10, 10), new Point(300, 300));
35+
annotation.StartLineEndingType = LineEndingType.None;
36+
annotation.EndLineEndingType = LineEndingType.OpenArrow;
37+
annotation.Color = new RgbColor(255, 0, 0); //Default RgbColor(255, 255, 255)
38+
annotation.Contents = "This is a LineAnnotation";
39+
annotation.Opacity = 0.5;
40+
annotation.RecalculateContent();
41+
```
42+
43+
![Create LineAnnotation](images/pdf-processing-create-lineannotation.png)
44+
45+
### Creating a LineAnnotation with FixedContentEditor
46+
47+
The [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) offers the public **DrawLineAnnotation** method which creates a new __LineAnnotation__ with starting point the current point of the editor and end point the current point of the editor plus the given distances.
48+
49+
```csharp
50+
RadFixedDocument fixedDocument = new RadFixedDocument();
51+
FixedContentEditor editor = new FixedContentEditor(fixedDocument.Pages.AddPage());
52+
53+
editor.Position.Translate(50, 50);
54+
editor.DrawText("Line starts here.");
55+
editor.DrawLineAnnotation(300, 400);
56+
```
57+
58+
![Create LineAnnotation with FixedContentEditor](images/pdf-processing-create-lineannotation-with-fixedcontenteditor.png)
59+
60+
## See Also
61+
62+
* [AcroForm]({%slug radpdfprocessing-model-interactive-forms-acroform %})
63+
* [FormField]({%slug radpdfprocessing-model-interactive-forms-form-fields%})
64+
* [Annotations Overview]({%slug radpdfprocessing-model-annotations-overview%})

libraries/radpdfprocessing/model/annotations/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ The abstract **Annotation** element associates an object with a location on a [R
2424
|[Link]({%slug radpdfprocessing-model-annotations-links%})|A link annotation represents either a hypertext link to a destination elsewhere in the document or an action to be performed.|
2525
|[Widget]({%slug radpdfprocessing-model-annotations-widgets%})|Interactive forms use widget annotations to represent the appearance of fields and to manage user interactions.|
2626
|[Text]({%slug radpdfprocessing-model-annotations-text%})|A text annotation represents a *sticky note* attached to a point in the PDF document.|
27-
|Line||
28-
|Stamp||
27+
|[Line]({%slug radpdfprocessing-model-annotations-line%})|Line annotations display a single straight line on the page.|
28+
|[Stamp]({%slug radpdfprocessing-model-annotations-stamp%})|Stamp annotations display text or graphics intended to look as if they were stamped on the page with a rubber stamp.|
2929
|[TextMarkup]({%slug radpdfprocessing-model-annotations-text-markup%})| Text markup annotations appear as **Highlights**, **Underlines**, **Strikeouts** or **Squiggly** underlines in the text of a document. When opened, they display a pop-up window containing the text of the associated note.|
3030
3131
* **Border**: Represents the annotation borders. This property is of type [AnnotationBorder](https://docs.telerik.com/devtools/document-processing/api/Telerik.Windows.Documents.Fixed.Model.Annotations.AnnotationBorder.html).

0 commit comments

Comments
 (0)