Convert PDF To Base64 Format

How to convert PDF to Base64 Format?

Workaround:

  1. Use "UiPath.PDF.Activities.PDF.ExportPDFPageAsImage" and create an image from the PDF.
  2. Once the Image has been created, convert the image into base64 format, either use any service provider which has exposed an API to convert image to base64 or use custom program which converts the image into base64 format.
  3. UiPath has a custom activity, Encode and Decode activities which can convert a image to base64 format.
Refer the posts,

There is an easier way, using Assign activity:
FileInBase64 = Convert.ToBase64String(System.IO.File.ReadAllBytes(FileFullName)).ToString