Error issue with ejs pdf-viewer using serviceURL to request Https

hi All   

When I was using ejs pdfviewer to request the Https method through serviceURL, the frontend was unable to receive my error number properly, causing me to not display the error message properly. However, when requesting HTTP, there was no such issue.


API Return

Image_9224_1747979696380


The handling of front-end events, in the case of Https, the e.errMessage value remains empty and there are no other values for me to refer to. But in the HTTP case, the e.ErrrMessage value is the content of the ReasonPhrase I returned.

Image_4565_1747979696380

How should I handle this situation. I can get the content I want on HTTPS.


Thanks.



5 Replies

SK Sathiyaseelan Kannigaraj Syncfusion Team May 26, 2025 02:59 PM UTC

Hi Qing Yuan,

Thank you for reaching out to us. We are currently investigating the issue you reported and will provide further updates by tomorrow.


Regards,
Sathiyaseelan K



PA Priyadharshini Annamalai Syncfusion Team May 27, 2025 01:03 PM UTC

Hi Qing Yuan,


Please share the code snippet where you're making the request using the serviceUrl in the Syncfusion PDF Viewer. This will help us review how the PDF Viewer is configured and understand how the request is being made.

Also, let us know why you're currently using server rendering mode. For optimal performance, we recommend considering the standalone PDF Viewer. Standalone mode provides improved efficiency and is well-suited for scenarios where offline functionality, low latency, or limited backend infrastructure is a priority.

Documentation Link: Getting started Standalone Angular PDF Viewer component | Syncfusion


Regards,

Priyadharshini




QY Qing Yuan May 28, 2025 07:28 AM UTC

hi All  

   The code is as follows。

 Image_6376_1748417001888Image_9189_1748417194130


Because my PDF needs to update the content selected by the frontend and generate it at any time, I need to use server rendering mode


Thanks




PA Priyadharshini Annamalai Syncfusion Team May 29, 2025 02:05 PM UTC

Hi Qing Yuan,


Thank you for the update. We are currently reviewing the scenario involving both HTTPS and HTTP. We're encountering a CORS error when using HTTP and are actively investigating the issue. We will provide a further update by June 2.



PA Priyadharshini Annamalai Syncfusion Team June 2, 2025 02:04 PM UTC

Hi Qing Yuan,


We are currently unable to reproduce the issue based on the information provided.

To assist you further, could you please share the following details:

1. EJ2 PDF Viewer Component Details

  • What is the URL configured in the serviceUrl property?
  • How is the document being loaded in the PDF Viewer component (e.g., from a stream, URL, or base64)?
  • What is the expected error message when using HTTP?
  • What is the actual error message or behavior when using HTTPS?

2. Request & Response Logs

Please provide full network logs from the browser’s developer tools for both the HTTP and HTTPS scenarios:

  • Failing HTTPS request
  • Working HTTP request

For each request, include:

  • Request URL
  • Status code
  • Response headers and body
  • Any JavaScript console errors (e.g., CORS, Mixed Content, etc.)

3. Environment Details

  • Browser name and version
  • Is the communication happening from localhost to localhost, or from a remote server to the local machine?
  • Are both HTTP and HTTPS requests being served from the same domain and port, or are they different?

4. SSL Certificate and HTTPS Configuration

  • Is the HTTPS certificate valid or self-signed?
  • Is there any proxy, reverse proxy, or load balancer involved?
  • Are there any HSTS policies or content security policies configured on the server?

 

5. Sample for Replication (Optional but Helpful)

If possible, please provide a simple sample project that replicates the issue using the Angular platform.
This would greatly assist us in identifying the root cause and preparing a reference sample if needed.

Additionally, in your initial response, you mentioned:

“Because my PDF needs to update the content selected by the frontend and generate it at any time, I need to use server rendering mode.”

Please note that most scenarios requiring server rendering can also be achieved using standalone rendering. In many cases, server requests can be manually configured from the frontend at the sample level.

To help us determine the feasibility of using standalone mode in your case, could you kindly elaborate further on the specific use case of your application? Based on your explanation, we’ll explore the possibility of achieving this in standalone mode and provide a suitable reference sample.

 

Regards,

Priyadharshini


Loader.
Up arrow icon