Do you have an issue with a specific file(s)? No.
Can you reproduce using one of our samples or online demos? No.
Are you using the WebViewer server? No.
Does the issue only happen on certain browsers? No. (Tested with Firefox and Chrome.)
Is your issue related to a front-end framework? Unlikely. (We use React, but I don’t believe it’s part of the problem here.
Is your issue related to annotations? No.
Please describe your issue and provide steps to reproduce it:
With no document in the viewer:
Drag and drop a single image into the thumbnail viewer. You can not add any more files of any type to the document. (Document.getType() returns "image")
Drag and drop multiple images into the thumbnail viewer. Only the first loads. You cannot add any more files of any type to the document. (Document.getType() returns "image")
Drag and drop a PDF into the thumbnail panel. It loads. Drag and drop any number of image files into the thumbnail viewer. They all load. (Document.getType() returns "pdf")
It seems that to work around this, I just need to detect the documentLoaded event and convert the image document to a pdf document, but how do I do the conversion?
You have two ways of loading the file like a PDF. Both of them use the loadAsPDF: true option. You do not need to do any conversion during the documentLoaded event.
Does this mean that, despite having loadAsPDF set in my initializer, loading image files by dropping them into the thumbnail panel and getting an image-type document is expected behavior?
There may be an issue with the drag and drop functionality. You should be able to insert new documents by selecting the three dots and clicking on insert.
We are seeing the same issue when drag/drop more than one png file in this scenario. I can also reproduce it in your online demo. Just insert a new page, click the upload tab and then drag more than one png file to upload. Triggers an error every time.
Do you mean is the original file a png? No, it is a pdf so it would be mixing pdf and png file types. I uploaded a screenshot of the error in case that is helpful.