Skip to content

Commit 3b3570e

Browse files
Update fixedcontenteditor.md
1 parent 9515857 commit 3b3570e

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

libraries/radpdfprocessing/editing/fixedcontenteditor.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ __FixedContentEditor__ is always associated with a single [RadFixedPage]({%slug
4444

4545
#### __[C#] Example 1: Create FixedContentEditor__
4646

47-
{{source=..\SamplesCS\RadPdfProcessing\Editing.cs region=cs-radpdfprocessing-editing-fixedcontenteditor_0}}
48-
49-
````C#
50-
51-
````
47+
{{region cs-radpdfprocessing-editing-fixedcontenteditor_0}}
48+
RadFixedDocument document = new RadFixedDocument();
49+
var firstPage = document.Pages.AddPage();
50+
FixedContentEditor fixedContentEditor = new FixedContentEditor(firstPage);
5251
{{endregion}}
5352

5453
The editor maintains an internal [Position]({%slug radpdfprocessing-concepts-position%}) inside the content root element. When a new element is created, its position is being set to the current position of the editor. The initial position of the editor can be specified when it is created.
@@ -57,19 +56,15 @@ __Example 2__ demonstrates how you can create a FixedContentEditor with a specif
5756

5857
#### __[C#] Example 2: Create FixedContentEditor with a specific position__
5958

60-
{{source=..\SamplesCS\RadPdfProcessing\Editing.cs region=cs-radpdfprocessing-editing-fixedcontenteditor_345}}
61-
62-
````C#
63-
MatrixPosition matrixPosition = new MatrixPosition();
64-
matrixPosition.Translate(20, 20); // Translates the position by (20, 20)
65-
matrixPosition.Translate(30, 30); // Translates the position by (30, 30).
66-
67-
68-
69-
FixedContentEditor simplePositionfixedContentEditor = new FixedContentEditor(firstPage,matrixPosition);
70-
FixedContentEditor matrixPositionfixedContentEditor = new FixedContentEditor(firstPage,matrixPosition);
71-
72-
````
59+
{{region cs-radpdfprocessing-editing-fixedcontenteditor_1}}
60+
MatrixPosition matrixPosition = new MatrixPosition();
61+
matrixPosition.Translate(20, 20); // Translates the position by (20, 20)
62+
matrixPosition.Translate(30, 30); // Translates the position by (30, 30).
63+
SimplePosition simplePosition = new SimplePosition();
64+
simplePosition.Translate(20, 20); // Translates the position by (20, 20).
65+
simplePosition.Translate(30, 30); // Translates the position by (30, 30) overwriting the previous translations.
66+
FixedContentEditor simplePositionfixedContentEditor = new FixedContentEditor(firstPage,matrixPosition);
67+
FixedContentEditor matrixPositionfixedContentEditor = new FixedContentEditor(firstPage,matrixPosition);
7368
{{endregion}}
7469

7570
## Inserting Elements

0 commit comments

Comments
 (0)