Create digital membership cards?

Hello, I am trying to supply my site members with a digital membership card. They could download that to their phone use it for events and as an ID and keep it updated when some parameter changes.
In the simplest form, that would be a file preferably pdf, but also jpg or png would work. Credit card size would be good for printing it in case that is a need by some members. It should contain the profile picture, name, membership number, logo and other info from the CMS.
I tried to fill a container box with the data, but cannot fix the size and it’s not really possible to convert the box into a downloadable file.
Ideally, one could customize the existing membership profile card with additional fields and layout functions and create a downloadable file from that.
I looked into integration with third party tools like passkit, but there I run into a monthly fee that is just too high at the moment.
Anybody with a similar requirement and maybe with some solution options?

Product:
Wix Editor

I got this solved by using the pdf-lib package. Thanks to this article Generate and download a custom PDF with pdf-lib
Helped me get started.