BarcodeSignOptions class
Leave feedback
On this page
Represents the barcode signature options.
Learn more
- Basic usage of creating Barcode electronic signature by GroupDocs.Signature: https://docs.groupdocs.com/display/signaturenet/eSign+document+with+Barcode+signature
- Advanced usage of settings of Barcode electronic signature with GroupDocs.Signature: https://docs.groupdocs.com/display/signaturenet/Sign+document+with+Barcode+signature+and+additional+settings
The BarcodeSignOptions type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the BarcodeSignOptions class with default values. |
| init | Initializes a new instance of the BarcodeSignOptions class with text. |
| init | Initializes a new instance of the BarcodeSignOptions class with text. |
| Property | Description |
|---|---|
| code_text_alignment | The alignment of text in the resulting barcode image. Default value is None. |
| encode_type | The barcode type. |
| fore_color | The foreground color of the barcode bars; using it may cause verification problems, so use it carefully. |
| height | The height of the signature area on the document page in measure units (pixels, percents, or millimeters). See MeasureType for size measure type. |
| horizontal_alignment | The horizontal alignment of the image on a document page. |
| inner_margins | The space between barcode elements and result image borders. |
| left | The left X position of the signature area on the document page, expressed in measurement units (pixels, percents, or millimeters). See MeasureType. |
| location_measure_type | The measure type (pixels, percents or millimeters) for left and top properties. |
| margin | The space that is specified by default between the image and document edges (applies when horizontal or vertical alignment is set). |
| margin_measure_type | The margin measurement type (pixels, percents or millimeters). |
| return_content | The flag indicating whether to retrieve the barcode image content of a signature placed on a document page. |
| return_content_type | The file type of the returned image content of the Barcode signature when the return_content property is enabled. |
| rotation_angle | The rotation angle clockwise. |
| size_measure_type | The measure type (pixels, percents or millimeters) for Width and Height properties. |
| stretch | The stretch mode on the document page. |
| top | The top Y position of the signature area on the document page in measure units (pixels, percents, or millimeters). See MeasureType LocationMeasureType. |
| transparency | The transparency of the barcode signature, ranging from 0.0 (fully opaque) to 1.0 (fully transparent); default is 0. |
| vertical_alignment | The vertical alignment of the barcode image on a document page. |
| width | The width of the signature area on the document page in measure values (pixels, percents, or millimeters) as defined by MeasureType. |
| all_pages | The signature will be placed on all document pages. (inherited from SignOptions) |
| appearance | The additional signature appearance. (inherited from SignOptions) |
| background | The signature background settings. (inherited from TextSignOptions) |
| border | The border settings. (inherited from TextSignOptions) |
| document_type | The document type of the signature options (DocumentType). (inherited from SignOptions) |
| extensions | The signature extensions. (inherited from SignOptions) |
| font | The font of the signature. (inherited from TextSignOptions) |
| form_text_field_title | The title of the text form field to place the text signature into. Can be used only when signature_implementation is set to TextSignatureImplementation.FORM_FIELD. (inherited from TextSignOptions) |
| form_text_field_type | The type of form field to place the text signature into. This property is applicable only when signature_implementation is set to TextSignatureImplementation.FORM_FIELD (i.e., TextToFormField). The default value is FormTextFieldType.ALL_TEXT_TYPES. (inherited from TextSignOptions) |
| hash_algorithm | The hash algorithm to be used for cryptographic operations. Supported exclusively for digital signatures in PDF files. (inherited from SignOptions) |
| native | The native attribute. (inherited from TextSignOptions) |
| page_number | The document page number for signing. (inherited from SignOptions) |
| pages_setup | The options to specify pages to be signed. (inherited from SignOptions) |
| shape_position | The shape position defines where the shape should be presented in the document layout. Available only for Word documents. (inherited from TextSignOptions) |
| shape_type | The type of shape to put text. (inherited from TextSignOptions) |
| signature_id | The unique ID of the signature, usable in verification options and supported only for PDF documents. (inherited from TextSignOptions) |
| signature_implementation | The type of text signature implementation. (inherited from TextSignOptions) |
| signature_type | The signature type (SignatureType). (inherited from SignOptions) |
| text | The text of the signature. (inherited from TextSignOptions) |
| text_horizontal_alignment | The horizontal alignment of text inside a signature, supported only for Image and Annotation signature implementations (see TextSignatureImplementation SignatureImplementation property). (inherited from TextSignOptions) |
| text_vertical_alignment | The vertical alignment of text inside a signature. (inherited from TextSignOptions) |
| zorder | The Z-order position of the text signature, which determines the display order of overlapping signatures. (inherited from SignOptions) |
from groupdocs.signature import Signature
from groupdocs.signature.options import BarcodeSignOptions
from groupdocs.signature.domain import (
Background, BarcodeTypes, Border, CodeTextAlignment,
HorizontalAlignment, Padding, VerticalAlignment)
from groupdocs.pydrawing import Color
def sign_with_barcode():
with Signature("sample.pdf") as signature:
options = BarcodeSignOptions("JohnSmith", BarcodeTypes.CODE128)
options.width = 220
options.height = 80
options.horizontal_alignment = HorizontalAlignment.RIGHT
options.vertical_alignment = VerticalAlignment.BOTTOM
options.margin = Padding(right=40, bottom=60)
options.fore_color = Color.dark_blue
options.code_text_alignment = CodeTextAlignment.BELOW
options.inner_margins = Padding(5)
background = Background()
background.color = Color.light_yellow
options.background = background
border = Border()
options.border = border
signature.sign("signed.pdf", options)
Task guides that use BarcodeSignOptions:
- eSign Document with Barcode Signature
- eSign Document with Multiple Signatures
- Generate signatures preview
- module
groupdocs.signature.options
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.