Page 1 of 1

FileNotFound on LoadFromFile for .docx and .xlsx

Posted: Tue Aug 04, 2020 12:27 am
by wedmondson
I am making use of LoadFromFile to load multiple types of files. However, .docx and .xlsx files are returning a "FileNotFound" and .rtf files are returning a "GeneralError" but jpegs, gifs, tiffs, pdfs, and txt files are all fine.

I am using gdPicture 14.1.77 with .Net Core

Here is an example of the code I am using:

Code: Select all

using GdPicture;
...
using var converter = new GdPictureDocumentConverter();
var status = converter.LoadFromFile("foo.docx", GdPicture14.DocumentFormat.DocumentFormatDOCX);
Does LoadFromFile not work with these file types or am I missing a setting?

Re: FileNotFound on LoadFromFile for .docx and .xlsx

Posted: Thu Aug 27, 2020 5:54 pm
by Fabio
Hello,

Sorry for the late reply.

Can you tried this code and tell me if it works?

using (GdPictureDocumentConverter oConverter = new GdPictureDocumentConverter())
{
GdPictureStatus status = oConverter.LoadFromFile("Files/foo.docx", GdPicture14.DocumentFormat.DocumentFormatDOCX);
Console.WriteLine(status);
}

Regards,
Rabio de Rose
Solution Engineer

Re: FileNotFound on LoadFromFile for .docx and .xlsx

Posted: Thu Sep 10, 2020 3:51 am
by wedmondson
Sorry this was a mistake on my part. I did not have all the correct dlls loaded.