PDF-Over icon indicating copy to clipboard operation
PDF-Over copied to clipboard

Review QR placeholder functionality

Open iaik-jheher opened this issue 3 years ago • 4 comments

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 avatar Nov 23 '22 14:11 iaik-jheher

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

iaik-jheher avatar Nov 23 '22 14:11 iaik-jheher

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 :)

michaelof avatar Jan 27 '23 19:01 michaelof

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.

lorenzleutgeb avatar Nov 23 '23 14:11 lorenzleutgeb

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

iaik-jheher avatar Nov 23 '23 15:11 iaik-jheher