Question
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-07/c73bc668-d673-4546-90da-a5ae20f33693_0.png?itok=7WJ1NIgZ)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-07/c73bc668-d673-4546-90da-a5ae20f33693_0.png?itok=7WJ1NIgZ)
CollabPartnerz
IN
Last activity: 1 Mar 2024 6:07 EST
Generate the PDF and attach to case by capturing images
how to pass the below format value to create a PDF in pega
btoa(canvas.toDataURL("image/png").replace("data:image/png;base64,", "")
do we have any ootb activities? to generate PDF and attach to the case.
***Edited by Moderator Rupashree S. to add Capability tags***
-
Reply
-
B Anurag Patil -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689955000/34016d31-c29b-410b-859e-41eca71e403d.jpg?itok=xa4Z1e5L)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689955000/34016d31-c29b-410b-859e-41eca71e403d.jpg?itok=xa4Z1e5L)
DXC
AU
Hi
You can check pxCreatePdf create a pdf and attach it to the case, or HTMLTOPDF for the following.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-07/c73bc668-d673-4546-90da-a5ae20f33693_0.png?itok=7WJ1NIgZ)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-07/c73bc668-d673-4546-90da-a5ae20f33693_0.png?itok=7WJ1NIgZ)
CollabPartnerz
IN
@gasharmawhat I was looking for is a way to capture an image using any cam and attach that image in the form of PDF in a case.
While trying so the image is generating but it is not getting attached to the case.
I am wondering whether we have any OOTB activities to help achieve this functionality.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689955000/34016d31-c29b-410b-859e-41eca71e403d.jpg?itok=xa4Z1e5L)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689955000/34016d31-c29b-410b-859e-41eca71e403d.jpg?itok=xa4Z1e5L)
DXC
AU
@B Anurag 1. Create a section that displays all your captured images in the list and then pass that section to the pxcreatepdf activity.
It should create the pdf and it will have it.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-07/c73bc668-d673-4546-90da-a5ae20f33693_0.png?itok=7WJ1NIgZ)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-07/c73bc668-d673-4546-90da-a5ae20f33693_0.png?itok=7WJ1NIgZ)
CollabPartnerz
IN
@gasharmaI already have the file stream ready. wanted to know if there is any OOTB activity to pass the file stream as a param so that i can attach it to the case.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-07/c73bc668-d673-4546-90da-a5ae20f33693_0.png?itok=7WJ1NIgZ)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-07/c73bc668-d673-4546-90da-a5ae20f33693_0.png?itok=7WJ1NIgZ)
CollabPartnerz
IN
@duraisankar i have Image base64 Stream.
Updated: 1 Mar 2024 6:07 EST
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-11/a40e7a59-6e09-4ece-971d-a6dd1f01daa6.jpg?h=00b6e95b&itok=uEClXheI)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-11/a40e7a59-6e09-4ece-971d-a6dd1f01daa6.jpg?h=00b6e95b&itok=uEClXheI)
Capgemini
NO
I am not aware of any OOTB Activity which converts base64 of image to PDF.
Considering you have base64 of png image, I would suggest create a non Autogenerated Section and have below code as the HTML source. You can parameterize below code using JSP tags and section parameters if required.
<img src="data:image/png;base64, STREAM_HERE" alt="Alt text here" />
Example :
<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO 9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Alt text here" />
You can pass this section name as parameter to pxCreatePDF
Let me know if you have any questions.