You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

donaldp's avatar
donaldp
Collaborator | Level 9
6 years ago

Getting "Stream does not support seeking" with GetContentAsStreamAsync

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 instea...
  • donaldp's avatar
    6 years ago

    Well, I got it working! But not with native Dropbox API command, so I'm still itnerested if there's a way to do it with the API.

    Courtesy of this SO post https://stackoverflow.com/questions/23626965/this-stream-does-not-support-seek-operations-using-stream I got it working with this code...

    string fileToPrint=RootFolder+"Labels/A10697/111Z50066345EXP00001.pdf";
    Stream fileStream=await DataService.StreamFile(fileToPrint);
    MemoryStream ms=new MemoryStream();
    fileStream.CopyTo(ms);
    // then use ms in place of fileStream

    If there's a way to get around this with Dropbox API, then let me know and I can try it that way and mark your reply as answer, but if not we can mark this as answer.