Skip to main content
Nintex Community Menu Bar
Solved

How to get a document to base64?

  • July 6, 2018
  • 5 replies
  • 434 views

Forum|alt.badge.img+5

Hello,

 

Briefing, A Nintex list workflow is published in a SharePoint 2016 Document Library. It will check if the file is a .docx file type. If it is a .docx file type, the workflow would take the file name and convert the document to .pdf file type. At this point, the library contains the .docx and .pdf file. When the .pdf file is available, the workflow should call a web service (copy.asmx) to use the CopyItems web method to create a document in a SharePoint 2010 Document Library. Afterwards, the .docx in the SharePoint 2016 Document Library is to be deleted.

 

I am successful to creating the .pdf file in the target destination. However, it is shown as 0kb file size. The content of the document is not being populated. Question is: How do I get the .pdf document to encoded to base64 string via calling of a web service? Then using the base64 string to populate the CopyItems web method.

Best answer by adamtobia5

Update: I was able resolve this by specifying [FileData] in the <m:Stream>[FileData]</m:Stream>

5 replies

Forum|alt.badge.img+5
  • Author
  • Answer
  • July 6, 2018

Update: I was able resolve this by specifying [FileData] in the <m:Stream>[FileData]</m:Stream>


Forum|alt.badge.img+9
Did you convert the document to base64? If yes, could you post the steps?

Forum|alt.badge.img+9

@adamtobia5 

Got this working finally.


Forum|alt.badge.img+5
  • Author
  • August 9, 2019
I'm happy you were able to get this to work. Sorry, I wasn't able to assist in steps right away.

  • October 14, 2021

@adamtobia5 @brightlight  Do you mind sharing how you converted a document to base64?

I'm using Nintex cloud, trying a bunch of web services but not getting very far.

 

Thank you!