Converting this incorrectly named PDF file to PNG, takes several minutes (over 20 on my machine).
I’m aware that it’s not probably not a good use-case that a PDF is incorrectly renamed to MSG, but we actually had this issue with one of our customers.
When converting the file to PNG it takes several minutes:
using (var conv = new Converter(documentPath)) { var imgOptions = new ImageConvertOptions() { Format = ImageFileType.Png, //convert only the first page for thumbnail PageNumber = 1, PagesCount = 1 }; string filePath = "Conversion{0}.png"; Func<int, Stream> getPageStream = page => new FileStream(string.Format(filePath, page), FileMode.Create); conv.Convert(getPageStream, imgOptions); }
Could you please analyze why it takes that long?
Do you think it would be possible, to detect such incorrect file somehow and throw some error faster?
Best regards,
Clemens