Do you still have a code for PDF Viewer for v17.3.29?

I'm imagining a code that is similar to these:

@using Syncfusion.Blazor.PdfViewerServer

<SfPdfViewerServer ID="pdfviewer" DocumentPath="@DocumentPath" Width="1060px" Height="500px"/>

@code {
    static byte[] byteArray = System.IO.File.ReadAllBytes("wwwroot/data/PDF_Succinctly.pdf");
    static string base64String = Convert.ToBase64String(byteArray);
    public string DocumentPath { get; set; } = "data:application/pdf;base64," + base64String;
}

but for v17.3.29.

A code also for






1 Reply

AA Akshaya Arivoli Syncfusion Team March 30, 2020 11:09 AM UTC

Hi There, 

Thank you for contacting Syncfusion support. 

We have modified the EJ2 PDF Viewer Blazor namespace and initialization form our 2020 Volume 1 beta release. So kindly upgrade to our latest release version to work with the code provided in the UG documentation. Please find the update UG documentation to getting started with PDF Viewer, 

 
Please refer to the release notes for more details, 
 

Also please find the below code snippet to work with the earlier versions(17.3.0.29 )to the 2020 Volume 1 Beta release 

 
<EjsPdfViewerServer @ref="@PDFViewer" Height="500px" Width="1060px" DocumentPath="@documentPath" ></EjsPdfViewerServer> 
 
 
 
@code{ 
        EjsPdfViewerServer PDFViewer; 
   
  static byte[] byteArray = System.IO.File.ReadAllBytes("wwwroot/data/PDF_Succinctly.pdf"); 
    static string base64String = Convert.ToBase64String(byteArray); 
    public string documentPath { get; set; } = "data:application/pdf;base64," + base64String; 
} 




Please try it and revert us with more details about your issue, exception/console error details, modified sample if you have any concerns. These details will be helpful for us to investigate further and assist you better.  

Regards, 
Akshaya. 



Loader.
Up arrow icon