Requirement scope: Convert PDF stream to Base64String
System.IO.BinaryReader binaryReader;
System.IO.Stream baseStream;
System.IO.StreamReader streamReader;
System.Object streamObject;
System.Object bytesObject;
int streamLength;
int bytesLength;
streamObject = baseStream.get_Length();
streamLength = streamObject;
binaryReader = new System.IO.BinaryReader(baseStream);
bytes = binaryReader.ReadBytes(streamLength); // Here system return as bytes[0]
bytesLength = bytesObject;
base64data = System.Convert::ToBase64String(bytes, 0, bytesLength);
{
using (System.IO.MemoryStream memoryStream = new System.IO.MemoryStream())
{
fileStream.CopyTo(memoryStream);
base64data = ERConversionUtils::StreamToBase64(memoryStream);
}
}