Product: WebViewer
Product Version: 8.7.0
Please give a brief summary of your issue:
(Think of this as an email subject)
Error when loading certain tiff files (not able to convert to PDF)
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
When loading certain tiff files, the below error is returned:
webviewer-core.min.js:211 Uncaught (in promise) Exception:
Message: An error occurred while converting the TIFF.
Detailed error:
Exception:
Message: Unable to convert non-TIFF image to PDF using the FromTiff API
Conditional expression: filter.get()
Version : 9.3.0-0be415464
Platform : Emscripten
Architecture : Emscripten
Filename : Convert.cpp
Function : FromTiff
Linenumber : 1602
Filename: Convert.cpp
Function: FromTiff
Linenumber: Ϳ��>ڂa�?
The error seems to indicate that the API doesn’t recognize the files in question as .tiff files. They are in fact tiff files. This happens for some tiff files but not others. As far as I can tell, there’s nothing unique about the tiff files that throw the error. It throws the error consistently for the problem files and works consistently for the non-problem files.
This was happening in version 7.2.0 of the Web Viewer and also after upgrading to 8.7.0.
When using 7.2.0, our code very similarly resembled the example here: PDFTron Systems Inc. | Documentation
However, the 8.2.0 patch notes indicate that client side support was added for tiff files. PDFTron Systems Inc. | Documentation
I took this to mean that the loadDocument function can inherently handle tiff files. In our 8.7.0 code, I load tiff files the same as I do regular documents (without any of the explicit conversion calls using PDFNet). I still get the same error, which I assume means the PDF conversion is being called behind the scenes by the loadDocument function. We are using the full version of the API.
Our basic load call looks like this:
webViewer.Core.documentViewer.loadDocument(data.source, {
docId: data.id,
filename: data.name,
onError
});
Without the PDFNet code to explicitly convert tiff files, the problem ones are still failing and the ok ones are still working. The only difference I’ve noticed is that now .tif files won’t load (as opposed to .tiff). Any help would be greatly appreciated.
Please provide a link to a minimal sample where the issue is reproducible: