BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
ssue1: This error on my developpement post
This is my code
< input type="submit" class="btn btn-outline-primary" @onclick="@(() => InitTemplate())" value="Reset Template" />
@code{
EjsPdfViewerServer _viewer;
string _documentPath { get; set; }
List _pdfTemplateList { get; set; } = new List();
protected override async Task OnInitializedAsync()
{
_pdfTemplateList = await _templateService.GetAllAsync();
_documentPath = ("data:application/pdf;base64," + Convert.ToBase64String((byte[])_pdfTemplateList[0].FileTemplate))
await _viewer.Load(_documentPath, null);
}
// this method load the empty template as to clear the formfields sometimes it works sometimes not
public async void InitTemplate()
{
_documentPath = ("data:application/pdf;base64," + Convert.ToBase64String((byte[])_pdfTemplateList[0].FileTemplate))
await _viewer.Load(_documentPath, null);
}
}
|
We are unable to reproduce the reported issue. We suspect that the issue may also due to accessing the PDF Viewer control instance before it is created . So instead of loading the PDF document from the Viewer.Load() method ,you can also use the DocumentPath Property during the control initialization, in which we have provided two way binding support. So by using this property you can set the document as base64 string/path as provided in the below code snippet.
We have also shared the sample for the same . Kindly download the same from the below link.
If you still face the issue , you can use the OnInitialized () method instead of using OnInitializedAsync() method as provided in the below code snippet.
If the provided details does not resolve the issue. Kindly modify the sample in which we have provided . So that would be helpful for us to analysis more and assist you better. | ||
Issue2: On my Nginx server with linux centos nether the one with specified physical path nor the one with the pdf load from service none of them load the pdf |
We are using Pdfium rendering engine for robust rendering in our PDF Viewer, it will generate the Pdfium dll during the run time (i.e, on loading the document). We suspect that due to the write access permission is denied in the production environment the reported issue may occurred and so can you please try copying the below assemblies in the bin folder based on the operating system to production environment to resolve the issue.
Linux: libpdfium.so
Windows: Pdfium.dll
Mac: libpdfium.dylib |
export LD_LIBRARY_PATH=/lib64/
|