I am using Docker deployed PDF Viewer and Doc Editor Server, and node-filesystem as the file system provider
I can't find any errors.
We regret the delay. As we are still analyzing the reported issue, we will update further details on November 23, 2022. We appreciate your patience.
Regards,
Sinthiya K
This issue occurs generally when the document name is wrong or the document path is wrongly referred.
Kindly provide the correct document path.
Example:
<template>
<h3>PDF Viewer</h3>
<ejs-pdfviewer id="pdfViewer" ref="pdfviewer" :serviceUrl="serviceUrl" :documentPath="documentPath" :documentLoad="documentLoad"> </ejs-pdfviewer>
</template>
data() {
return {
serviceUrl:https://ej2services.syncfusion.com/production/web-services/api/pdfviewer,
documentPath:'PDF_Succinctly.pdf',
};
},
The PDF document mentioned here must be located on the Web service sample(server side) and must be referred correctly.
I am using these two forums post as refers:
https://www.syncfusion.com/forums/161934/pdf-viewer-keeps-loading-forever
They are use the "documentLoad" not documentPath.
Please see my attachment
We need to ensure that the loaded document is located properly in the web service application before building the Docker image.
We can load the document using the documentPath and load method.
A documentLoad is an event that triggers after the document is loaded in the PDF Viewer.
Kindly find the API for the load method - https://ej2.syncfusion.com/vue/documentation/api/pdfviewer/#load
In the load method, we can load the document dynamically and also by referring document name.
UG Documentation - https://ej2.syncfusion.com/vue/documentation/pdfviewer/how-to/load-documents/
What's your means of
"We need to ensure that the loaded document is located properly in the web service application before building the Docker image"
I was using official images from https://hub.docker.com/r/syncfusion/pdfviewer-server, file system is using node file system provider from https://github.com/SyncfusionExamples/ej2-filemanager-node-filesystem
I try to switch the file system provider to google drive, but it has the same problem.
I can clearly see the files and folder in the file manager, but when I click it, it shows the error
Syncfusion PDF Viewer is client-server-oriented. And we will process the PDF document on the server side (developed with the .NET environment) and send the processed PDF data to the client using the web service to render the PDF document and for further operations in PDF viewer.
In the sample, we have to add the document on the server side. We have attached the video of loading the sample and also we have attached the screenshot of the document located in the server sample.
Video - https://www.syncfusion.com/downloads/support/directtrac/general/ze/VUELOA~11903706360.zip
In the pdfviewercontroller.cs file
We have to refer to the path correctly in getting the document path. Kindly find the code snippet for it below.
Code snippet:
private string GetDocumentPath(string document)
{
string documentPath = string.Empty;
if (!System.IO.File.Exists(document))
{
var path = HttpContext.Request.PhysicalApplicationPath;
if (System.IO.File.Exists(path + "Content\\Files\\" + document))
documentPath = path + "Content\\Files\\" + document;
}
else
{
documentPath = document;
}
return documentPath;
}
We don’t have server-side support in Node.js.
Kindly check these changes and revert to us if you have any issues.
If you have set any configurations related to “Docker”. Kindly provide us with that details.
OK, I fixed the PDF viewer but the Doc editor still not work.
This is my docker-compose.yml, I mount my document folder under the /app/Data in the docker images.
version: '3.4'
services:
word-processor-server:
image: syncfusion/word-processor-server:latest
environment:
#Provide your license key for activation
SYNCFUSION_LICENSE_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
volumes:
- /home/anji/COMS402/sop-organizer/SOP-Organizer-1/frontend/public/media/SOPs/Documents:/app/Data
ports:
- "6002:80"
Here is my code for doc editor:
Anji, Sorry for the delay.
From checking the provided code snippet, you have used the "Import API with file name". Import API will not accept the parameter as File name.
To load the document from path, please use "LoadDocument" API.
You can refer the Docker API from above project.