RUN apt-get update \
&& apt-get install -y --allow-unauthenticated \
libc6-dev \
libgdiplus \
libx11-dev \
curl \
vim \
supervisor \
procps
|
Query |
Details |
- I don't understand the sentences in Bold:
Kindly use Syncfusion.Blazor.PdfViewerServer.Linux package in your application for the Linux environment. Also, ensure whether the library dependencies of libpdfium. so are installed properly. Also, avoid installing both Windows and Linux packages in the same project. If not, please execute the following command to install the dependencies.
|
We need to install Syncfusion.Blazor.PdfViewerServer.Linux package in your project and then build the project in a Linux environment and deploy the same in Linux.
|
To deploy a blazor application on Linux, I should create and build it on the Linux environment? | |
Can you tell me the steps to successfully deploy a blazor application (pdf viewer) in the Linux environment: on which environment to develop it, how to publish it, The prerequisites on the Linux deployment server ... |
As we mentioned earlier, we need to install only Syncfusion.Blazor.PdfViewerServer.Linux package in your project. Build the project in your Linux environment and then deploy the same in Linux environment.
Also, ensure to provide write access permission to your project, so that the libpdfium.so file will be generated while running the project.
Kindly try it and revert us with more details if you still have concerns. These details will be helpful for us to investigate further and assist you better. |
PdfRenderer.ReferencePath = _hostingEnvironment.WebRootPath + "\\"; |
public IActionResult Load([FromBody] Dictionary<string, string> jsonObject)
{
PdfRenderer pdfviewer = new PdfRenderer(_cache);
PdfRenderer.ReferencePath = _hostingEnvironment.WebRootPath + "\\";
MemoryStream stream = new MemoryStream();
object jsonResult = new object();
if (jsonObject != null && jsonObject.ContainsKey("document"))
{
if (bool.Parse(jsonObject["isFileName"]))
{
string documentPath = GetDocumentPath(jsonObject["document"]);
if (!string.IsNullOrEmpty(documentPath))
{
byte[] bytes = System.IO.File.ReadAllBytes(documentPath);
stream = new MemoryStream(bytes);
}
else
{
return this.Content(jsonObject["document"] + " is not found");
}
}
else
{
byte[] bytes = Convert.FromBase64String(jsonObject["document"]);
stream = new MemoryStream(bytes);
}
}
jsonResult = pdfviewer.Load(stream, jsonObject);
return Content(JsonConvert.SerializeObject(jsonResult));
} |
RUN apt-get update \
&& apt-get install -y --allow-unauthenticated \
libc6-dev \
libgdiplus \
libx11-dev \
curl \
vim \
supervisor \
procps
|