Hi,
The SyncFusion PdfViewer component in React provides a print button. The default demo of this component renders a 60 pages document. If I try to print this document
Demo: https://ej2.syncfusion.com/react/demos/#/bootstrap5/pdfviewer/default
Is this a bug or it is the expected behavior and UX of the print button? Is there anything we can do on our side to improve the print functionality? We could like to offer this feature to our users but the current implementation is completely unusable.
Regards,
Sandro
Please find the details.
|
it takes two whole minutes until the print dialog of the browser is shown (+ another 30 seconds until the preview is ready) in Brave
|
According to the current architecture of the print function in the PDF Viewer, there are service calls for each page to obtain the page as an image. Once the rendering is complete, the pages will be displayed in the preview dialog. Therefore, the rendering process takes time depending on the image size. If you have tried using our demo service URL to experience the issue, we strongly recommend using your own web service instead. This will result in a slightly faster printing experience compared to the demo service URL. For instructions on creating the web service in ASP.NET Core, you can refer to the link below.
https://ej2.syncfusion.com/documentation/pdfviewer/how-to/create-pdfviewer-service-core
However, we have planned a pure client-side rendering component to improve rendering performance. Currently, we are working on client-side rendering support, which may be available in our upcoming 2023 Vol 3 main release. You can track the status of this using the following feedback.
Feedback Link: https://www.syncfusion.com/feedback/25761/pdfium-source-web-assembly-implementation-for-client-side-rendering |
|
the spinner is not properly shown and the whole page is unresponsive during this time, resulting in a very bad user experience
|
The spinner is loading properly while printing the document. We have attached video recording below for your reference.
Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/SpinnerVideo-1287554718.zip
|
|
the end result is very blurry compared to the original file (when downloading it)
|
Could you please verify if the blurriness in the printed document is observed when zooming in or under different circumstances? If this issue is specific to a particular document, could you kindly share a copy of the PDF file for further analysis? Furthermore, if the problem occurs during physical printing, please provide details about the printer being used. |
Hi,
it takes two whole minutes until the print dialog of the browser is shown (+ another 30 seconds until the preview is ready) in Brave | I now tested it locally with Docker Desktop and it's also very slow (actually even slower but on a different notebook so hard to compare). In your video it takes ~90 seconds which is also very slow. So we have to wait for the client-side rendering implementation? |
the spinner is not properly shown and the whole page is unresponsive during this time, resulting in a very bad user experience
| It depends on the OS / browser. Sometimes it's okay, sometimes not. |
| the end result is very blurry compared to the original file (when downloading it) | I've attached a ZIP folder with the original pdf (sample.pdf) and the printed document. If you open it, set the view "Fit to width" and switch between the two documents you will clearly see the difference. This happens with any PDF. |
Please find the details,
|
I now tested it locally with Docker Desktop and it's also very slow (actually even slower but on a different notebook so hard to compare). In your video it takes ~90 seconds which is also very slow.
So we have to wait for the client-side rendering implementation?
|
Yes, the issue will be resolved in the client-side rendering implementation. |
|
It depends on the OS / browser. Sometimes it's okay, sometimes not.
|
Can you kindly provide details about the OS and browser where the spinner is not displaying properly? If possible, provide a video recording showcasing the reported issue. |
|
I've attached a ZIP folder with the original pdf (sample.pdf) and the printed document. If you open it, set the view "Fit to width" and switch between the two documents you will clearly see the difference. This happens with any PDF.
|
We have already logged the feature request to set the print quality. Although we cannot provide an exact timeline for when this feature will be available, rest assured that it will be incorporated in one of the upcoming volume releases. To stay updated on the status of this feature, please refer to the feedback provided below.
Feedback - Provide an API to set the print quality | Feature Feedback
|
I tested it using Chrome 115.0.5790.114 on macOS 12, see the attached video. But while printing the whole page is not responsive (e.g. scrolling is extremely delayed), which is reproducible on other devices (that show the spinner properly) too.
But the time it takes for printing the document + the blurry results are much more important and block us from using this feature right now. The spinner is just a side issue
The slow printing issue will be addressed in the client-side rendering implementation.
Regarding the blurry printing issue, it has been resolved by implementing the "Provide an API to set the print quality" feature. We have a roadmap that includes various features and improvements, and this specific feature will be implemented in one of our future releases. However, we cannot provide an exact timeline for its availability at the moment.
I am experiencing issues with the printing functionality of the PdfViewer component in React. When I try to print a 60-page document, it takes about two minutes for the print dialog to appear, followed by another 30 seconds for the preview to load. During this time, the page becomes unresponsive, and there is no spinner displayed, which is frustrating for users.
Demo: https://ej2.syncfusion.com/react/demos/#/bootstrap5/pdfviewer/defaultcrossy road
Additionally, the printed output is very blurry compared to the original PDF file.
Hi Charlotten,
Thank you for your
patience. We recommend using the latest version of the Syncfusion React PDF
Viewer, as the demo page you referenced is outdated. We have attached a sample
using the latest version of the PDF Viewer along with the updated demo
link.
If you are experiencing any issues with specific PDF documents, please share the document you tested. This will help us analyze the cause and provide an accurate solution for the problem you are facing.
Updated
demo link
Sample in
latest version