Need help with Joomla? We are available for hire to help with Joomla customization, upgrades, maintenance, and custom development.
Explore our services

QRCODE size ignored and 'Unknown page format CUSTOM' error

  • John Campbell
  • Topic Author
  • Offline
  • New Member
  • New Member
More
1 hour 16 minutes ago #179857 by John Campbell
Hi,

I'm setting up a credit-card-sized (85.6 x 54mm) member card PDF and have run into two problems I can't get around from the template side.

Versions:
- Joomla: 5.4.8
- Membership Pro: 4.7.1

1) QRCODE Image Width/Height setting has no effect

In Member Card Settings I've set QRCODE Image Width and Height to 60 / 60, but the [QRCODE] image in the generated card always renders at about 39mm square on an A6 landscape page. This makes the card far taller than credit-card size and pushes the QR over the right-hand border.

What I've tried:
- Deleted the cached QR image in /media/com_osmembership/ so it regenerated. It came back at the same size.
- Added CSS targeting the image (td.qr img { width: 20mm; height: 20mm; }) both in PDF Settings > PDF CSS and in a <style> block in the card layout. No effect.
- Using my own <img> tag with width/height set works perfectly for sizing, but none of the available tags output the QR code's unique string (e.g. the value used for the QR filename like brpMDGmS....jpg), so I can't reproduce the correct code.

2) Page Format "Custom" throws an error

Setting Page Format to Custom in Member Card Settings causes:
"0 Unknown page format CUSTOM"
when a card is generated. I can't see any width/height fields to define the custom size. It looks like the word CUSTOM is being passed straight to TCPDF.

TCPDF has a built-in CREDIT_CARD format (85.6 x 53.98mm). Could that be added as a Page Format option, or could Custom be fixed to accept a width and height?

For now I'm using A6 Landscape with the card at 58% width, which works apart from the QR size.

Current settings for reference:
- Page Orientation: Landscape, Page Format: A6
- PDF Settings margins: Left 1, Right 1, Top 2, Bottom 2

Thanks

Please Log in or Create an account to join the conversation.