Getting a PNG into a PDF

Hi!

I hope I am posting this in the right place? Please let me know if not and I will remove it.

I am trying to make a pdf with images loaded in, specifically signatures. I am using @meredydd example with signatures from this post “Collecting signatures with an Anvil app” but am trying to adapt it so we also get a pdf with the signature on. I am not having much luck. I was hoping someone else has faced this problem and can offer a solution?

project link: Anvil | Login

Thanks,

Mike

Welcome to the forum!

You’ve got it almost perfect, there’s just one error. Where you have:

self.signature_image_1.image = audit_data["signature_capture_1"]

It should be:

self.signature_image_1.source = audit_data["signature_capture_1"]

The source property is how you set an image into an image component.

2 Likes

Thank you so much jshaffstall!

You’re welcome! Oh, also, the post should have been in the Q&A section since it was asking a question. I went ahead and moved it there for you. The Show & Tell section is for projects you want to show off, but don’t need questions answered.

1 Like