# How to convert a Base64 string to a PDF file

**URL:** <https://community.synatic.com/t/how-to-convert-a-base64-string-to-a-pdf-file/339>\
**Category:** Flows\
**Tags:** pdf\
**Created:** [April 6, 2023, 2:50pm UTC](https://community.synatic.com/t/how-to-convert-a-base64-string-to-a-pdf-file/339 "2023-04-06T14:50:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faizel](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.synatic.com/faizel/32/918_2.png) [@Faizel](https://community.synatic.com/u/Faizel)\
**Post date:** [April 6, 2023, 2:50pm UTC](https://community.synatic.com/t/how-to-convert-a-base64-string-to-a-pdf-file/339/1 "2023-04-06T14:50:44Z")

</div>

If you require **to convert a Base64 string to a PDF file** , please follow the below instructions:

Illustrated in the below image is an example of a flow where a Record Generator is used as a source step to store the Base64 string. It is then converted into a PDF file using the Byte Group mapper step and sent as an email.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/46f20568f55b9eaa190a7ff0ba30062636a00bea.png)

1. The image below is the Record Generator source step which has the Base64 string.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/a5a97cc036f2ee73ae7006c95f5451ef1e28371f.png)

1. A Calculator step is added to return only the Base64 string as a record as shown in the below image.

![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/969a95ad3c97364ccca76ef1be16fb5e999c6081.png)

1. A **Byte Group Step is added to do the conversion**. The Input Mode that is selected is **Base64** and the Output Mode will be **Byte** as illustrated in the below image.

![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/dcdfd37128e644cca917a3c19cbc8ecc6c699d03.png)

1. Add the Combine step after the Byte Group step.

2. Add the Run File destination step and select the Input as the Record and the File Type as a PDF which is shown in the below page.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/3cd91968e53f893caf86e491f34ea0b96702f0b7.png)

1. Add an Email destination step to send the PDF file to an Email address. In the **Attachments section** , please ensure that the Use Attachments checkbox is ticked and type an attachment name without the file extension as illustrated in the below image.

 ![image](https://canada1.discourse-cdn.com/flex032/uploads/synatic/original/1X/e6e6321553e2c35052c76fcbaa4b11566806489b.png)
