Product:
Apryse
Product Version:
“@pdftron/webviewer”: “^10.12.0”,
Please give a brief summary of your issue:
(Think of this as an email subject)
When a blob of a docx file loaded with instance.value.UI.loadDocument it throws an error in Vue 3
Error -->>
Exception during conversion: Exception:
Message: Unable to convert this document from binary to OOXML form. File is not a valid zip archive.Conditional expression: false
Version : 10.12.0-3ccb0992a8
Platform : Emscripten
Architecture : Emscripten
Filename : OfficeFileBase.cpp
Function : Init
Linenumber : 450
blob - type: “application/vnd.openxmlformats-officedocument.wordprocessingml.document”,
extension: docx
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
Download file and convert it to a js blob.
use instance.UI.loadDocument to load the docx file
Please provide a link to a minimal sample where the issue is reproducible:
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems like you are encountering an issue when trying to load a DOCX file as a Blob in WebViewer, resulting in an error related to the file not being recognized as a valid zip archive. This often happens if the Blob is not correctly formatted or if there’s an issue with how the Blob is created or passed to the WebViewer.
Some things you can try:
Ensure that the Blob is correctly created from the DOCX file. Verify that the Blob’s data is properly constructed and represents a valid DOCX file.
Check that the Blob is passed with the correct MIME type, which should be “application/vnd.openxmlformats-officedocument.wordprocessingml.document”.
Make sure that the file extension is correctly set when loading the document using the loadDocument method.
Consider testing with a known good DOCX file to rule out issues with the specific file you are currently using.
Here are some resources that might help you:
Open a document in WebViewer from Blob: This guide provides methods to open documents from various sources, including Blobs, and explains the importance of setting the correct options.
If you haven’t already, make sure to set the downloadType option in getFileData() to ‘office’, as well as setting the extension option in loadDocument() to ‘docx’. This will help ensure that WebViewer knows what type of file is being loaded.
If the above doesn’t work, please confirm the following:
DOCX file used for testing
Full code sample used for testing, including the constructor as well as the code for downloading/loading the file.
JavaScript console output showing all warnings and errors.