Hello,
Is there a way to load pdf from byte array with parameter like DocumentPath ?
I 'know that is possible to load pdf like this :
@using Syncfusion.Blazor.PdfViewerServer
@using Syncfusion.Blazor.Buttons
<SfButton @onclick="clicked">Load Document</SfButton>
<SfPdfViewerServer DocumentPath="@DocumentPath" Height="500px" Width="1060px" @ref="Viewer"></SfPdfViewerServer>
@code{
SfPdfViewerServer Viewer;
private string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succinctly.pdf";
public void clicked()
{
byte[] byteArray = System.IO.File.ReadAllBytes("wwwroot/Data/Python_Succinctly.pdf");
string base64String = Convert.ToBase64String(byteArray);
Viewer.Load("data:application/pdf;base64," + base64String, null);
}
}
But I want to load the pdf right now after the component loaded => there is an event after component loaded where I can load my byte array ?
Thanks,
Nicolas