Hello,
I have a problem with loading a pdf dynamically via the event created like this :
<SfPdfViewerServer @ref="PdfViewer" Height="500px" Width="1060px"> <PdfViewerEvents Created="DocumentLoad"></PdfViewerEvents> </SfPdfViewerServer>
@code{
public SfPdfViewerServer PdfViewer { get; set; }
public void DocumentLoad()
{
byte[] byteArray = System.IO.File.ReadAllBytes("wwwroot/Data/PDF_Succinctly.pdf");
string base64String = Convert.ToBase64String(byteArray);
PdfViewer.Load("data:application/pdf;base64," + base64String, null);
}
}
With the "clasical method (serveur load pdf) it's works with the same pdf but with the method on the top it's crash with message pdf corrupted.
I send you a sample to reproduce. On the left menu you have 2 menu that interresting you :
PDF Viewer6 Rectangle => pdf load by server works
PDF Viewer7 Bug pdf => load dynamically crash
Both load the same pdf.
Thanks,
Nicolas
Attachment:
BlazorAppPOC__Cas_HL_BUG_load_pdf_APRR_a275d060.zip