I’m getting this error “Cannot access a closed Stream” while trying to export pdf
I want the api to return the document, i doen’t want to use document viewer ui
string token = docViewer.OpenDocument(attachment.Data.FileData, fileExtension, config, documentOptions);
byte[] docData = docViewer.ExportToPdf();
return new FileContentResult(docData, attachment.Data.FileType);