@cdewarenglish
That’s right, thanks for the code snippet. Unfortunately, I can’t reproduce the issue on my local Windows 10 machine.
It looks like Viewer can’t detect filetype or detects filetype incorrectly because the memory stream is passed to the Viewer’s constructor.
Could you please try running the with sample_app_1.zip (21.1 KB). in your environment and share exception details and log.txt
file that will be created in the application directory?
One more thing, try passing LoadOptions
as second parameter of Viewer
constructor:
var filename = "resume_eight.docx";
var extension = Path.GetExtension(filename);
var filetype = FileType.FromExtension(extension);
LoadOptions loadOptions = new LoadOptions(filetype);
using (Viewer viewer = new Viewer(mem, loadOptions)) { ... }
While Viewer does support filetype detection this operation could be expensive so it is preferable to pass filetype when you know it.
Thanks