From a11e3d0b4657677d3a12db4c6a0ace5c08548471 Mon Sep 17 00:00:00 2001 From: Desislava Yordanova Date: Wed, 2 Apr 2025 15:30:38 +0300 Subject: [PATCH 1/5] add the changes from Yoan --- .../model/annotations/stamp.md | 4 +- .../model/annotations/text-markup.md | 2 +- .../model/annotations/text.md | 4 +- .../model/annotations/widgets.md | 4 +- libraries/radpdfprocessing/model/form.md | 6 +- .../radpdfprocessing/model/formsource.md | 151 ------------------ .../model/formsource/barcode.md | 32 ++++ .../images/pdf-processing-insert-barcode.png | Bin 0 -> 3171 bytes .../images/pdf-processing-insert-svg.png | Bin 0 -> 5068 bytes .../model/formsource/overview.md | 99 ++++++++++++ .../radpdfprocessing/model/formsource/svg.md | 46 ++++++ libraries/radpdfprocessing/model/image.md | 2 +- .../radpdfprocessing/model/imagesource.md | 2 +- .../dynamic-appearance-properties.md | 8 +- 14 files changed, 193 insertions(+), 167 deletions(-) delete mode 100644 libraries/radpdfprocessing/model/formsource.md create mode 100644 libraries/radpdfprocessing/model/formsource/barcode.md create mode 100644 libraries/radpdfprocessing/model/formsource/images/pdf-processing-insert-barcode.png create mode 100644 libraries/radpdfprocessing/model/formsource/images/pdf-processing-insert-svg.png create mode 100644 libraries/radpdfprocessing/model/formsource/overview.md create mode 100644 libraries/radpdfprocessing/model/formsource/svg.md diff --git a/libraries/radpdfprocessing/model/annotations/stamp.md b/libraries/radpdfprocessing/model/annotations/stamp.md index 003facb2..c1a0bb21 100644 --- a/libraries/radpdfprocessing/model/annotations/stamp.md +++ b/libraries/radpdfprocessing/model/annotations/stamp.md @@ -61,7 +61,7 @@ The [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) o ### Creating a StampAnnotation with Appearance -The **AnnotationContentSource** class, accessed by the **Content** property of the annotation object, represents the [FormSource]({%slug radpdfprocessing-model-formsource%}) instances used for displaying the widget content. The following example shows how to create a custom Stamp annotation and change its visual appearance: +The **AnnotationContentSource** class, accessed by the **Content** property of the annotation object, represents the [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) instances used for displaying the widget content. The following example shows how to create a custom Stamp annotation and change its visual appearance: >important When creating a custom stamp name (not from the predefined names), it is important to start the name with "#". Otherwise, if the stamp is moved in Adobe, its appearance will be rewritten. @@ -114,4 +114,4 @@ The **AnnotationContentSource** class, accessed by the **Content** property of t * [AcroForm]({%slug radpdfprocessing-model-interactive-forms-acroform %}) * [FormField]({%slug radpdfprocessing-model-interactive-forms-form-fields%}) * [Annotations Overview]({%slug radpdfprocessing-model-annotations-overview%}) -* [FormSource]({%slug radpdfprocessing-model-formsource%}) \ No newline at end of file +* [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) \ No newline at end of file diff --git a/libraries/radpdfprocessing/model/annotations/text-markup.md b/libraries/radpdfprocessing/model/annotations/text-markup.md index db2bb44b..8510d267 100644 --- a/libraries/radpdfprocessing/model/annotations/text-markup.md +++ b/libraries/radpdfprocessing/model/annotations/text-markup.md @@ -170,4 +170,4 @@ Depending on the TextMarkupAnnotationType the respective type of the TextMarkup * [AcroForm]({%slug radpdfprocessing-model-interactive-forms-acroform %}) * [FormField]({%slug radpdfprocessing-model-interactive-forms-form-fields%}) * [Annotations Overview]({%slug radpdfprocessing-model-annotations-overview%}) -* [FormSource]({%slug radpdfprocessing-model-formsource%}) +* [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) diff --git a/libraries/radpdfprocessing/model/annotations/text.md b/libraries/radpdfprocessing/model/annotations/text.md index 9a434de7..285e153b 100644 --- a/libraries/radpdfprocessing/model/annotations/text.md +++ b/libraries/radpdfprocessing/model/annotations/text.md @@ -62,7 +62,7 @@ The FixedContentEditor offers the public **DrawTextAnnotation** method which cre ### Creating a TextAnnotation with Appearance -The **AnnotationContentSource** class, accessed by the **Content** property of the annotation object, represents the [FormSource]({%slug radpdfprocessing-model-formsource%}) instances used for displaying the widget content. The following example shows how to change the annotation's visual appearance when the mouse is not interacting with the widget (**NormalContentSource**) and when the mouse is over the widget (**MouseOverContentSource**): +The **AnnotationContentSource** class, accessed by the **Content** property of the annotation object, represents the [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) instances used for displaying the widget content. The following example shows how to change the annotation's visual appearance when the mouse is not interacting with the widget (**NormalContentSource**) and when the mouse is over the widget (**MouseOverContentSource**): ```csharp private RadFixedDocument CreateTextAnnotation() @@ -116,4 +116,4 @@ It is possible to modify the content source displayed when the mouse button is p * [AcroForm]({%slug radpdfprocessing-model-interactive-forms-acroform %}) * [FormField]({%slug radpdfprocessing-model-interactive-forms-form-fields%}) * [Annotations Overview]({%slug radpdfprocessing-model-annotations-overview%}) -* [FormSource]({%slug radpdfprocessing-model-formsource%}) +* [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) diff --git a/libraries/radpdfprocessing/model/annotations/widgets.md b/libraries/radpdfprocessing/model/annotations/widgets.md index 253346f0..54f84eef 100644 --- a/libraries/radpdfprocessing/model/annotations/widgets.md +++ b/libraries/radpdfprocessing/model/annotations/widgets.md @@ -31,7 +31,7 @@ Widget annotations are used for visual representation of some [FormField]({%slug All widgets have two type of content properties: -* **AnnotationContentSource properties**: Properties of this type provide three [FormSource]({%slug radpdfprocessing-model-formsource%}) instances for the three mouse interactions with the widget – normal (no mouse interaction) source, mouse over source and mouse down source. The AnnotationContentSource is usually taken with higher priority when visualizing the widget in a PDF viewer. +* **AnnotationContentSource properties**: Properties of this type provide three [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) instances for the three mouse interactions with the widget – normal (no mouse interaction) source, mouse over source and mouse down source. The AnnotationContentSource is usually taken with higher priority when visualizing the widget in a PDF viewer. There are two exceptional cases when these properties are ignored in favor of the Dynamic appearance properties. * The first exceptional case is when the widget is visualizing some variable content which is dynamically modified by the user interaction. @@ -149,4 +149,4 @@ This class inherits the [TwoStatesButtonWidget](#twostatesbuttonwidget-class) cl * [AcroForm]({%slug radpdfprocessing-model-interactive-forms-acroform %}) * [FormField]({%slug radpdfprocessing-model-interactive-forms-form-fields%}) * [Annotations Overview]({%slug radpdfprocessing-model-annotations-overview%}) -* [FormSource]({%slug radpdfprocessing-model-formsource%}) +* [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) diff --git a/libraries/radpdfprocessing/model/form.md b/libraries/radpdfprocessing/model/form.md index 285082ea..ac21a7fd 100644 --- a/libraries/radpdfprocessing/model/form.md +++ b/libraries/radpdfprocessing/model/form.md @@ -46,7 +46,7 @@ __Example 2__ demonstrates how to use one of the factory methods of the __Conten >tipThere are other methods that allow adding a form to a document by passing it size and source. They could be used through the [FixedContentEditor class]({%slug radpdfprocessing-editing-fixedcontenteditor%}). ->You can add content to the form by setting its FormSource property. The API allows you also to directly pass the FormSource to a method which will automatically generate a form in the document content. For more information on this topic, check the [FormSource]({%slug radpdfprocessing-model-formsource%}) article. +>You can add content to the form by setting its FormSource property. The API allows you also to directly pass the FormSource to a method which will automatically generate a form in the document content. For more information on this topic, check the [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) article. ## Form Properties @@ -54,7 +54,7 @@ __Example 2__ demonstrates how to use one of the factory methods of the __Conten You can modify a __Form__ element using the properties the class exposes. The properties are listed below. -* __FormSource__: Specifies the content that will be visualized in the Form object. It is of type [**FormSource**]({%slug radpdfprocessing-model-formsource%}). +* __FormSource__: Specifies the content that will be visualized in the Form object. It is of type [**FormSource**]({%slug radpdfprocessing-model-formsource-overview%}). * __Clipping__: Gets or sets the clipping of the form object. @@ -106,7 +106,7 @@ You can modify a __Form__ element using the properties the class exposes. The pr ## See Also - * [Form Source]({%slug radpdfprocessing-model-formsource%}) + * [Form Source]({%slug radpdfprocessing-model-formsource-overview%}) * [RadFixedPage]({%slug radpdfprocessing-model-radfixedpage%}) * [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) * [Position]({%slug radpdfprocessing-concepts-position%}) diff --git a/libraries/radpdfprocessing/model/formsource.md b/libraries/radpdfprocessing/model/formsource.md deleted file mode 100644 index 7b84552f..00000000 --- a/libraries/radpdfprocessing/model/formsource.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: Form Source -description: Learn how to add content, SVG images or barcodes into a PDF document using RadPdfProcessing. -page_title: Form Source -slug: radpdfprocessing-model-formsource -tags: formsource -published: True -position: 7 ---- - -# FormSource - -With **FormSource** you can add content to a [Form]({%slug radpdfprocessing-model-form%}) object, which will be inserted in the PDF document. This article explains the following topics: - -* [Creating a FormSource](#creating-a-formsource) -* [FormSource Properties](#properties) -* [Adding Content to a FormSource Object](#adding-content-to-a-formsource-object) -* [Inserting a FormSource into a Document](#inserting-a-formsource-into-a-document) - - -## Creating a FormSource - -The FormSource class exposes a default constructor which you can use to create an empty instance. - -#### __[C#] Example 1: Create FormSource__ - -{{region cs-radpdfprocessing-model-formsource_0}} - FormSource formSource = new FormSource(); -{{endregion}} - -The snippet from **Example 1** will create an empty FormSource object. To fill this object with content you can use [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) as described later in this article. - -The properties exposed by the **FormSource** class are as follows: -|Property|Description| -|----|----| -|**Size**|Allows getting or setting the size of the form.| -|**Content**|Gets the contents of the form.| - -## Adding Content to a FormSource Object - -The FormSource class inherits from the IContentRootElement interface. This inheritance allows you to use the [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) class for filling the content of the form. - -**Example 2** shows you how you can insert a content into a FormSource object using FixedContentEditor. - -#### __[C#] Example 2: Add content to a FormSource__ - -{{region cs-radpdfprocessing-model-formsource_1}} - FormSource simpleForm = new FormSource(); - simpleForm.Size = new Size(310, 250); - - FixedContentEditor formEditor = new FixedContentEditor(simpleForm); - formEditor.Position.Translate(50, 60); - - using (formEditor.SaveProperties()) - { - formEditor.GraphicProperties.IsFilled = true; - formEditor.GraphicProperties.IsStroked = true; - formEditor.GraphicProperties.StrokeThickness = 2; - formEditor.GraphicProperties.StrokeColor = new RgbColor(92, 229, 0); - formEditor.GraphicProperties.FillColor = new RgbColor( 213, 222, 226); - formEditor.GraphicProperties.StrokeDashArray = new double[] { 17, 4 }; - formEditor.DrawRectangle(new Rect(new Size(250, 150))); - } - - formEditor.Position.Translate(100, 120); - formEditor.DrawText("Sample rectangle in a form"); -{{endregion}} - -## Inserting a FormSource into a Document - -After generating the FormSource object and filling it with content, you should insert it in the document. The API provides you with convenient approaches that might be useful to easily insert the form in different scenarios. - ->You can reuse a single FormSource object among the document by setting it to different [Form]({%slug radpdfprocessing-model-form%}) instances. - -* In addition to the ability to fill a form source, the FixedContentEditor allows you to add this form to a container. - - - #### __[C#] Example 3: Add a FormSource to a document using FixedContentEditor__ - - {{region cs-radpdfprocessing-model-formsource_2}} - FixedContentEditor documentPageEditor = new FixedContentEditor(document.Pages.AddPage()); - - FormSource simpleForm = new FormSource(); - // Fill the FormSource instance with content (you can use the code from Example 2) - - documentPageEditor.DrawForm(simpleForm); - - {{endregion}} - - There are several overloads of the DrawForm() method that enables you to specify the size of the form. - -* A FormSource object can be inserted using the methods of **RadFixedDocumentEditor**. The InsertFormInline() method is described in the [RadFixedDocumentEditor]({%slug radpdfprocessing-editing-radfixeddocumenteditor%}) topic. - -* When editing a Block, you can insert a FormSource object directly into it. For more information, check [this topic]({%slug radpdfprocessing-editing-block%}). - -## Adding SVG into a Document - -As of **Q3 2024** RadPdfProcessing provides support for SVG (vector graphics image format). The static FormSource.**FromSvg** method allows the possibility to insert a vector image in the PDF document. The following overloads are publicly available: - -|Method|Description| -|----|----| -|**FormSource.FromSvg(string xml)**|Creates a FormSource object from an SVG file provided as a xml.| -|**FormSource.FromSvg(byte[] svgData)**|Creates a FormSource object from an SVG file provided as a byte[].| -|**FormSource.FromSvg(Stream stream)**|Creates a FormSource object from an SVG file provided as a stream.| - -The following example shows how to insert an SVG image into a FormSource object using FixedContentEditor: - -```csharp -string svgFilePath = "image.svg"; -RadFixedDocument fixedDocument = new RadFixedDocument(); -FixedContentEditor documentPageEditor = new FixedContentEditor(fixedDocument.Pages.AddPage()); -int offset = 10; -documentPageEditor.Position.Translate(offset, offset); - -FormSource svgHostForm = FormSource.FromSvg(File.ReadAllBytes(svgFilePath)); -documentPageEditor.DrawForm(svgHostForm); -//draw the SVG with its original size - -double aspectRatio = svgHostForm.Size.Width / svgHostForm.Size.Height; -//get the aspect ratio from the original SVG size -double desiredSVGWidth = 100; -double calculatedSVGHeight = desiredSVGWidth / aspectRatio; -documentPageEditor.Position.Translate(offset, svgHostForm.Size.Height + offset); -documentPageEditor.DrawForm(svgHostForm, new Size(desiredSVGWidth, calculatedSVGHeight)); -//draw the SVG with desired width preserving the aspect ratio -``` -![PdfProcessing Insert SVG](images/pdf-processing-insert-svg.png) - -## Adding Barcode into a Document - -As of **Q1 2025** RadPdfProcessing provides support for adding Barcodes (1D and 2D) into a PDF document. This is possible through the static FormSource.**FromBarcode** and FormSource.**From2DBarcode** methods. They utilize the **Symbology1DType** and **Symbology2DType** enums that represent the different types of 1D and 2D barcode symbologies supported by the barcode model. These are the publicly available overloads: - -|Method|Description| -|----|----| -|**FormSource.FromBarcode(Symbology1DType symbology, string value)**|Creates a **FormSource** object from a one-dimensional (1D) barcode parameters, with a default **Width** and **Height** of **100**.| -|**FormSource.FromBarcode(Symbology1DType symbology, string value, int width, int height)**|Creates a **FormSource** object from a one-dimensional (1D) barcode parameters with custom **Width** and **Height**.| -|**FormSource.FromBarcode(Symbology1DType symbology, string value, int width, int height, bool showText)**|Creates a **FormSource** object from a one-dimensional (1D) barcode parameters with custom **Width** and **Height** while specifying whether the text should be shown or not (**showText** is **false** by default).| -|**FormSource.FromBarcode(Symbology1DType symbology, string value, bool showText)**|Creates a **FormSource** object from a one-dimensional (1D) barcode parameters while specifying whether the text should be shown or not (**showText** is **false** by default). **Width** and **Height** are **100** by default.| -|**FormSource.From2DBarcode(Symbology2DType symbology, string value)**|Creates a **FormSource** object from a two-dimensional (2D) barcode parameters, with a default **Width** and **Height** of **100**.| -|**FormSource.From2DBarcode(Symbology2DType symbology, string value, int width, int height)**|Creates a **FormSource** object from a two-dimensional (2D) barcode parameters, with custom **Width** and **Height**.| - -The following example shows how to create a **Barcode** as a **FormSource** object and insert it in a page using the [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}): - - - -![PdfProcessing Insert Barcode](images/pdf-processing-insert-barcode.png) - -## See Also - - * [Form]({%slug radpdfprocessing-model-form%}) - * [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) diff --git a/libraries/radpdfprocessing/model/formsource/barcode.md b/libraries/radpdfprocessing/model/formsource/barcode.md new file mode 100644 index 00000000..ba1a35f9 --- /dev/null +++ b/libraries/radpdfprocessing/model/formsource/barcode.md @@ -0,0 +1,32 @@ +title: Barcode +description: Learn how to add barcodes into a PDF document using RadPdfProcessing. +page_title: Barcode FormSource +slug: radpdfprocessing-model-formsource-barcode +tags: formsource, pdfprocessing, document, processing, pdf, barcode +published: True +position: 2 +--- + +# Barcode FormSource + +As of **Q1 2025** RadPdfProcessing provides support for adding Barcodes (1D and 2D) into a PDF document. This is possible through the static FormSource.**FromBarcode** and FormSource.**From2DBarcode** methods. They utilize the **Symbology1DType** and **Symbology2DType** enums that represent the different types of 1D and 2D barcode symbologies supported by the barcode model. These are the publicly available overloads: + +|Method|Description| +|----|----| +|**FormSource.FromBarcode(Symbology1DType symbology, string value)**|Creates a **FormSource** object from a one-dimensional (1D) barcode parameters, with a default **Width** and **Height** of **100**.| +|**FormSource.FromBarcode(Symbology1DType symbology, string value, int width, int height)**|Creates a **FormSource** object from a one-dimensional (1D) barcode parameters with custom **Width** and **Height**.| +|**FormSource.FromBarcode(Symbology1DType symbology, string value, int width, int height, bool showText)**|Creates a **FormSource** object from a one-dimensional (1D) barcode parameters with custom **Width** and **Height** while specifying whether the text should be shown or not (**showText** is **false** by default).| +|**FormSource.FromBarcode(Symbology1DType symbology, string value, bool showText)**|Creates a **FormSource** object from a one-dimensional (1D) barcode parameters while specifying whether the text should be shown or not (**showText** is **false** by default). **Width** and **Height** are **100** by default.| +|**FormSource.From2DBarcode(Symbology2DType symbology, string value)**|Creates a **FormSource** object from a two-dimensional (2D) barcode parameters, with a default **Width** and **Height** of **100**.| +|**FormSource.From2DBarcode(Symbology2DType symbology, string value, int width, int height)**|Creates a **FormSource** object from a two-dimensional (2D) barcode parameters, with custom **Width** and **Height**.| + +The following example shows how to create a **Barcode** as a **FormSource** object and insert it in a page using the [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}): + + + +![PdfProcessing Insert Barcode](images/pdf-processing-insert-barcode.png) + +## See Also + + * [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) + * [SVG]({%slug radpdfprocessing-model-formsource-svg%}) \ No newline at end of file diff --git a/libraries/radpdfprocessing/model/formsource/images/pdf-processing-insert-barcode.png b/libraries/radpdfprocessing/model/formsource/images/pdf-processing-insert-barcode.png new file mode 100644 index 0000000000000000000000000000000000000000..7c984e5a08d31f7866c980fb2f5fa3f8a198a523 GIT binary patch literal 3171 zcmaJ?YdDna8h#yO6q;hU6>2C+DN4y9r^&I2NRg!(m2=im#vx}(C}|v$h!7#i<$M^8 zT9TL?l4uNLRWmdO!;CS;g#FoTb?vqGUf2Hdz2Em;&vQM`{oMEczV97d8w;t8J2nCU zq^vAW&jKJU1byRRV$dp-_C5xBNnEpZ!U3>JX8jQYS=n;yG2B@TB&h6FU_d{jo+j2N z094~QeZRZ`%388AH92=fXlBfyT*_MR<$SXrH7+5+G9fP|&laJyblhYmMmN9Ol7R-iIn)d$SODJtVAL1j4C>OfzFQH7xsQ_xU0U{hMR1$`Ww zqs-mMUXwE(T|Eo{;*=;vjOkqj0MV9PL;--St#hMn1_!{n5GD*jf-FPNXaW>)=E|+4LW&@R3F~D4o6M`Xu?agpK)3HK|FkT?ke|3at8!( zPa!(3!ZWmbJb&|Ang4inzvjPN{|^(VB}JoS9>Eh%+!`{6f|9W&O=5(rip}CC241`A zDbnj~-4g{chsP(&0;fp_ceCCl4I(2(merZQyRST@NIPQEfG4o~Y z*Yn-IlqU!PuD*;A)=YrXA#u%x!Al5=AvWR379q*4kk%qT7xYFW@waqE$XP$Do{#C+ zyJ#O61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cj#{@i9Ba0Nd_so+M9={er@3Aqh27*ikQ{SO-C#?yC%xjI;J|n{# zG;*rGmrEOlit|3v%2z*CyK3tszuznYVj&1_XbBi?>F83jqlEb&1l&4{_EsD$l-Ux= zvTxgqv7VAR;Tprl)^%%&-JEEMkXeqM_>?9?e?XgYcg{3IFd4A~x8|(1VBT(i1la~R zk7Unz938GSBJiUQcJ}lox;=4W6q-KIc%Zfx@HDU2>>A!~@p;C-Mv{3tShP&FjzPzI}uO@qbXJNI_q%Uj}`Lv`0`J^MyNyHswT z6}Q3$h{RA;Vvd}e6Y%`PB#->_*NkpkZ_aj*w{buS79)vA0Yut#CFX_RUXYw0-1Q!n z{M!IuIJG_Fa>zK%fII)y!a0t{Ko9Us%@Vh9yKxKykDyx#@d6V(#XbO*qdQ+My zQ$bz+3zKyb=@lpk#c&FJMx#P~d|p6BQHFTi_c9-iYR}wAqr_RpHMwsiQm;6^om>15KJo7b3Q+@M_?H)>_s9k+U<_@yFs z*mdri$ODBBgkaWmA7`@fIO*X*&O;^c+{{T*asd(x?F*B$7^F~ aL>V*Ul)($1s+ literal 0 HcmV?d00001 diff --git a/libraries/radpdfprocessing/model/formsource/images/pdf-processing-insert-svg.png b/libraries/radpdfprocessing/model/formsource/images/pdf-processing-insert-svg.png new file mode 100644 index 0000000000000000000000000000000000000000..baafbdbfc628583117e8c18d0110c105fab9cace GIT binary patch literal 5068 zcmb`LS6EX^w8sNT?YJu~}T|Czn!+q333lVoh9LrcX;1pokO^>m@8gc41#LJBg% zQ!*HTpHL7zGu6=m)PDkP6B@VN)D6`EfTmRHzi?7Qn-ZaG^9%r>8~WFXMtt8o0|3l$ zJ*c{Q2yEB>9Lb`^xvb`96BzvEO5F}>KJ4^?8Ubvue}(`v+ERV!)xT6s&w%ow#Mb3^`RC-;|? zWKFPM2vCoD)3*IJabay)YkaWr$f5LH*9j?Ar0NS^!7SrrI}*O@k8XeHu}OdhSVk~v#`=k;UW`d!;I{x112|AyRL)N2QQ2)4n#d|6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C@)1po`<4AEn8;9yC_S8pop|&j`PN zsdDAM8;SE#$aNQIHO#obP6~nl>rp%Nw=#c4A3aZU`=~|K_1WdU)ydd!#oo4bWYoQ6 zP@OE<=yILqfGRZ)R}w?SBMyBy409$Mlo7dyRErDNlilx((}^g*p~cGIaOqbC zd}8r|-A$lgwzW6t5nM{jPMhXAk0~&0rXe*rWq3L8XQJ4)x<>4WWm!RJ=#}_1m#Et; zce&av=|JupzCzP6eDg#$L!29@b@@&0d-qG=zWXAVzA#+5oubN$d zcY%VIW}jyQ?}cQ@m))?+S1O~SSPlvUxl*VFI-pH1M7 zQy*bDcH%vkW4o{mT3+V++ja_4HZ&J3!7J1aLbPZ~^7hDbOrt&f&axD&-Gy{jz>vz6DICn-jhcRwBA1~+QFb`LGF3@CthFb zf1zwAa2ilgMZTIu?&E$x`N$#vutUCZ3Pf~<&+LLm6DfLPx+vNV$Dt98f(dtsx zwG0XYbl25?Od`{a&8{3Pvo98U5xSR@Y3A3_v!${`AcWGE&k-@rJZ_%76CaE5LM3?jweXa(+3bhu-^ zCwwukQh67JkaZwZjwSaKB@^q&(Ly{(%rp;iOnek)%qQlFk^n^KETr5$9Q2pJn?dlD zO!HkN9zst;Sm~XRSjL|;;zVSN={eLxJ-Q?wJcg{4`fPKf20M+zt_mh+Djl>ugm@NH zntVB%_Cqq=z+^ZEX7?@|g^_ z5YErjJ6(wM4~gp0Jh1rAF?2$cm@kTR?AWNmB18k?dbf-t@??wN=4lEOk1en)MHxy} z2xd|i2FWm7o?$n9zry!^do%C=HUB2A$2o;Hil!$KN3gE@h9~SJXzR7Ikx((6-ySC4 xDPEwH8PL$5Jn?*RYEuYP>)rpy3JLUv+>C`MA~R=7m~aCJ(9<%4)@wM#{tx|NiQxbM literal 0 HcmV?d00001 diff --git a/libraries/radpdfprocessing/model/formsource/overview.md b/libraries/radpdfprocessing/model/formsource/overview.md new file mode 100644 index 00000000..fae68c3c --- /dev/null +++ b/libraries/radpdfprocessing/model/formsource/overview.md @@ -0,0 +1,99 @@ +title: Form Source +description: Learn how to add content, SVG images or barcodes into a PDF document using RadPdfProcessing. +page_title: Form Source +slug: radpdfprocessing-model-formsource-overview +tags: formsource, pdfprocessing, document, processing, pdf +published: True +position: 0 +--- + +# FormSource + +With **FormSource** you can add content to a [Form]({%slug radpdfprocessing-model-form%}) object, which will be inserted in the PDF document. This article explains the following topics: + +* [Creating a FormSource](#creating-a-formsource) +* [FormSource Properties](#properties) +* [Adding Content to a FormSource Object](#adding-content-to-a-formsource-object) +* [Inserting a FormSource into a Document](#inserting-a-formsource-into-a-document) + +>note The **FormSource** content can also be an [SVG]({%slug radpdfprocessing-model-formsource-svg%}) image or a [Barcode]({%slug radpdfprocessing-model-formsource-barcode%}). + +## Creating a FormSource + +The FormSource class exposes a default constructor which you can use to create an empty instance. + +#### __[C#] Example 1: Create FormSource__ + +{{region cs-radpdfprocessing-model-formsource_0}} + FormSource formSource = new FormSource(); +{{endregion}} + +The snippet from **Example 1** will create an empty FormSource object. To fill this object with content you can use [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) as described later in this article. + +The properties exposed by the **FormSource** class are as follows: +|Property|Description| +|----|----| +|**Size**|Allows getting or setting the size of the form.| +|**Content**|Gets the contents of the form.| + +## Adding Content to a FormSource Object + +The FormSource class inherits from the IContentRootElement interface. This inheritance allows you to use the [FixedContentEditor]({%slug radpdfprocessing-editing-fixedcontenteditor%}) class for filling the content of the form. + +**Example 2** shows you how you can insert a content into a FormSource object using FixedContentEditor. + +#### __[C#] Example 2: Add content to a FormSource__ + +{{region cs-radpdfprocessing-model-formsource_1}} + FormSource simpleForm = new FormSource(); + simpleForm.Size = new Size(310, 250); + + FixedContentEditor formEditor = new FixedContentEditor(simpleForm); + formEditor.Position.Translate(50, 60); + + using (formEditor.SaveProperties()) + { + formEditor.GraphicProperties.IsFilled = true; + formEditor.GraphicProperties.IsStroked = true; + formEditor.GraphicProperties.StrokeThickness = 2; + formEditor.GraphicProperties.StrokeColor = new RgbColor(92, 229, 0); + formEditor.GraphicProperties.FillColor = new RgbColor( 213, 222, 226); + formEditor.GraphicProperties.StrokeDashArray = new double[] { 17, 4 }; + formEditor.DrawRectangle(new Rect(new Size(250, 150))); + } + + formEditor.Position.Translate(100, 120); + formEditor.DrawText("Sample rectangle in a form"); +{{endregion}} + +## Inserting a FormSource into a Document + +After generating the FormSource object and filling it with content, you should insert it in the document. The API provides you with convenient approaches that might be useful to easily insert the form in different scenarios. + +>You can reuse a single FormSource object among the document by setting it to different [Form]({%slug radpdfprocessing-model-form%}) instances. + +* In addition to the ability to fill a form source, the FixedContentEditor allows you to add this form to a container. + + + #### __[C#] Example 3: Add a FormSource to a document using FixedContentEditor__ + + {{region cs-radpdfprocessing-model-formsource_2}} + FixedContentEditor documentPageEditor = new FixedContentEditor(document.Pages.AddPage()); + + FormSource simpleForm = new FormSource(); + // Fill the FormSource instance with content (you can use the code from Example 2) + + documentPageEditor.DrawForm(simpleForm); + + {{endregion}} + + There are several overloads of the DrawForm() method that enables you to specify the size of the form. + +* A FormSource object can be inserted using the methods of **RadFixedDocumentEditor**. The InsertFormInline() method is described in the [RadFixedDocumentEditor]({%slug radpdfprocessing-editing-radfixeddocumenteditor%}) topic. + +* When editing a Block, you can insert a FormSource object directly into it. For more information, check [this topic]({%slug radpdfprocessing-editing-block%}). + +## See Also + + * [SVG]({%slug radpdfprocessing-model-formsource-svg%}) + * [Barcode]({%slug radpdfprocessing-model-formsource-barcode%}) \ No newline at end of file diff --git a/libraries/radpdfprocessing/model/formsource/svg.md b/libraries/radpdfprocessing/model/formsource/svg.md new file mode 100644 index 00000000..8ec12358 --- /dev/null +++ b/libraries/radpdfprocessing/model/formsource/svg.md @@ -0,0 +1,46 @@ +title: SVG +description: Learn how to add SVG images into a PDF document using RadPdfProcessing. +page_title: SVG FormSource +slug: radpdfprocessing-model-formsource-svg +tags: formsource, pdfprocessing, document, processing, pdf, svg +published: True +position: 1 +--- + +# SVG FormSource + +As of **Q3 2024** RadPdfProcessing provides support for SVG (vector graphics image format). The static FormSource.**FromSvg** method allows the possibility to insert a vector image in the PDF document. The following overloads are publicly available: + +|Method|Description| +|----|----| +|**FormSource.FromSvg(string xml)**|Creates a FormSource object from an SVG file provided as a xml.| +|**FormSource.FromSvg(byte[] svgData)**|Creates a FormSource object from an SVG file provided as a byte[].| +|**FormSource.FromSvg(Stream stream)**|Creates a FormSource object from an SVG file provided as a stream.| + +The following example shows how to insert an SVG image into a FormSource object using FixedContentEditor: + +```csharp +string svgFilePath = "image.svg"; +RadFixedDocument fixedDocument = new RadFixedDocument(); +FixedContentEditor documentPageEditor = new FixedContentEditor(fixedDocument.Pages.AddPage()); +int offset = 10; +documentPageEditor.Position.Translate(offset, offset); + +FormSource svgHostForm = FormSource.FromSvg(File.ReadAllBytes(svgFilePath)); +documentPageEditor.DrawForm(svgHostForm); +//draw the SVG with its original size + +double aspectRatio = svgHostForm.Size.Width / svgHostForm.Size.Height; +//get the aspect ratio from the original SVG size +double desiredSVGWidth = 100; +double calculatedSVGHeight = desiredSVGWidth / aspectRatio; +documentPageEditor.Position.Translate(offset, svgHostForm.Size.Height + offset); +documentPageEditor.DrawForm(svgHostForm, new Size(desiredSVGWidth, calculatedSVGHeight)); +//draw the SVG with desired width preserving the aspect ratio +``` +![PdfProcessing Insert SVG](images/pdf-processing-insert-svg.png) + +## See Also + + * [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) + * [Barcode]({%slug radpdfprocessing-model-formsource-barcode%}) \ No newline at end of file diff --git a/libraries/radpdfprocessing/model/image.md b/libraries/radpdfprocessing/model/image.md index 3ab8d6c8..cbd6986c 100644 --- a/libraries/radpdfprocessing/model/image.md +++ b/libraries/radpdfprocessing/model/image.md @@ -21,7 +21,7 @@ You can edit an __Image__ element using the properties the class exposes. The pr * __Position__: The [Position]({%slug radpdfprocessing-concepts-position%}) of the image inside the __IContainerElement__. * __AlphaConstant__: Specifying the constant shape or constant opacity value to be used for nonstroking operations. ->note As of **Q3 2024** RadPdfProcessing provides support for SVG (vector graphics image format): [Adding SVG into a Document](https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/model/formsource#adding-svg-into-a-document). +>note As of **Q3 2024** RadPdfProcessing provides support for SVG (vector graphics image format): [Adding SVG into a Document]({%slug radpdfprocessing-model-formsource-svg%}). __Example 1__ shows how to initialize an Image object, assigns an ImageSource to it and add it to a previously defined container (page). diff --git a/libraries/radpdfprocessing/model/imagesource.md b/libraries/radpdfprocessing/model/imagesource.md index 968e31cb..c819e471 100644 --- a/libraries/radpdfprocessing/model/imagesource.md +++ b/libraries/radpdfprocessing/model/imagesource.md @@ -99,5 +99,5 @@ __RadPdfProcessing__ exposes an extension method allowing you to convert every B ## See Also * [Image]({%slug radpdfprocessing-model-image%}) - * [Adding SVG into a Document](https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/model/formsource#adding-svg-into-a-document) + * [Adding SVG into a Document]({%slug radpdfprocessing-model-formsource-svg%}) * [ImageSource API Reference](https://docs.telerik.com/devtools/document-processing/api/Telerik.Windows.Documents.Fixed.Model.Resources.ImageSource.html) diff --git a/libraries/radpdfprocessing/model/interactive-forms/dynamic-appearance-properties.md b/libraries/radpdfprocessing/model/interactive-forms/dynamic-appearance-properties.md index db50a806..ba45203e 100644 --- a/libraries/radpdfprocessing/model/interactive-forms/dynamic-appearance-properties.md +++ b/libraries/radpdfprocessing/model/interactive-forms/dynamic-appearance-properties.md @@ -80,11 +80,11 @@ This class inherits ButtonAppearanceCharacteristics and is used by [PushButtonWi * **MouseDownCaption**: The text drawn when the mouse is pressed on the button. -* **NormalIconSource**: [FormSource]({%slug radpdfprocessing-model-formsource%}) that is used for drawing a button icon when the mouse is not interacting with widget. +* **NormalIconSource**: [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) that is used for drawing a button icon when the mouse is not interacting with widget. -* **MouseOverIcon**: [FormSource]({%slug radpdfprocessing-model-formsource%}) that is used for drawing a button icon when the mouse is over the widget. +* **MouseOverIcon**: [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) that is used for drawing a button icon when the mouse is over the widget. -* **MouseDownIcon**: [FormSource]({%slug radpdfprocessing-model-formsource%}) that is used for drawing a button icon when the mouse is pressed on the widget. +* **MouseDownIcon**: [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) that is used for drawing a button icon when the mouse is pressed on the widget. * **IconAndCaptionPosition**: Property specifying how to position the button icon relatively to the button caption. @@ -95,4 +95,4 @@ This class inherits ButtonAppearanceCharacteristics and is used by [PushButtonWi * [Widgets]({%slug radpdfprocessing-model-annotations-widgets %}) * [AcroForm]({%slug radpdfprocessing-model-interactive-forms-acroform %}) -* [FormSource]({%slug radpdfprocessing-model-formsource%}) \ No newline at end of file +* [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) \ No newline at end of file From 844a00b6fcad762fc45ff4b3f09febc6ec87a690 Mon Sep 17 00:00:00 2001 From: Desislava Yordanova Date: Wed, 2 Apr 2025 15:39:26 +0300 Subject: [PATCH 2/5] Add new line at the end of the file --- libraries/radpdfprocessing/model/annotations/stamp.md | 2 +- libraries/radpdfprocessing/model/formsource/barcode.md | 3 ++- libraries/radpdfprocessing/model/formsource/overview.md | 3 ++- libraries/radpdfprocessing/model/formsource/svg.md | 3 ++- .../model/interactive-forms/dynamic-appearance-properties.md | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libraries/radpdfprocessing/model/annotations/stamp.md b/libraries/radpdfprocessing/model/annotations/stamp.md index c1a0bb21..edad6dea 100644 --- a/libraries/radpdfprocessing/model/annotations/stamp.md +++ b/libraries/radpdfprocessing/model/annotations/stamp.md @@ -114,4 +114,4 @@ The **AnnotationContentSource** class, accessed by the **Content** property of t * [AcroForm]({%slug radpdfprocessing-model-interactive-forms-acroform %}) * [FormField]({%slug radpdfprocessing-model-interactive-forms-form-fields%}) * [Annotations Overview]({%slug radpdfprocessing-model-annotations-overview%}) -* [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) \ No newline at end of file +* [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) diff --git a/libraries/radpdfprocessing/model/formsource/barcode.md b/libraries/radpdfprocessing/model/formsource/barcode.md index ba1a35f9..c80c4cf3 100644 --- a/libraries/radpdfprocessing/model/formsource/barcode.md +++ b/libraries/radpdfprocessing/model/formsource/barcode.md @@ -29,4 +29,5 @@ The following example shows how to create a **Barcode** as a **FormSource** obje ## See Also * [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) - * [SVG]({%slug radpdfprocessing-model-formsource-svg%}) \ No newline at end of file + * [SVG]({%slug radpdfprocessing-model-formsource-svg%}) + \ No newline at end of file diff --git a/libraries/radpdfprocessing/model/formsource/overview.md b/libraries/radpdfprocessing/model/formsource/overview.md index fae68c3c..2a108fa9 100644 --- a/libraries/radpdfprocessing/model/formsource/overview.md +++ b/libraries/radpdfprocessing/model/formsource/overview.md @@ -96,4 +96,5 @@ After generating the FormSource object and filling it with content, you should i ## See Also * [SVG]({%slug radpdfprocessing-model-formsource-svg%}) - * [Barcode]({%slug radpdfprocessing-model-formsource-barcode%}) \ No newline at end of file + * [Barcode]({%slug radpdfprocessing-model-formsource-barcode%}) + \ No newline at end of file diff --git a/libraries/radpdfprocessing/model/formsource/svg.md b/libraries/radpdfprocessing/model/formsource/svg.md index 8ec12358..efdd898a 100644 --- a/libraries/radpdfprocessing/model/formsource/svg.md +++ b/libraries/radpdfprocessing/model/formsource/svg.md @@ -43,4 +43,5 @@ documentPageEditor.DrawForm(svgHostForm, new Size(desiredSVGWidth, calculatedSVG ## See Also * [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) - * [Barcode]({%slug radpdfprocessing-model-formsource-barcode%}) \ No newline at end of file + * [Barcode]({%slug radpdfprocessing-model-formsource-barcode%}) + \ No newline at end of file diff --git a/libraries/radpdfprocessing/model/interactive-forms/dynamic-appearance-properties.md b/libraries/radpdfprocessing/model/interactive-forms/dynamic-appearance-properties.md index ba45203e..e87bca02 100644 --- a/libraries/radpdfprocessing/model/interactive-forms/dynamic-appearance-properties.md +++ b/libraries/radpdfprocessing/model/interactive-forms/dynamic-appearance-properties.md @@ -95,4 +95,4 @@ This class inherits ButtonAppearanceCharacteristics and is used by [PushButtonWi * [Widgets]({%slug radpdfprocessing-model-annotations-widgets %}) * [AcroForm]({%slug radpdfprocessing-model-interactive-forms-acroform %}) -* [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) \ No newline at end of file +* [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) From 7ee8b79c4f6df461abdb0cee39580995ad817b16 Mon Sep 17 00:00:00 2001 From: Desislava Yordanova Date: Wed, 2 Apr 2025 16:05:17 +0300 Subject: [PATCH 3/5] fix slugs --- libraries/radpdfprocessing/editing/block.md | 2 +- libraries/radpdfprocessing/editing/fixedcontenteditor.md | 2 +- libraries/radpdfprocessing/editing/radfixeddocumenteditor.md | 2 +- .../radpdfprocessing/features/digital-signature/overview.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/radpdfprocessing/editing/block.md b/libraries/radpdfprocessing/editing/block.md index e62f85cf..b3325a87 100644 --- a/libraries/radpdfprocessing/editing/block.md +++ b/libraries/radpdfprocessing/editing/block.md @@ -119,7 +119,7 @@ The Form (or also known as Form-XObject) is an object that can contain PDF conte There are two more overloads of InsertForm() that enables you to pass the size that should be used for the form. ->For more information on how to create a form, check the [Form]({%slug radpdfprocessing-model-form%}) and [FormSource]({%slug radpdfprocessing-model-formsource%}) articles. +>For more information on how to create a form, check the [Form]({%slug radpdfprocessing-model-form%}) and [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) articles. ### Changing Current Styles diff --git a/libraries/radpdfprocessing/editing/fixedcontenteditor.md b/libraries/radpdfprocessing/editing/fixedcontenteditor.md index fe02cd7c..4930b3f6 100644 --- a/libraries/radpdfprocessing/editing/fixedcontenteditor.md +++ b/libraries/radpdfprocessing/editing/fixedcontenteditor.md @@ -207,7 +207,7 @@ With the FixedContentEditor class you can insert a Form (Form-XObject) element. There are two more overloads of DrawForm() that enable you to pass the size that should be used for the form. ->For more information on how to create a form, check the [Form]({%slug radpdfprocessing-model-form%}) and [FormSource]({%slug radpdfprocessing-model-formsource%}) articles. +>For more information on how to create a form, check the [Form]({%slug radpdfprocessing-model-form%}) and [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) articles. ### Inserting Widgets diff --git a/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md b/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md index a6ad7f95..a18f8ae8 100644 --- a/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md +++ b/libraries/radpdfprocessing/editing/radfixeddocumenteditor.md @@ -313,7 +313,7 @@ With the RadFixedDocumentEditor class you can insert a Form (Form-XObject) eleme There is an additional overload of InsertFormInline() that enables you to pass the size that should be used for the form. ->For more information on how to create a form, check the [Form]({%slug radpdfprocessing-model-form%}) and [FormSource]({%slug radpdfprocessing-model-formsource%}) articles. +>For more information on how to create a form, check the [Form]({%slug radpdfprocessing-model-form%}) and [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) articles. ## See Also diff --git a/libraries/radpdfprocessing/features/digital-signature/overview.md b/libraries/radpdfprocessing/features/digital-signature/overview.md index 6b2d8389..bedb2853 100644 --- a/libraries/radpdfprocessing/features/digital-signature/overview.md +++ b/libraries/radpdfprocessing/features/digital-signature/overview.md @@ -21,7 +21,7 @@ To sign a document, follow the steps: 2\. When instantiated, add the **Signature** to the document's content using a [SignatureField]({%slug radpdfprocessing-model-interactive-forms-form-fields-signaturefield%}). -3\. To create a signature, which has a visual representation, you must create a [SignatureWidget]({%slug radpdfprocessing-model-annotations-widgets%}) and associate the Widget annotation with the signed [SignatureField]({%slug radpdfprocessing-model-interactive-forms-form-fields-signaturefield%}). The widget also needs a [FormSource]({%slug radpdfprocessing-model-formsource%}) object applied to its Content.**NormalContentSource** property. A **FormSource** could be filled with data using the FixedContentEditor. +3\. To create a signature, which has a visual representation, you must create a [SignatureWidget]({%slug radpdfprocessing-model-annotations-widgets%}) and associate the Widget annotation with the signed [SignatureField]({%slug radpdfprocessing-model-interactive-forms-form-fields-signaturefield%}). The widget also needs a [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) object applied to its Content.**NormalContentSource** property. A **FormSource** could be filled with data using the FixedContentEditor. >caution When exporting a digitally signed document, a stream that allows both, reading and writing, should be passed. Otherwise, an exception is thrown: *NotSupportedException: 'Stream does not support reading.'*. From 54f0b506bf8d8179b2551abe7243e374cfa0b4dd Mon Sep 17 00:00:00 2001 From: Desislava Yordanova Date: Wed, 2 Apr 2025 16:13:58 +0300 Subject: [PATCH 4/5] edit config --- _config.yml | 3 +++ libraries/radpdfprocessing/model/formsource/svg.md | 1 + 2 files changed, 4 insertions(+) diff --git a/_config.yml b/_config.yml index 1f8ad6da..aba99e41 100644 --- a/_config.yml +++ b/_config.yml @@ -255,6 +255,9 @@ navigation: libraries/radpdfprocessing/model/annotations: title: Annotations position: 7 + libraries/radpdfprocessing/model/formsource: + title: FormSource + position: 9 ## RadZipLibrary Start "*radziplibrary": title: RadZipLibrary diff --git a/libraries/radpdfprocessing/model/formsource/svg.md b/libraries/radpdfprocessing/model/formsource/svg.md index efdd898a..11710397 100644 --- a/libraries/radpdfprocessing/model/formsource/svg.md +++ b/libraries/radpdfprocessing/model/formsource/svg.md @@ -44,4 +44,5 @@ documentPageEditor.DrawForm(svgHostForm, new Size(desiredSVGWidth, calculatedSVG * [FormSource]({%slug radpdfprocessing-model-formsource-overview%}) * [Barcode]({%slug radpdfprocessing-model-formsource-barcode%}) + \ No newline at end of file From d662a9400a90b866fe6016178ebf3eb64f7563f2 Mon Sep 17 00:00:00 2001 From: Desislava Yordanova Date: Wed, 2 Apr 2025 16:20:39 +0300 Subject: [PATCH 5/5] add --- --- libraries/radpdfprocessing/model/formsource/overview.md | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/radpdfprocessing/model/formsource/overview.md b/libraries/radpdfprocessing/model/formsource/overview.md index 2a108fa9..aa2d94ff 100644 --- a/libraries/radpdfprocessing/model/formsource/overview.md +++ b/libraries/radpdfprocessing/model/formsource/overview.md @@ -1,3 +1,4 @@ +--- title: Form Source description: Learn how to add content, SVG images or barcodes into a PDF document using RadPdfProcessing. page_title: Form Source