GroupDocs.Signature for Python via .NET

Generate QR codes for PDF

Effortlessly create 2D barcodes using text or numeric data and apply them to various pages and formats, including PDFs, Word, Excel, and more with GroupDocs.Signature for Python via .NET.

Steps to generate and insert a QR code in PDF

GroupDocs.Signature lets you create QR codes in popular formats and place them on PDF pages. With support for over 10 QR code types, you can seamlessly integrate this functionality into Python via .NET applications. Enhance your documents with QR code signatures using our product.

  1. Obtain the PDF file or stream where the QR code will be added.
  2. Provide the required text to QrCodeSignOptions.
  3. Customize visual settings like color, position, and size.
  4. Save the document with the embedded QR code.
import groupdocs.signature as sg

def run():

    # Initialize a new Signature instance with the document
    with sg.Signature('input.pdf') as signature:

        # Use QrCodeSignOptions to embed a QR code into the document
        options = sg.QrCodeSignOptions("Text Content")

        # Specify the signature type and set its position on the page
        options.EncodeType = sg.QrCodeTypes.QR
        options.Left = 50
        options.Top = 150

        # Save the document with the embedded QR code
        result = signature.Sign("output.pdf", options)
pip install groupdocs-signature-net
click to copy
copied
More examples Documentation

Complete signature integration for documents

With the GroupDocs.Signature for Python via .NET API, users can generate, modify, search, validate, and remove different signature types, simplifying document workflows with precision.

Key Features of GroupDocs.Signature

Apply multiple signature types

GroupDocs.Signature allows the application of Text, Image, Barcode, QR Code, and Stamp signatures to any document. You can precisely place signatures on any page and manage metadata easily. Protect your documents from unauthorized changes with digital certificates.

Search and validate signatures

Verify document signatures for authenticity and accuracy using advanced validation tools. Easily get a detailed list of all signatures embedded in a document for better oversight.

Modify existing signatures

You can update previously applied signatures by adjusting content, position, color, size, and other attributes to suit your specific needs.

Easily remove signatures

Streamline document management by quickly removing unwanted signatures. Whether it’s a digital certificate or another signature type, removal can be done efficiently.

Customize a Generated QR Code

This example shows how to place a customized QR code on a PDF page.

Python

import groupdocs.signature as sg

def run():

    # Get the document to be signed and pass it to Signature
    with sg.Signature('input.pdf') as signature:

          # Configure QR code options with the required text
          options = sg.QrCodeSignOptions("Archived on July 11, 2019")

          # Set the QR code’s position on the page
          options.VerticalAlignment = sg.Domain.VerticalAlignment.Top
          options.HorizontalAlignment = sg.Domain.HorizontalAlignment.Right

          # Set the padding for the signature
          options.Margin = sg.Padding()
          options.Margin.Top = 20
          options.Margin.Right = 20

          # Choose the color of the QR code
          options.ForeColor = sg.Color.Red

          # Define the font options for the message
          options.Font = sg.SignatureFont()
          options.Font.Size = 12
          options.Font.FamilyName = "Comic Sans MS"

          # Set the background color and brush for the QR code
          options.Background = sg.Background()
          options.Background.Color = Color.LimeGreen
          options.Background.Transparency = 0.5
          options.Background.Brush = sg.LinearGradientBrush(sg.Color.LimeGreen, sg.Color.DarkGreen)

          # Embed the QR code into the document
          result = signature.Sign("output.pdf", options)
pip install groupdocs-signature-net
click to copy
copied
More examples Documentation

Explore the features of GroupDocs.Signature for Python via .NET

GroupDocs.Signature for Python via .NET offers a wide range of capabilities, enabling users to generate and embed different signature types across major document formats. Whether it’s PDFs, Word, Excel, PowerPoint, or images, enhance your documents with Text, Image, Barcode, QR Code, Metadata, Digital, or Stamp signatures.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Signature for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Explore our signature solutions

We offer a wide variety of signature types and operations to meet your document needs.

Embed QR codes in various document formats

Use the Python via .NET API to embed QR codes into any industry-standard document format. Store and encode important information into 2D barcodes for easy scanning and data retrieval.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English