Base 64 to pdf attachment | Community
Skip to main content
LakshmiPravallika
Community Advisor
Community Advisor
November 2, 2022
Question

Base 64 to pdf attachment

  • November 2, 2022
  • 2 replies
  • 2835 views

Hi All,

 

We have the below requirement

 

1)We receive the base 64 encoded Request in Real time in JSON format.

2)We need to decode it and convert it to .pdf file and send it as an attachment in the Transactional Email     Delivery.

 

Kindly help us in how to convert Base 64 to pdf attachment and which works in all browser clients and let us know.

 

Regards,

Pravallika.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

LakshmiPravallika
Community Advisor
Community Advisor
November 9, 2022

Hi Team,

 

Please let us know if u have any insights on this issue?

 

Regards,

Pravallika.

LakshmiPravallika
Community Advisor
Community Advisor
December 19, 2022

Hi Team,

 

Can you Please suggest us the 3rd Party Conversion tool to integrate with Campaign which can be used for Base64 to pdf?

 

Regards,

Pravallika.

Amine_Abedour
Community Advisor
Community Advisor
November 13, 2022

Hello @lakshmipravallika,

 

On what Os your Adobe campaign is installed ? Windows or Linux ? On-Premise, hybrid or fully hosted ? 

I may have a solution for you if you are on-premise or hybrid, and if your ACC instance is on Windows server.

 

Br,

Amine

 

Amine ABEDOUR
LakshmiPravallika
Community Advisor
Community Advisor
November 15, 2022

Hi @amine_abedour 

 

The Adobe Campaign is installed in fully hosted environment and on Windows.

 

Please let us know the solution used for Hybrid Environment so that we will try to use the same approach.

 

Regards,

Pravallika.

Amine_Abedour
Community Advisor
Community Advisor
November 15, 2022

Hello @lakshmipravallika,

 

I receive the attachement in XML format like this :

<ctx [...]>
	[...]
	<pj fileName="PdfFileName.pdf"> 
		[attached encoded in base64]
	</pj>
</ctx>

The solution that worked for me is : 

  • I store the base64 in a temporary text file (1)
  • I use the system commande "certutil -decode" with the temporary text file as first parameter and the final PDF final as second parameter to decode the base64 to a pdf file (2) (don't mind the ''pushd'' and ''popd'' in the command, i use them because my working directory is in a NAS)
  • Then i store the path to my newly decoded attached in database so that i can point to it from my delivery 

 

 

 

 

I hope i was clear, if not, please let me know.

Br,

Amine

 

Amine ABEDOUR