Skip to content

Commit 098d357

Browse files
committed
Added Barcode implementation to FormSource article.
1 parent 4d45a0b commit 098d357

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

libraries/radpdfprocessing/model/formsource.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,29 @@ documentPageEditor.Position.Translate(offset, svgHostForm.Size.Height + offset);
125125
documentPageEditor.DrawForm(svgHostForm, new Size(desiredSVGWidth, calculatedSVGHeight));
126126
//draw the SVG with desired width preserving the aspect ratio
127127
```
128-
![PdfProcessing Insert SVG](images/pdf-processing-insert-svg.png)
128+
![PdfProcessing Insert SVG](images/pdf-processing-insert-svg.png)
129+
130+
## Adding Barcode into a Document
131+
132+
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:
133+
134+
* **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**.
135+
136+
* **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**.
137+
138+
* **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).
139+
140+
* **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.
141+
142+
* **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**.
143+
144+
* **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**.
145+
146+
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%}):
147+
148+
<snippet id='libraries-pdf-model-formsource-adding-barcode'/>
149+
150+
![PdfProcessing Insert Barcode](images/pdf-processing-insert-barcode.png)
129151

130152
## See Also
131153

Loading

release-notes/2024/release-notes-2024-4-1106.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Version 2024.4.1106 (Q4 2024)
3-
page_title: What is new in 2024.4.1106 (Q4 2024) for the Document Processing Libraries
4-
description: 2024.4.1106 (Q4 2024)
2+
title: Version 2024.4.1106 (2024 Q4)
3+
page_title: What is new in 2024.4.1106 (2024 Q4) for the Document Processing Libraries
4+
description: 2024.4.1106 (2024 Q4)
55
slug: release-notes-2024-4-1106
66
tags: 2024.4.1106,Q4,2024
77
published: True

0 commit comments

Comments
 (0)