Unable to load pdf stream

I am getting corrupted file error popup when I am trying to load pdf file getting from backend in file stream whereas the files are loaded when I am getting them directly by converting them in base64. 

The API requires Auth token and other credentials to get the requied file from the server


3 Replies

PA Priyadharshini Annamalai Syncfusion Team October 9, 2024 11:20 AM UTC

Hi


We support loading documents using a Uint8Array in the standalone version, and we have shared the API documentation link for loading documents with a Uint8Array . On the server side, you can convert the document to a Base64 string to load it. 

For API authentication token setup, please refer to the provided documentation link to ensure proper configuration. Additionally, please let us know which API you are using to load the document so we can assist you with a more targeted solution. 

  

Documentation Link: Authorization Token 


Documentation Link for byte array: Byte Array 



MT Mayank Tanwar October 10, 2024 10:56 AM UTC

I have loaded the file using  Uint8Array and also passed the authentication token in headers.


Still I am getting error saying invalid file



PA Priyadharshini Annamalai Syncfusion Team October 14, 2024 12:39 PM UTC

Hi Mayank Tanwar,


Please let us know the specific error you are encountering and share a sample of how you are loading the document. Additionally, inform us whether you are using standalone or server mode, and provide the version you are using. Kindly include the steps to reproduce the issue along with a screenshot of the error you are facing.


Loader.
Up arrow icon