From a0a42f415ce77df23ec081f08e60bbeeb0a5994f Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Wed, 8 May 2024 15:01:33 +0300 Subject: [PATCH 01/16] Added more context to the FixedContentEditor article examples and renamed variables. --- .../editing/fixedcontenteditor.md | 58 +++++++++++-------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/libraries/radpdfprocessing/editing/fixedcontenteditor.md b/libraries/radpdfprocessing/editing/fixedcontenteditor.md index 0ca8454c..e2bd0533 100644 --- a/libraries/radpdfprocessing/editing/fixedcontenteditor.md +++ b/libraries/radpdfprocessing/editing/fixedcontenteditor.md @@ -22,7 +22,10 @@ __FixedContentEditor__ is always associated to a single __IContentRootElement__ #### __[C#] Example 1: Create FixedContentEditor__ {{region cs-radpdfprocessing-editing-fixedcontenteditor_0}} - FixedContentEditor editor = new FixedContentEditor(contentRootElement); + RadFixedDocument document = new RadFixedDocument(); + var firstPage = document.Pages.AddPage(); + + FixedContentEditor fixedContentEditor = new FixedContentEditor(firstPage); {{endregion}} @@ -36,7 +39,16 @@ __Example 2__ demonstrates how you can create а FixedContentEditor with a speci #### __[C#] Example 2: Create FixedContentEditor with specific position__ {{region cs-radpdfprocessing-editing-fixedcontenteditor_1}} - FixedContentEditor editor = new FixedContentEditor(contentRootElement, initialPosition); + MatrixPosition matrixPosition = new MatrixPosition(); + matrixPosition.Translate(20, 20); // Translates the position by (20, 20) + matrixPosition.Translate(30, 30); // Translates the position by (30, 30). + + SimplePosition simplePosition = new SimplePosition(); + simplePosition.Translate(20, 20); // Translates the position by (20, 20). + simplePosition.Translate(30, 30); // Translates the position by (30, 30) overwriting the previous translations. + + FixedContentEditor simplePositionfixedContentEditor = new FixedContentEditor(firstPage,matrixPosition); + FixedContentEditor matrixPositionfixedContentEditor = new FixedContentEditor(firstPage,matrixPosition); {{endregion}} @@ -54,7 +66,7 @@ Inserting а [TextFragment]({%slug radpdfprocessing-model-textfragment%}) can be #### __[C#] Example 3: Insert TextFragment__ {{region cs-radpdfprocessing-editing-fixedcontenteditor_2}} - editor.DrawText("First text fragment."); + fixedContentEditor.DrawText("First text fragment."); {{endregion}} @@ -80,7 +92,7 @@ __Example 4__ shows how you can use the __Block__ object to draw a paragraph. Block block = new Block(); block.InsertText("First sentence."); block.InsertText("Second sentence."); - editor.DrawBlock(block); + fixedContentEditor.DrawBlock(block); {{endregion}} @@ -114,7 +126,7 @@ __Example 5__ shows how you can add an image created from a Stream. {{region cs-radpdfprocessing-editing-fixedcontenteditor_4}} using (Stream stream = this.GetResourceStream("Telerik_logo.jpg")) { - editor.DrawImage(stream, new Size(118, 28)); + fixedContentEditor.DrawImage(stream, new Size(118, 28)); } {{endregion}} @@ -141,7 +153,7 @@ __Example 6__ shows how you can add an ellipse using one of FixedContentEditor's #### __[C#] Example 6: Insert ellipse__ {{region cs-radpdfprocessing-editing-fixedcontenteditor_5}} - editor.DrawEllipse(new Point(250, 70), 136, 48); + fixedContentEditor.DrawEllipse(new Point(250, 70), 136, 48); {{endregion}} @@ -173,7 +185,7 @@ When a new clipping is pushed, it is set as a clipping to the current clipping i using (editor.PushClipping(new Rect(new Point(0, 0), visisibleTextSize))) { - editor.DrawText(text); + fixedContentEditor.DrawText(text); } {{endregion}} @@ -212,8 +224,8 @@ __Example 8__ generates a table and draws it in some fixed size. RadFixedDocument document = new RadFixedDocument(); RadFixedPage page = document.Pages.AddPage(); FixedContentEditor editor = new FixedContentEditor(page); - editor.Position.Translate(10, 10); - editor.DrawTable(table, new Size(180, double.PositiveInfinity)); + fixedContentEditor.Position.Translate(10, 10); + fixedContentEditor.DrawTable(table, new Size(180, double.PositiveInfinity)); {{endregion}} #### The table created in Example 8 @@ -228,7 +240,7 @@ With the FixedContentEditor class you can insert a Form (Form-XObject) element. #### __[C#] Example 9: Insert a form__ {{region cs-radpdfprocessing-editing-fixedcontenteditor_9}} - editor.DrawForm(formSource); + fixedContentEditor.DrawForm(formSource); {{endregion}} There are two more overloads of DrawForm() that enable you to pass the size that should be used for the form. @@ -250,8 +262,8 @@ The Widget annotations allow you visualize the content of a FormField. With the document.AcroForm.FormFields.Add(pushButton); - editor.Position.Translate(20, 450); - editor.DrawWidget(pushButton, new Size(100, 20)); + fixedContentEditor.Position.Translate(20, 450); + fixedContentEditor.DrawWidget(pushButton, new Size(100, 20)); {{endregion}} @@ -271,12 +283,12 @@ The Widget annotations allow you visualize the content of a FormField. With the document.AcroForm.FormFields.Add(radio); - editor.Position.Translate(20, 410); - editor.DrawWidget(radio, radio.Options[0], new Size(20, 20)); - editor.Position.Translate(50, 410); - editor.DrawWidget(radio, radio.Options[1], new Size(20, 20)); - editor.Position.Translate(80, 410); - editor.DrawWidget(radio, radio.Options[2], new Size(20, 20)); + fixedContentEditor.Position.Translate(20, 410); + fixedContentEditor.DrawWidget(radio, radio.Options[0], new Size(20, 20)); + fixedContentEditor.Position.Translate(50, 410); + fixedContentEditor.DrawWidget(radio, radio.Options[1], new Size(20, 20)); + fixedContentEditor.Position.Translate(80, 410); + fixedContentEditor.DrawWidget(radio, radio.Options[2], new Size(20, 20)); {{endregion}} @@ -291,13 +303,13 @@ The code in __Example 12__ shows how to manipulate the position of the inserted #### __[C#] Example 12: Scale and rotate content__ {{region cs-radpdfprocessing-editing-fixedcontenteditor_7}} - editor.Position.Scale(1.5, 0.5); - editor.Position.Rotate(10); - editor.DrawText("Image:"); - editor.Position.Translate(0, 20); + fixedContentEditor.Position.Scale(1.5, 0.5); + fixedContentEditor.Position.Rotate(10); + fixedContentEditor.DrawText("Image:"); + fixedContentEditor.Position.Translate(0, 20); using (Stream stream = this.GetResourceStream("Telerik_logo.jpg")) { - editor.DrawImage(stream, new Size(118, 28)); + fixedContentEditor.DrawImage(stream, new Size(118, 28)); } {{endregion}} From 311a3f63ad9d1c148095d8dfa8b73da34960950a Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Wed, 8 May 2024 15:27:35 +0300 Subject: [PATCH 02/16] Added usings to "Sign a document" example. Added note for NET Standard differences. --- .../features/digital-signature/overview.md | 95 +++++++++++-------- 1 file changed, 58 insertions(+), 37 deletions(-) diff --git a/libraries/radpdfprocessing/features/digital-signature/overview.md b/libraries/radpdfprocessing/features/digital-signature/overview.md index 0d52468c..98928209 100644 --- a/libraries/radpdfprocessing/features/digital-signature/overview.md +++ b/libraries/radpdfprocessing/features/digital-signature/overview.md @@ -31,48 +31,69 @@ The following example shows a full code snippet for a simple signing of a newly {{region radpdfprocessing-features-digital-signature_2}} - int signatureFieldWidth = 200; - int signatureFieldHeight = 50; - int signaturePositionLeft = 10; - int signaturePositionTop = 10; - - X509Certificate2 certificate = new System.Security.Cryptography.X509Certificates.X509Certificate2("Certificate.pfx", "johndoe"); - SignatureField pdfSignature = new SignatureField("SignatureField"); - pdfSignature.Signature = new Signature(certificate); - - Form pdfForm = new Telerik.Windows.Documents.Fixed.Model.Objects.Form(); - pdfForm.FormSource = new FormSource(); - pdfForm.FormSource.Size = new Size(signatureFieldWidth, signatureFieldHeight); - FixedContentEditor editor = new FixedContentEditor(pdfForm.FormSource); - pdfForm.Position.Translate(signaturePositionLeft, signaturePositionTop); - editor.DrawText($"{certificate.GetNameInfo(X509NameType.SimpleName, false)} {DateTime.Now.ToString("yyyy.MM.dd HH:mm")}"); - - SignatureWidget signatureWidget = pdfSignature.Widgets.AddWidget(); - signatureWidget.Content.NormalContentSource = pdfForm.FormSource; - signatureWidget.Rect = new Rect( - new Point(signaturePositionLeft, signaturePositionTop), - new Size(signatureFieldWidth, signatureFieldHeight)); - signatureWidget.RecalculateContent(); - - RadFixedDocument document = new RadFixedDocument(); - RadFixedPage pdfPage = document.Pages.AddPage(); - pdfPage.Annotations.Add(signatureWidget); - - FixedContentEditor pageEditor = new FixedContentEditor(pdfPage); - pageEditor.Position.Translate(signaturePositionLeft, signaturePositionTop); - pageEditor.DrawForm(pdfForm.FormSource); - document.AcroForm.FormFields.Add(pdfSignature); - signatureWidget.RecalculateContent(); - - string signedDocumentFilePath = "signed.pdf"; - File.Delete(signedDocumentFilePath); - using (System.IO.Stream output = new System.IO.FileStream(signedDocumentFilePath, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite)) + using System; + using Telerik.Windows.Documents.Fixed.Model.Annotations; + using System.Security.Cryptography.X509Certificates; + using Telerik.Windows.Documents.Fixed.Model.Editing; + using Telerik.Windows.Documents.Fixed.Model.InteractiveForms; + using Telerik.Windows.Documents.Fixed.Model.Objects; + using Telerik.Windows.Documents.Fixed.Model.Resources; + using Telerik.Windows.Documents.Fixed.Model; + using Telerik.Windows.Documents.Fixed.Model.DigitalSignatures; + using System.Windows; + using System.IO; + + namespace ConsoleNetFramework { - new Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider().Export(document, output); + internal class Program + { + static void Main(string[] args) + { + int signatureFieldWidth = 200; + int signatureFieldHeight = 50; + int signaturePositionLeft = 10; + int signaturePositionTop = 10; + + X509Certificate2 certificate = new System.Security.Cryptography.X509Certificates.X509Certificate2("Certificate.pfx", "johndoe"); + SignatureField pdfSignature = new SignatureField("SignatureField"); + pdfSignature.Signature = new Signature(certificate); + + Form pdfForm = new Telerik.Windows.Documents.Fixed.Model.Objects.Form(); + pdfForm.FormSource = new FormSource(); + pdfForm.FormSource.Size = new Size(signatureFieldWidth, signatureFieldHeight); + FixedContentEditor editor = new FixedContentEditor(pdfForm.FormSource); + pdfForm.Position.Translate(signaturePositionLeft, signaturePositionTop); + editor.DrawText($"{certificate.GetNameInfo(X509NameType.SimpleName, false)} {DateTime.Now.ToString("yyyy.MM.dd HH:mm")}"); + + SignatureWidget signatureWidget = pdfSignature.Widgets.AddWidget(); + signatureWidget.Content.NormalContentSource = pdfForm.FormSource; + signatureWidget.Rect = new Rect(signaturePositionLeft,signaturePositionTop,signatureFieldWidth,signatureFieldHeight); + signatureWidget.RecalculateContent(); + + RadFixedDocument document = new RadFixedDocument(); + RadFixedPage pdfPage = document.Pages.AddPage(); + pdfPage.Annotations.Add(signatureWidget); + + FixedContentEditor pageEditor = new FixedContentEditor(pdfPage); + pageEditor.Position.Translate(signaturePositionLeft, signaturePositionTop); + pageEditor.DrawForm(pdfForm.FormSource); + document.AcroForm.FormFields.Add(pdfSignature); + signatureWidget.RecalculateContent(); + + string signedDocumentFilePath = "signed.pdf"; + File.Delete(signedDocumentFilePath); + using (System.IO.Stream output = new System.IO.FileStream(signedDocumentFilePath, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite)) + { + new Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider().Export(document, output); + } + } + } } {{endregion}} +>important In .NET Standard use __Telerik.Documents.Primitives.Rect__ instead of __System.Windows.Rect__. + ![Signed PDF](images/radpdfprocessing-features-digital-signature.png) >important When signing an existing document (after the import) we must be sure the AcroForm's ViewersShouldRecalculateWidgetAppearances property is set to false, otherwise, the exported and signed PDF document could not be shown as a signed. From ee9e1e919fd53992f1c3134a227e1fdab5227aa4 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Wed, 8 May 2024 15:42:45 +0300 Subject: [PATCH 03/16] Added namespaces to the FlowExtensibilityManager and NumberingFieldsProvider. --- .../concepts/fields/numbering-fields-provider.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/radwordsprocessing/concepts/fields/numbering-fields-provider.md b/libraries/radwordsprocessing/concepts/fields/numbering-fields-provider.md index a22d3c69..1654e2dc 100644 --- a/libraries/radwordsprocessing/concepts/fields/numbering-fields-provider.md +++ b/libraries/radwordsprocessing/concepts/fields/numbering-fields-provider.md @@ -23,7 +23,7 @@ The default provider can be set with the following code: {{region cs-radwordsprocessing-concepts- numbering-fields-provider_1}} - FlowExtensibilityManager.NumberingFieldsProvider = new NumberingFieldsProvider(); + Telerik.Windows.Documents.Flow.Extensibility.FlowExtensibilityManager.NumberingFieldsProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.NumberingFieldsProvider(); {{endregion}} @@ -35,7 +35,7 @@ This method allows you to use a custom numbering style converter. {{region cs-radwordsprocessing-concepts- numbering-fields-provider_2}} - NumberingFieldsProvider numberingFieldsProvider = new NumberingFieldsProvider(); + Telerik.Windows.Documents.Flow.FormatProviders.Pdf.NumberingFieldsProvider numberingFieldsProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.NumberingFieldsProvider(); numberingFieldsProvider.RegisterNumberingStyleConverter(NumberingStyle.ChineseCounting, new NumberingStyleConverter()); From 72c556196dc2c2866e40523658a26f3092b0f007 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Wed, 8 May 2024 15:53:53 +0300 Subject: [PATCH 04/16] Added namespaces for the example. Added note for NET Standard differences. --- .../form-fields/textboxfield.md | 52 +++++++++++++------ 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/libraries/radpdfprocessing/model/interactive-forms/form-fields/textboxfield.md b/libraries/radpdfprocessing/model/interactive-forms/form-fields/textboxfield.md index e87c4bec..599ba40e 100644 --- a/libraries/radpdfprocessing/model/interactive-forms/form-fields/textboxfield.md +++ b/libraries/radpdfprocessing/model/interactive-forms/form-fields/textboxfield.md @@ -43,26 +43,46 @@ TextBoxField exposes the following properties: #### **[C#] Example 1: Create a TextBoxField and add it to a page** {{region radpdfprocessing-model-interactive-forms-form-fields-textboxfield_0}} - TextBoxField textField = new TextBoxField("SampleTextBox") - { - MaxLengthOfInputCharacters = 500, - IsMultiline = true, - IsPassword = false, - IsFileSelect = false, - ShouldSpellCheck = true, - AllowScroll = true, - Value = "Sample content", - }; - - VariableContentWidget widget = textField.Widgets.AddWidget(); - widget.Rect = new Rect(new Size(250, 50)); - widget.RecalculateContent(); - document.AcroForm.FormFields.Add(textField); - document.Pages[0].Annotations.Add(widget); + using Telerik.Windows.Documents.Fixed.Model.Annotations; + using Telerik.Windows.Documents.Fixed.Model.InteractiveForms; + using Telerik.Windows.Documents.Fixed.Model; + using System.Windows; + + namespace ConsoleNetFramework + { + internal class Program + { + static void Main(string[] args) + { + RadFixedDocument fixedDocument = new RadFixedDocument(); + fixedDocument.Pages.AddPage(); + + TextBoxField textField = new TextBoxField("SampleTextBox") + { + MaxLengthOfInputCharacters = 500, + IsMultiline = true, + IsPassword = false, + IsFileSelect = false, + ShouldSpellCheck = true, + AllowScroll = true, + Value = "Sample content", + }; + + VariableContentWidget widget = textField.Widgets.AddWidget(); + widget.Rect = new Rect(new Size(250, 50)); + widget.RecalculateContent(); + + fixedDocument.AcroForm.FormFields.Add(textField); + fixedDocument.Pages[0].Annotations.Add(widget); + } + } + } {{endregion}} +>important In .NET Standard use __Telerik.Documents.Primitives.Rect__ instead of __System.Windows.Rect__. + ## See Also * [Form Field]({%slug radpdfprocessing-model-interactive-forms-form-fields %}) From 9cced6f014d96b02e97623d72a8e83748c5c4862 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Wed, 8 May 2024 16:02:02 +0300 Subject: [PATCH 05/16] Added code examples of the described functionality. --- libraries/radpdfprocessing/concepts/fonts.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/libraries/radpdfprocessing/concepts/fonts.md b/libraries/radpdfprocessing/concepts/fonts.md index 12cf457d..184f03db 100644 --- a/libraries/radpdfprocessing/concepts/fonts.md +++ b/libraries/radpdfprocessing/concepts/fonts.md @@ -37,6 +37,12 @@ There are 14 standard fonts that are not embedded in the document when you use t | Symbol| | ZapfDingbats| +{{region cs-radpdfprocessing-concepts-fonts_0}} + + FontBase helvetica = FontsRepository.Helvetica; + +{{endregion}} + ## Embedded Fonts All fonts, which are not included in the 14 standard ones, should be **embedded** in the PDF document. Otherwise, the result may be unpredictable when the document is rendered. In __RadPdfProcessing__ you have the ability to embed fonts following the approaches described below. @@ -51,7 +57,7 @@ __Example 1__ demonstrates how you can use the RegisterFont() method. #### __[C#] Example 1: Register font in .NET Framework application__ -{{region cs-radpdfprocessing-concepts-fonts_0}} +{{region cs-radpdfprocessing-concepts-fonts_1}} // Read the font file byte[] fontData = File.ReadAllBytes("some-font.ttf"); @@ -77,12 +83,20 @@ __Example 1__ demonstrates how you can use the RegisterFont() method. >tip Each registered font can be obtained from the font repository as __FontBase__ object and applied to a __[TextFragment]({%slug radpdfprocessing-model-textfragment%})__ through its __Font__ property. +{{region cs-radpdfprocessing-concepts-fonts_3}} + + FontBase courier = FontsRepository.Courier; + TextFragment textFragment = new TextFragment(); + textFragment.Font = courier; + +{{endregion}} + __Example 2__ shows how to create a font using the FontsRepository. #### __[C#] Example 2: Create FontBase__ -{{region cs-radpdfprocessing-concepts-fonts_1}} +{{region cs-radpdfprocessing-concepts-fonts_4}} FontBase font; bool success = FontsRepository.TryCreateFont(fontFamily, fontStyle, fontWeight, out font); {{endregion}} From 128ac13075edbca7cbd04f747da95142137923b5 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Tue, 14 May 2024 10:01:22 +0300 Subject: [PATCH 06/16] Renamed KB image in the correct format --- .../{quotedCsvValues.png => quoted-csv-values.png} | Bin .../quote-worksheet-values-and-csv-export.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename knowledge-base/images/{quotedCsvValues.png => quoted-csv-values.png} (100%) diff --git a/knowledge-base/images/quotedCsvValues.png b/knowledge-base/images/quoted-csv-values.png similarity index 100% rename from knowledge-base/images/quotedCsvValues.png rename to knowledge-base/images/quoted-csv-values.png diff --git a/knowledge-base/quote-worksheet-values-and-csv-export.md b/knowledge-base/quote-worksheet-values-and-csv-export.md index aea94a48..71945d20 100644 --- a/knowledge-base/quote-worksheet-values-and-csv-export.md +++ b/knowledge-base/quote-worksheet-values-and-csv-export.md @@ -64,7 +64,7 @@ using (StreamWriter writer = new StreamWriter(stream)) } } ``` -![Before - After quoting and exporting to CSV ](images/quotedCsvValus.png) +![Before - After quoting and exporting to CSV ](images/quoted-csv-values.png) ## See Also From 8cce61a31e7fed48b32deef20e1da19b6d0c4cb6 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Tue, 14 May 2024 11:30:42 +0300 Subject: [PATCH 07/16] Added context to RadFixedDocumentEditor examples --- .../editing/radfixeddocumenteditor.md | 66 ++++++++++++++----- 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md b/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md index aa1a1108..62b768a6 100644 --- a/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md +++ b/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md @@ -35,7 +35,12 @@ __Example 1__ demonstrates how a RadFixedDocumentEditor instance can be created. #### __[C#] Example 1: Create RadFixedDocumentEditor__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_0}} - RadFixedDocumentEditor editor = new RadFixedDocumentEditor(radFixedDocument); + RadFixedDocument radFixedDocument = new RadFixedDocument(); + RadFixedDocumentEditor radFixedDocumentEditor = new RadFixedDocumentEditor(radFixedDocument); + + //Use RadFixedDocumentEditor... + + radFixedDocumentEditor.Dispose(); {{endregion}} >__RadFixedDocumentEditor__ inherits from __IDisposable__ so it should be properly disposed when the document is created. Otherwise, some of the content may not be finished, i.e. it might not appear on the PDF document. @@ -61,6 +66,10 @@ The section properties are responsible for the page size, margins and orientatio * __Rotate180__: The page is rotated to 180°. * __Rotate270__: The page is rotated to 270°. +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_0}} + radFixedDocumentEditor.SectionProperties.PageSize = new Size(100,100); + radFixedDocumentEditor.SectionProperties.PageRotation = Telerik.Windows.Documents.Fixed.Model.Data.Rotation.Rotate90; +{{endregion}} ### Starting New Section @@ -73,7 +82,7 @@ Adding an additional section is achieved with the __InsertSectionBreak()__ metho #### __[C#] Example 2: Start a section__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_1}} - editor.InsertSectionBreak(); + radFixedDocumentEditor.InsertSectionBreak(); {{endregion}} @@ -85,7 +94,7 @@ All pages that have the same __SectionProperties__ are part of the current secti #### __[C#] Example 3: Start new page__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_2}} - editor.InsertPageBreak(); + radFixedDocumentEditor.InsertPageBreak(); {{endregion}} ## Paragraphs @@ -120,6 +129,12 @@ Similar to the section properties, paragraph has its own properties that are res * __ListLevel__: The list level the paragraph belongs to. +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_2}} + radFixedDocumentEditor.ParagraphProperties.SpacingAfter = 10; + radFixedDocumentEditor.ParagraphProperties.LineSpacingType = HeightType.Auto; + adFixedDocumentEditor.ParagraphProperties.BackgroundColor = new RgbColor(0, 100, 0); + radFixedDocumentEditor.ParagraphProperties.HorizontalAlignment = Telerik.Windows.Documents.Fixed.Model.Editing.Flow.HorizontalAlignment.Center; +{{endregion}} ### Starting New Paragraph @@ -132,11 +147,10 @@ In order to start a new paragraph, use the code in __Example 4__. #### __[C#] Example 4: Start a paragraph__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_3}} - editor.InsertParagraph(); + radFixedDocumentEditor.InsertParagraph(); {{endregion}} - The result of this method is that a new paragraph is started and it uses the current paragraph properties. Until a new paragraph is started, changes in the paragraph properties are not applied. @@ -174,6 +188,15 @@ The character properties that are responsible for the look of the runs are liste * __UnderlineColor__: The color of the underline. +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_3}} + radFixedDocumentEditor.CharacterProperties.FontSize = 12; + radFixedDocumentEditor.CharacterProperties.Font = FontsRepository.Courier; + radFixedDocumentEditor.CharacterProperties.HighlightColor = new RgbColor(10, 100, 80); + radFixedDocumentEditor.CharacterProperties.BaselineAlignment = Telerik.Windows.Documents.Fixed.Model.Editing.Flow.BaselineAlignment.Subscript; + radFixedDocumentEditor.CharacterProperties.UnderlinePattern = Telerik.Windows.Documents.Fixed.Model.Editing.Flow.UnderlinePattern.Single; +{{endregion}} + +>In order for the character properties to be respected, make sure to set them __before__ inserting the Run. ### Inserting a Run @@ -183,8 +206,8 @@ There are a number of overloads that insert a run. The code snippet in __Example #### __[C#] Example 5: Insert run__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_4}} - editor.InsertRun("text"); - editor.InsertRun(fontFamily, "text"); + radFixedDocumentEditor.InsertRun("text"); + radFixedDocumentEditor.InsertRun(new FontFamily("Helvetica"),"text"); {{endregion}} @@ -199,11 +222,10 @@ The code in __Example 6__ inserts a new run and a line break after it. #### __[C#] Example 6: Insert run and line break__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_5}} - editor.InsertLine("Line of text"); + radFixedDocumentEditor.InsertLine("Line of text"); {{endregion}} - ### Images Image inline is a combination of an [ImageSource]({%slug radpdfprocessing-model-imagesource%}) object and its desired size. @@ -216,8 +238,9 @@ You can insert image inline using one of the following methods: #### __[C#] Example 7: Insert image__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_6}} - editor.InsertImageInline(imageSource); - editor.InsertImageInline(imageSource, size); + ImageSource imageSource = new ImageSource(new FileStream("image.jpeg", FileMode.Open)); + radFixedDocumentEditor.InsertImageInline(imageSource); + radFixedDocumentEditor.InsertImageInline(imageSource, new Size(100, 100)); {{endregion}} ## Tables @@ -228,7 +251,11 @@ The __Table__ class implements the __IBlockElement__ interface and an instance o #### __[C#] Example 8: Insert table__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_7}} - editor.InsertTable(table); + Table table = new Table(); + TableRow firstRow = table.Rows.AddTableRow(); + firstRow.Cells.AddTableCell().Blocks.AddBlock().InsertText("cellText"); + + radFixedDocumentEditor.InsertTable(table); {{endregion}} For more detailed information on tables, check the [Table]({%slug radpdfprocessing-editing-table%}) documentation article. @@ -240,7 +267,10 @@ The [IBlockElement](https://docs.telerik.com/devtools/document-processing/api/Te #### __[C#] Example 9: Insert Block element__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_8}} - editor.InsertBlock(blockElement); + Block block = new Block(); + block.InsertText("Text"); + + radFixedDocumentEditor.InsertBlock(block); {{endregion}} @@ -252,10 +282,10 @@ The following code snippet shows how to add a new list to __RadFixedDocumentEdit #### __[C#] Example 10: Insert list__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_9}} - List list = editor.Lists.AddList(ListTemplateType.NumberedDefault); - editor.ParagraphProperties.ListId = list.Id; - editor.ParagraphProperties.ListLevel = 0; - editor.InsertParagraph(); + List list = radFixedDocumentEditor.Lists.AddList(ListTemplateType.NumberedDefault); + radFixedDocumentEditor.ParagraphProperties.ListId = list.Id; + radFixedDocumentEditor.ParagraphProperties.ListLevel = 0; + radFixedDocumentEditor.InsertParagraph(); {{endregion}} More detailed information about lists is available in the [List documentation article]({%slug radpdfprocessing-editing-list%}). @@ -266,7 +296,7 @@ With the RadFixedDocumentEditor class you can insert a Form (Form-XObject) eleme #### __[C#] Example 11: Insert a form__ {{region cs-radpdfprocessing-editing-radfixeddocumenteditor_10}} - editor.InsertFormInline(formSource); + radFixedDocumentEditor.InsertFormInline(formSource); {{endregion}} There is an additional overload of InsertFormInline() that enables you to pass the size that should be used for the form. From 16d953b8c4dcd186daa6945fb33db819f52b1c86 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Tue, 14 May 2024 11:49:55 +0300 Subject: [PATCH 08/16] Added more context to WordsProcessing TableCell examples --- libraries/radwordsprocessing/model/tablecell.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/libraries/radwordsprocessing/model/tablecell.md b/libraries/radwordsprocessing/model/tablecell.md index 4ca71f9b..de77e8be 100644 --- a/libraries/radwordsprocessing/model/tablecell.md +++ b/libraries/radwordsprocessing/model/tablecell.md @@ -21,7 +21,11 @@ You can use the code snippet from __Example 1__ to create a __TableCell__ and ad #### __[C#] Example 1: Create a TableCell object and add it to a TableRow__ {{region cs-radwordsprocessing-model-tablecell_0}} - TableCell cell = new TableCell(document); + RadFlowDocument radFlowDocument = new RadFlowDocument(); + Table table = radFlowDocument.Sections.AddSection().Blocks.AddTable(); + TableRow row = table.Rows.AddTableRow(); + + TableCell cell = new TableCell(radFlowDocument); row.Cells.Add(cell); {{endregion}} @@ -38,7 +42,6 @@ To create a __TableCell__ and add it in the document tree in the same time, you {{endregion}} - ## Modifying a TableCell The __TableCell__ element exposes several properties that allow you to customize its layout. A part of these properties are Style properties and some of the values represent a themable object. @@ -96,6 +99,14 @@ The __TableCell__ element exposes several properties that allow you to customize * __GridRowIndex__: Represents the row index of the cell in the table grid. +{{region cs-radwordsprocessing-model-tablecell_2}} + Border border = new Border(1, BorderStyle.Single, new ThemableColor(Colors.Blue)); + cell.Borders = new Telerik.Windows.Documents.Flow.Model.Styles.TableCellBorders(border, border, border, border); + cell.Shading.BackgroundColor = new ThemableColor(Colors.Red); + cell.Padding = new Telerik.Windows.Documents.Primitives.Padding(20,20,20,20); + cell.VerticalAlignment = VerticalAlignment.Bottom; + cell.TextDirection = TextDirection.LeftToRightTopToBottom; +{{endregion}} ## Operating with a TableCell @@ -107,7 +118,7 @@ __Example 3__ demonstrates how to add a __Paragraph__ to a __TableCell__. #### __[C#] Example 3: Add a paragraph to a TableCell__ -{{region cs-radwordsprocessing-model-tablecell_2}} +{{region cs-radwordsprocessing-model-tablecell_3}} Paragraph paragraph = cell.Blocks.AddParagraph(); {{endregion}} From 67c75123179b96afbcd600fa81195bf2a4b7a615 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Tue, 14 May 2024 11:52:09 +0300 Subject: [PATCH 09/16] Fixed examples region numbering --- .../editing/radfixeddocumenteditor.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md b/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md index 62b768a6..ab50b1fe 100644 --- a/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md +++ b/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md @@ -66,7 +66,7 @@ The section properties are responsible for the page size, margins and orientatio * __Rotate180__: The page is rotated to 180°. * __Rotate270__: The page is rotated to 270°. -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_0}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_1}} radFixedDocumentEditor.SectionProperties.PageSize = new Size(100,100); radFixedDocumentEditor.SectionProperties.PageRotation = Telerik.Windows.Documents.Fixed.Model.Data.Rotation.Rotate90; {{endregion}} @@ -81,7 +81,7 @@ Adding an additional section is achieved with the __InsertSectionBreak()__ metho #### __[C#] Example 2: Start a section__ -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_1}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_2}} radFixedDocumentEditor.InsertSectionBreak(); {{endregion}} @@ -93,7 +93,7 @@ Adding an additional section is achieved with the __InsertSectionBreak()__ metho All pages that have the same __SectionProperties__ are part of the current section. To start a new page, you can use the following code: #### __[C#] Example 3: Start new page__ -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_2}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_3}} radFixedDocumentEditor.InsertPageBreak(); {{endregion}} @@ -129,7 +129,7 @@ Similar to the section properties, paragraph has its own properties that are res * __ListLevel__: The list level the paragraph belongs to. -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_2}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_4}} radFixedDocumentEditor.ParagraphProperties.SpacingAfter = 10; radFixedDocumentEditor.ParagraphProperties.LineSpacingType = HeightType.Auto; adFixedDocumentEditor.ParagraphProperties.BackgroundColor = new RgbColor(0, 100, 0); @@ -146,7 +146,7 @@ In order to start a new paragraph, use the code in __Example 4__. #### __[C#] Example 4: Start a paragraph__ -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_3}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_5}} radFixedDocumentEditor.InsertParagraph(); {{endregion}} @@ -188,7 +188,7 @@ The character properties that are responsible for the look of the runs are liste * __UnderlineColor__: The color of the underline. -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_3}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_6}} radFixedDocumentEditor.CharacterProperties.FontSize = 12; radFixedDocumentEditor.CharacterProperties.Font = FontsRepository.Courier; radFixedDocumentEditor.CharacterProperties.HighlightColor = new RgbColor(10, 100, 80); @@ -205,7 +205,7 @@ There are a number of overloads that insert a run. The code snippet in __Example #### __[C#] Example 5: Insert run__ -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_4}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_7}} radFixedDocumentEditor.InsertRun("text"); radFixedDocumentEditor.InsertRun(new FontFamily("Helvetica"),"text"); {{endregion}} @@ -221,7 +221,7 @@ The code in __Example 6__ inserts a new run and a line break after it. #### __[C#] Example 6: Insert run and line break__ -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_5}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_8}} radFixedDocumentEditor.InsertLine("Line of text"); {{endregion}} @@ -237,7 +237,7 @@ You can insert image inline using one of the following methods: #### __[C#] Example 7: Insert image__ -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_6}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_9}} ImageSource imageSource = new ImageSource(new FileStream("image.jpeg", FileMode.Open)); radFixedDocumentEditor.InsertImageInline(imageSource); radFixedDocumentEditor.InsertImageInline(imageSource, new Size(100, 100)); @@ -250,7 +250,7 @@ The __Table__ class implements the __IBlockElement__ interface and an instance o #### __[C#] Example 8: Insert table__ -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_7}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_10}} Table table = new Table(); TableRow firstRow = table.Rows.AddTableRow(); firstRow.Cells.AddTableCell().Blocks.AddBlock().InsertText("cellText"); @@ -266,7 +266,7 @@ The [IBlockElement](https://docs.telerik.com/devtools/document-processing/api/Te #### __[C#] Example 9: Insert Block element__ -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_8}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_11}} Block block = new Block(); block.InsertText("Text"); @@ -281,7 +281,7 @@ You can easily insert list items with __RadFixedDocumentEditor__. The first thin The following code snippet shows how to add a new list to __RadFixedDocumentEditor’s ListCollection__ and after that insert a paragraph with the corresponding list properties: #### __[C#] Example 10: Insert list__ -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_9}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_12}} List list = radFixedDocumentEditor.Lists.AddList(ListTemplateType.NumberedDefault); radFixedDocumentEditor.ParagraphProperties.ListId = list.Id; radFixedDocumentEditor.ParagraphProperties.ListLevel = 0; @@ -295,7 +295,7 @@ More detailed information about lists is available in the [List documentation ar With the RadFixedDocumentEditor class you can insert a Form (Form-XObject) element. #### __[C#] Example 11: Insert a form__ -{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_10}} +{{region cs-radpdfprocessing-editing-radfixeddocumenteditor_13}} radFixedDocumentEditor.InsertFormInline(formSource); {{endregion}} From f7e7fd437ccc166e7d3f760d598f8cce40e91f33 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Tue, 14 May 2024 13:11:21 +0300 Subject: [PATCH 10/16] Fixed typo --- .../features/embedded-file-streams/embedded-file-streams.md | 2 +- .../features/embedded-file-streams/embeddedfilescollection.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md b/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md index 5571e849..8387423a 100644 --- a/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md +++ b/libraries/radpdfprocessing/features/embedded-file-streams/embedded-file-streams.md @@ -49,7 +49,7 @@ RadPdfProcessing provides support for embedding of [ZUGFeRD](https://de.wikipedi using (RadFixedDocumentEditor editor = new RadFixedDocumentEditor(document)) { editor.CharacterProperties.TrySetFont(new System.Windows.Media.FontFamily("Calibri")); - editor.InsertRun("PDF/A-3B Complaint Invoice"); + editor.InsertRun("PDF/A-3B Compliant Invoice"); }; byte[] bytes = File.ReadAllBytes(@"zugferd-invoice.xml"); document.EmbeddedFiles.AddZugferdInvoice(bytes); diff --git a/libraries/radpdfprocessing/features/embedded-file-streams/embeddedfilescollection.md b/libraries/radpdfprocessing/features/embedded-file-streams/embeddedfilescollection.md index ef478f5c..de87b143 100644 --- a/libraries/radpdfprocessing/features/embedded-file-streams/embeddedfilescollection.md +++ b/libraries/radpdfprocessing/features/embedded-file-streams/embeddedfilescollection.md @@ -28,5 +28,5 @@ This class holds a collection of **EmbeddedFile** instances, assigned to the **E |**Add(string name, byte[] data)**|Adds a named embedded file with the specified name and value to the collection and returns it.| |**ContainsName(string name)**|Determines whether the collection contains the specified name.| |**Clear**|Removes all embedded files from the collection.| -|**AddZugferdInvoice(byte[] data)**|Adds an embedded ZUGFeRD complaint file to the collection and returns it. The Conformance level is set to Basic. *Only a single XML invoice attachment is allowed in ZUGFeRD.*| +|**AddZugferdInvoice(byte[] data)**|Adds an embedded ZUGFeRD compliant file to the collection and returns it. The Conformance level is set to Basic. *Only a single XML invoice attachment is allowed in ZUGFeRD.*| |**RemoveZugferdInvoice()**|Removes the embedded ZUGFeRD file with the specified name from the collection.| From 238fad266fa83dfe7a8d4be65ee5e98bb87efc0a Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Tue, 14 May 2024 13:34:54 +0300 Subject: [PATCH 11/16] Add explicit namespace to FloatingImage --- libraries/radspreadprocessing/features/shapes-and-images.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/radspreadprocessing/features/shapes-and-images.md b/libraries/radspreadprocessing/features/shapes-and-images.md index d7b04e4a..7bb24c6b 100644 --- a/libraries/radspreadprocessing/features/shapes-and-images.md +++ b/libraries/radspreadprocessing/features/shapes-and-images.md @@ -103,11 +103,10 @@ In order to create an instance of __FloatingImage__ you need the worksheet in wh {{region cs-radspreadprocessing-features-shapes-and-images_0}} Worksheet worksheet = workbook.ActiveWorksheet; - FloatingImage image = new FloatingImage(worksheet, new CellIndex(7, 1), 35, 10); + Telerik.Windows.Documents.Spreadsheet.Model.Shapes.FloatingImage image = new Telerik.Windows.Documents.Spreadsheet.Model.Shapes.FloatingImage(worksheet, new CellIndex(7, 1), 35, 10); {{endregion}} - The next step is to configure the other properties of the image as needed. From 504b1a6569d8c2a722f95b53ccd9e0291a42f70e Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Tue, 14 May 2024 14:20:28 +0300 Subject: [PATCH 12/16] Updated "WordsProcessing: PDF Features" article --- .../formats-and-conversion/pdf/features.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/radwordsprocessing/formats-and-conversion/pdf/features.md b/libraries/radwordsprocessing/formats-and-conversion/pdf/features.md index 813aa503..5dea3397 100644 --- a/libraries/radwordsprocessing/formats-and-conversion/pdf/features.md +++ b/libraries/radwordsprocessing/formats-and-conversion/pdf/features.md @@ -256,7 +256,7 @@ Yes Continuous Section Breaks - +No @@ -281,7 +281,7 @@ Yes Columns - +No @@ -329,7 +329,7 @@ Yes Floating Tables - +No @@ -411,7 +411,7 @@ Yes Conditional Table Styles - +No @@ -513,21 +513,21 @@ Result fragment is exported. Comments - +No Protection - +No Track Changes - +No @@ -541,7 +541,7 @@ Track Changes Bookmarks - +No From 59035373e608e112c716bb5936381917b2e8d2c0 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Tue, 14 May 2024 14:49:03 +0300 Subject: [PATCH 13/16] Referenced export methods in the "See Also" section. --- libraries/radpdfprocessing/model/radfixeddocument.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/radpdfprocessing/model/radfixeddocument.md b/libraries/radpdfprocessing/model/radfixeddocument.md index 3f2b7716..43d879d4 100644 --- a/libraries/radpdfprocessing/model/radfixeddocument.md +++ b/libraries/radpdfprocessing/model/radfixeddocument.md @@ -108,3 +108,5 @@ __RadFixedDocument__ exposes a __DocumentInfo__ property of type __RadFixedDocum * [Model]({%slug radpdfprocessing-model-general-information%}) * [RadFixedPage]({%slug radpdfprocessing-model-radfixedpage%}) * [Annotations]({%slug radpdfprocessing-model-annotations-overview%}) +* [Export to PDF]({%slug radpdfprocessing-formats-and-conversion-pdf-pdfformatprovider%}) +* [Export to Image]({%slug radpdfprocessing-formats-and-conversion-image-using-skiaimageformatprovider%}) \ No newline at end of file From 8187c9362341e98d3110e99ade76b774e76a58c0 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Tue, 14 May 2024 15:16:33 +0300 Subject: [PATCH 14/16] Modified CsvFormatProvider implementation to expose "Settings" property --- .../formats-and-conversion/csv/csvformatprovider.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/radspreadprocessing/formats-and-conversion/csv/csvformatprovider.md b/libraries/radspreadprocessing/formats-and-conversion/csv/csvformatprovider.md index fa9e922b..c12476a8 100644 --- a/libraries/radspreadprocessing/formats-and-conversion/csv/csvformatprovider.md +++ b/libraries/radspreadprocessing/formats-and-conversion/csv/csvformatprovider.md @@ -34,7 +34,7 @@ __Example 1__ shows how to import a CSV file using a __FileStream__. The code as } Workbook workbook; - IWorkbookFormatProvider formatProvider = new CsvFormatProvider(); + CsvFormatProvider formatProvider = new CsvFormatProvider(); using (Stream input = new FileStream(fileName, FileMode.Open)) { @@ -56,7 +56,7 @@ __Example 2__ demonstrates how to export an existing Workbook to a CSV file. The workbook.Worksheets.Add(); string fileName = "SampleFile.csv"; - IWorkbookFormatProvider formatProvider = new CsvFormatProvider(); + CsvFormatProvider formatProvider = new CsvFormatProvider(); using (Stream output = new FileStream(fileName, FileMode.Create)) { From 55685b5a4b8d1808cc6e902dde8cbad241384cd2 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Wed, 26 Jun 2024 15:59:55 +0300 Subject: [PATCH 15/16] Removed abstract implementation of watermark example. --- libraries/radwordsprocessing/concepts/watermark.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/radwordsprocessing/concepts/watermark.md b/libraries/radwordsprocessing/concepts/watermark.md index 1c82941e..58743328 100644 --- a/libraries/radwordsprocessing/concepts/watermark.md +++ b/libraries/radwordsprocessing/concepts/watermark.md @@ -72,7 +72,7 @@ Creating image watermark is very similar to creating a text one. __Example 2__ s Angle = 45, Width = 50, Height = 75, - ImageSource = new Telerik.Windows.Documents.Media.ImageSource(imageStream, "png") + ImageSource = new Telerik.Windows.Documents.Media.ImageSource(new FileStream("sample.jpeg", FileMode.Open), "jpeg") }); {{endregion}} From d1950caf18c958c838838cd6ea295cb0964ff2c0 Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Wed, 26 Jun 2024 16:02:19 +0300 Subject: [PATCH 16/16] Added namespace to SpreadProcessing culture example --- libraries/radspreadprocessing/features/setting-the-culture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/radspreadprocessing/features/setting-the-culture.md b/libraries/radspreadprocessing/features/setting-the-culture.md index 34fec2c3..b61901e8 100644 --- a/libraries/radspreadprocessing/features/setting-the-culture.md +++ b/libraries/radspreadprocessing/features/setting-the-culture.md @@ -15,7 +15,7 @@ __RadSpreadProcessing__ allows you to set a culture that differs from the curren {{region cs-radspreadprocessing-features-setting-the-culture_1}} - FormatHelper.CultureHelper = new SpreadsheetCultureHelper(new CultureInfo("en-US")); + Telerik.Windows.Documents.Spreadsheet.Formatting.FormatHelper.CultureHelper = new SpreadsheetCultureHelper(new CultureInfo("en-US")); {{endregion}}