Hi,
I'm currently using a C#/.NET nuget which works as expected when printing from an embedded resource as a stream. The problem is that it's not working when I try to use a Dropbox stream instead - I get "Stream does not support seeking".
So, this code works....
Stream fileStream=typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream("MyAppName.Assets.111Z50066336EXP00065.pdf");This doesn't...
string fileToPrint=RootFolder+"Labels/A10835/111Z50066336EXP00065.pdf"; //this is just the same file in a different location obviously
Stream fileStream=await DataService.StreamFile(fileToPrint);
Where DataService is my Dropbox class, RootFolder is my Dropbox root folder, and StreamFile is as follows...
public async Task<Stream> StreamFile(string file)
{
try {
using (DropboxClient DxClient=new
DropboxClient(AccessToken)){
var response=await DxClient.Files.DownloadAsync(file);
var content=response?.GetContentAsStreamAsync();
return content?.Result;
}
}
}
So how do I need to alter this code to not get this "does not support seeking" message? i.e. why is my Dropbox stream not beaving the same as streaming the embedded resource, and how do I get it the same?
thanks,
Donald.