We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

C# convert PdfFileMend to byte[]

can I convert PdfFileMend object to byte array? and how?


I suggest you to try the following code and share your feedback.

MemoryStream stream = new MemoryStream();
long bytes = stream.Length;
BinaryReader reader = new BinaryReader(stream);          
byte[] bytearray = reader.ReadBytes((int)bytes);

thanks!! it’s helped me!
I use more shorted code:
MemoryStream stream = new MemoryStream();
byte[] requestDetailsByte = stream.ToArray();


It’s good to hear that things are working on your end.