Reading QR code from Pdf

Kmcnet 1,066 Reputation points
2022-11-25T14:14:31.437+00:00

Hello everyone and thanks for the help in advance. I need to develop a C# application that can locate and read QR multiple QR codes from a Pdf file. The QR codes are on stickers that are affixed to a piece of paper and scanned into the system. I know that the location of the QR codes must be known in order to reasonably do this and I do have some control on the placement of them, but I need to figure out how to accomplish the project. I know the Pdf must be converted to an image, likely using Ghostscript or ImageMagick, but am not sure how to proceed after that point. Any help would be appreciated.

Developer technologies | .NET | Other
0 comments No comments
{count} vote

Accepted answer
  1. Castorix31 90,686 Reputation points
    2022-11-25T14:26:46.577+00:00

    You can convert PDF to images with Windows.Data.Pdf
    (for Winforms or WPF, add references :
    "C:\Program Files (x86)\Windows Kits\10\UnionMetadata\[Version]\Windows.winmd"
    "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5\System.Runtime.WindowsRuntime.dll" )
    (tested on Windows 10 21H1)

    To read QR codes, you can find libraries like
    QR Code Encoder and Decoder C# Class Library for VS 2022 .NET 6.0 (Version 3.1.0)
    or
    ZXing.Net
    (not tested)


2 additional answers

Sort by: Most helpful
  1. Mahesh AK 0 Reputation points
    2023-09-08T09:17:31.0966667+00:00

    Pdf not open

    0 comments No comments

  2. Mahesh AK 0 Reputation points
    2023-09-08T09:17:52.8866667+00:00

    Pdf not open

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.