Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review QR placeholder functionality #32

Open
iaik-jheher opened this issue Nov 23, 2022 · 4 comments
Open

Review QR placeholder functionality #32

iaik-jheher opened this issue Nov 23, 2022 · 4 comments

Comments

@iaik-jheher
Copy link
Contributor

A lot of QR placeholder functionality hasn't been reviewed recently. I'd like to review how QR placeholders interact with signature scaling, signature message settings, etc.

Also: proper placeholder documentation, the current website is fairly outdated.

@iaik-jheher
Copy link
Contributor Author

This is related to #17 and has overlap with #4's proposed rework of PDF-AS interaction.

@michaelof
Copy link

Found a fairly food documentation about QR placeholders here: https://mplx.eu/de/tech/buergerkarte-digitale-signatur-platzhalter-pdf-over/

But.... doesn't work for me, qr-placeholders are ignored whatever I try - I'll wait for the future :)

@lorenzleutgeb
Copy link

lorenzleutgeb commented Nov 23, 2023

I spent quite a lot of time experimenting with this feature, and would like to report my findings both for other users that may read this, and also as feedback for the developers.

I am using LaTeX to generate documents that I would like to sign afterwards. There's a CTAN package called qrcode which is a very simple solution to embed QR codes in LaTeX documents. I am using this to generate EPC QR codes successfully, so I thought I might as well use it for signature placeholders. You can check this example document and the corresponding source code on overleaf and below.

LaTeX source code
\documentclass[%
foldmarks=false,
fromrule=afteraddress,
subject=titled,
backaddress=false,
fromlogo=true,
pagenumber=bot,
enlargefirstpage
]{scrlttr2}
\usepackage{qrcode}
\usepackage{blindtext}
\setkomavar{fromaddress}{Hans Meier, Musterstraße 2, 9999 Nirgendwo, Austria}
\setkomavar{signature}{\qrcode[nolink,level=L,height=1cm]{PDF-AS-POS}}
\begin{document}
\begin{letter}{Max Mustermann\\Musterstraße 1\\9999 Nirgendwo\\Austria}
\opening{Servus Max!}
\blindtext
\closing{Liebe Grüße,}
\end{letter}
\end{document}

Sadly, PDF-Over did not recognize the QR codes (even though I could scan them with my phone and verify that the contents are correct). I tried generating my own QR codes using libqrencode and using \includegraphics from the CTAN package graphicx. This did work as expected. My hypothesis is that PDF-Over does not scan the whole document, but filters the structure of the PDF for rasterized images and only scans those. While this approach is totally understandable, it is very unfortunate that this is not documented anywhere. Please do so. Thanks.

@iaik-jheher
Copy link
Contributor Author

Interesting; we defer to PDF-AS for QR code detection, and I'll verify your observation internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants