Product Version: Native Android SDK
Please give a brief summary of your issue:
Image conversion error when file type is not appended to file name
Please describe your issue and provide steps to reproduce it:
When trying to convert image types (jpg, jpeg, png, etc.) to .pdf when the image type is not appended to the file name (
test) I see an error
Exception: Message: Input file is of unknown type because file extension is not specified.
When the file name has the type appended (
test.png) it converts perfectly and displays correctly when using the
Convert.toPdf(pdfDoc, file.absolutePath). Is there another way to determine the file’s mimetype for conversion than be a part of the file name’s
Reproduction Steps with sample project:
- open app
- App will Crash with above error.
- open the “assets” folder and rename the
- open the
MainActivityand go to line 51.
- make the line
val fileName = "test.png"instead of
val fileName = "test"
- run app and the file converts perfectly and displays.
Please provide a link to a minimal sample where the issue is reproducible: