We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

loading from array bytes

Thread ID:





147784 Sep 24,2019 08:22 AM UTC Sep 25,2019 10:07 AM UTC ASP.NET Web Forms (Classic) 1
Tags: PDFViewer
Antonio Tedesco
Asked On September 24, 2019 08:22 AM UTC

how do i upload the pdf directly from array bytes?

 Dim jsonResult As Dictionary(Of String, String)
            Dim helper As New PdfViewerHelper()

            Dim docBytes = System.IO.File.ReadAllBytes(HttpContext.Current.Server.MapPath("~/TmpF/uno.pdf"))
            Dim docBase64 As String = Convert.ToBase64String(docBytes)
            Dim byteArray() As Byte = Convert.FromBase64String(docBase64)
            Dim stream As New MemoryStream(byteArray)
            Return JsonConvert.SerializeObject(helper.ProcessPdf(jsonResult))

Akshaya Arivoli [Syncfusion]
Replied On September 25, 2019 10:07 AM UTC

Hi Antonio ,  

Thank you for contacting Syncfusion Support. 

We can load the PDF document as byteArray in the PDF Viewer from the server side using the Load() API in the WebAPI controller. Please find the code snippet from the below, 

Private viewerHelper As New PdfViewerHelper() 
Dim docBytes = System.IO.File.ReadAllBytes(HttpContext.Current.Server.MapPath("~/Data/PdfViewer/HTTP Succinctly.pdf")) 

We have created the sample for the same and shared in the following location, 

Please find the below KB link for reference, 

Please try this revert us with more details if you have any concerns on this. 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon