sprain/php-swiss-qr-bill

Output bill at the top of a PDF

thomastpch opened this issue · 3 comments

How can I adjust the positioning of the QR bill generated by php-swiss-qr-bill to appear at the top of a PDF using TcPdfOutput.php? Currently, it is being displayed at the bottom.

The Placement for the Payment Part is defined exactly in the Style Guide:
grafik

As PDF-Output is compatible with the Style Guide, there's no real point in making it adjustable, I guess.

If you want to move it for some special reason, did you try using HTML-Output and place it in a custom document?

sprain commented

The answer looks like the right one to me :)
Feel free to re-open this issue if needed.

@sprain Placing the QR bill at the top of the page could be a practical consideration if the document does not have a letter or other content (apart from the QR bill) that would require scrolling. This placement would make it immediately visible when the PDF is opened, reducing the need for the recipient to scroll down to find the QR code. Especially when considering smaller monitors, lower resolutions, or mobile devices. In such cases, if the bill is positioned at the top, it ensures that the QR code and relevant payment details are immediately visible when the PDF is opened. Without this strategic placement, recipients might need to scroll down to locate the QR code, potentially leading to confusion and giving the impression that the PDF is blank or devoid of content.

However, I have seen that the positioning of the QR code is largely hard-coded within TcPdfOutput.pdf.
Implementing a variable position for the QR code would likely require significant changes.
Setting $offsetY to a negative value like -200 will only move certain parts to the top of the page.