Hi SF Team,
I am experiencing the same issue. But with ASP.Net MVC.
Syncfusion version 19.4.0.52.
Here is a sample PDF. https://drive.google.com/drive/folders/1PYjTe6QfvhJStdBemrkuySMlghhf7V5F?usp=sharing
I hope someone could assist me on this. Thank you.
Regards,
Marvin
Attachment: PDFs_b8b7e374.zip
Hi Marvin,
We were able to reproduce the reported issue with the provided document. We will analyze further on this and update you with more details on April 19, 2022.
Regards,
Vasugi.
Hi Marvin,
We can resolve
the reported issue by providing the maxAllowedContentLength and request length
on the web. config file. And need
to increase the maximum length for serializing the large-sized JSON object. So, we have created a class LargeJsonValueProviderFactory and modified the code to increase the length for serialization
in the file Global.asax.cs. Kindly refer to
the below code snippet and sample.
Code Snippet:
<httpRuntime targetFramework="4.7.2" maxRequestLength="2147483647" executionTimeout="1600" requestLengthDiskThreshold="2147483647" />
<requestLimits maxAllowedContentLength="2147483647" />
|
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/GettingStarted_MVC2051814703
Kindly try this and let us know if this helps you.
Regards,
Vasugi
Hi Vasugi,
I'm using version 4.6.1 for framework. Is it okay or do I need to update it to 4.7.2 also?
Thank you.
Regards,
Marvin Al
Hi Vasugi,
I tried it with both versions 4.7.2 and 4.6.1. Also, I tried your sample app.
But only the figure 2 were able to load. The figure 2(1) didn't load.
https://drive.google.com/drive/folders/1PYjTe6QfvhJStdBemrkuySMlghhf7V5F the files here.
Were you able to try both files?
Thank you. Hoping fo
Regards,
Marvin Alfonso
Hi Marvin,
It is okay to use the provided suggestion in the 4.6.1 framework. We have ensured the same in the following sample.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/GettingStarted_MVC-1631764041
Regards,
Shamini
Hi Shamini,
I tried both files again on your sample project but the figure 2(1) the 33Mb file is not loading.
"Web-service is not listening" error is showing.
Do you have idea why it's happening on my end?
Regards,
Marvin
Hi Marvin,
On further analysis, we have found that we have used the viewportHeight property in the jsonObjects class of the PdfViewerController file instead of using the viewPortHeight property. So the document was not rendered. Please refer to the below code snippet and modified sample for our reference.
Code Snippet:
public class jsonObjects { …… public string viewPortHeight { get; set; }
} |
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/GettingStarted_MVC-914216573
However, the PDF file is still rendered as tiles instead of loading the entire document. We will validate this and let you know the details on April 28, 2022.
Regards,
Shamini
Hi Marvin,
Currently, we are validating the reported issue, we will check further on this and provide further details on April 29, 2022.
Regards,
Vasugi.
Hi Marvin,
We have used the tile rendering approach in our PDF Viewer control. If the page width is greater than the A4 size page, then we will split them into tiles and send the request for each tile and retrieve the data for the specific region. But we can also disable the tile rendering approach by setting enableTileRendering to FALSE in tileRenderingSettings API. Please refer to the below code snippet and documentation.
<div style="height:500px;width:100%;"> @Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).DocumentPath("figure 2 (1).pdf").Created("created").Render() </div> <script> function created() { var viewer = document.getElementById('pdfviewer').ej2_instances[0]; viewer.tileRenderingSettings.enableTileRendering = false; } </script> |
Documentation: https://ej2.syncfusion.com/documentation/api/pdfviewer/tileRenderingSettings/
However, we have improved the clarity of the image while rendering the PDF document. So, it will take time and memory to load the document. We have planned for converting the PDFIUM as a WASM library to achieve pure client rendering to improve the loading performance. The feature implementation will be included in any of our upcoming releases.
You can track the status using the below feedback link,
Regards
Vasugi.
Hi Syncfusion team,
May I know what modifications did you make in PdfViewerController?
In previous reply, you mentioned "we have found that we have used the viewportHeight property in the jsonObjects class of the PdfViewerController file instead of using the viewPortHeight property."
Regards,
Marvin
Hi Marvin,
The sample provided in the below update has one of the properties in the jsonObjects class inside the PdfViewerController as “public string viewportHeight { get; set; }".
The property should be “public
string viewPortHeight { get; set; }”. The change is only with the casing in the
mentioned property as highlighted. Similarly, we have also changed for the
viewPortWidth property in the PdfViewerController.cs file.
Regards,
Shamini
Hi Shamini,
Thank you. It's now working but there's another issue.
I tried to imitate this
"@Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).DocumentPath("figure 2 (1).pdf").Created("created").Render()"
But I encountered an error:
Uncaught ReferenceError: created is not defined
My Syncfusion version is 19.4.0.52
Regards,
Marvin
Hi Marvin,
We have checked the reported issue with the provided version v19.4.0.52. But we were unable to reproduce it. We have shared the simple sample in which we have tried to reproduce the issue, please refer to the below link.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/GETTIN~1-1125876219
Kindly try this and revert to us with a simple sample to replicate the reported issue on our end. This will be helpful to investigate further and provide the solution at the earliest.
Regards,
Vasugi