Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to Convert Base64 to PDF through X++

(1) ShareShare
ReportReport
Posted on by 116
Hi Experts,
 
My requirment is that i want to convert base64 string to pdf in dynamics 365 f&o and want to print that pdf file on user screen. Again! Base64 to pdf not pdf to base64.
 
Thanks.
 
Irfan Ayoub.
  • Hana Xue Profile Picture
    Hana Xue Microsoft Employee on at
    How to Convert Base64 to PDF through X++
    Hi,
    You can also simply view if the link below is helpful.
    jacquesdev.blogspot.com
    Best Regards,
    Hana
  • Layan Jwei Profile Picture
    Layan Jwei 7,715 Super User 2025 Season 1 on at
    How to Convert Base64 to PDF through X++
    Hi,

    I'm not sure if this old link will help somehow, but u can give it a try
    https://devblog.sertanyaman.com/2017/08/01/using-base64-for-file-transfer-in-ax-2012/

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future. You can do this by ticking the box "Does this answer your question"
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 231,436 Most Valuable Professional on at
    How to Convert Base64 to PDF through X++
    Moved from Dynamics AX forum.
     
    I'll assume that you have a string containing contents of a PDF file encoded with Base64. If not, then your question doesn't make sense.
     
    There are several ways how to convert a Base64 string to an X++ container or .NET byte array. For example, you can use base64str2con() method.
     
    This thread is just about How to Convert Base64 to PDF through X++, but let me give you a hint for your next step, i.e. sending to a printer. You will find an example in How-to send PDF document to a printer from X++.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans