decodeqrfrompdf
Reactive icon

DecodeQrFromPDF

version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 13 October 2025
 by 
0.0
 (0 ratings)
decodeqrfrompdf

DecodeQrFromPDF

Details
A robust extension that extracts QR Codes from PDF files using a multi-stage rasterization and decoding pipeline. This module ensures high accuracy by applying multiple decoding strategies and preprocessing techniques.
Read more


PDF QR Code Reader – README


Features Overview

  • Converts PDF pages into rasterized images
  • Runs six decoding strategies for maximum detection success
  • Stops immediately when a valid QR code is found
  • Includes timeout protection and memory-safe operations
  • Supports directory parameterization for Ghostscript installations



How It Works

The decoding engine processes the PDF in several stages. Each stage attempts to read a QR code from differently processed samples.

Decoding Pipeline (6 Steps)

  1. Ghostscript (Original Image)
    Converts the first PDF page into a bitmap and attempts direct decoding.
  2. Freeware Library (Original Image)
    Uses an alternative PDF ? PNG engine for a second decoding attempt.
  3. Ghostscript + Light Preprocessing
    Crops margins, resizes, and converts to grayscale.
  4. Ghostscript + Hard Preprocessing
    Applies stronger enhancements (upscaling, sharpening) to improve readability.
  5. Freeware + Light Preprocessing
    Repeats the light preprocessing pipeline on the Freeware-rendered image.
  6. Freeware + Hard Preprocessing
    Performs aggressive preprocessing on the Freeware-rendered image.

If a QR code is detected at any point, the process stops successfully.
If all attempts fail, a failure message is returned.



Additional System Protections

Timeout Control

A 60-second timeout ensures the process does not hang. If the threshold is reached, the operation returns a timeout message.

Memory-Safe Execution

All images, streams, and unmanaged resources are disposed of immediately to prevent memory leaks.




Ghostscript.NET Requirement

This extension relies on Ghostscript.NET to:

  • Interpret PDF and PostScript® files
  • Convert PDFs into rasterized images
  • Ensure compatibility with internal processing modules



Installation Instructions

1) Download Ghostscript

Visit the official Ghostscript download page:

ghostscript.com/releases/gsdnld.html

Download the version appropriate for your server
(Recommended: Windows 64-bit).

2) Install Ghostscript

Example installation path:

C:\Program Files\gs\gs10.05.1\bin 




Directory Parameterization

This extension allows you to configure the Ghostscript installation directory.

Set the full path to the /bin directory containing the Ghostscript executable.

Example:

C:\Program Files\gs\gs10.05.1\bin 



System Purpose

Ghostscript.NET is used to:

  • Interpret and convert PDF / PostScript files
  • Produce rasterized output for decoding
  • Maintain reliability when processing graphics and documents


Release notes (1.0.0)
License (1.0.0)
Reviews (0)
Team
Other assets in this category