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

Issue with PdfViewer and System.Drawing.Common.dll

Hi Team,
i tried the PDF Viewer Preview and understood the working principle and implemented it as mentioned in your demo.
Unfortunately there is an error with the System.Drawing.Common.dll.
You use this reference for creating a bitmap of the selected page out of the in-memory-stored pdf-bytes[]. During creating this bitmap i encountered this error and wanted to ask you if you can reproduce that error or what may caused that thing?

I use this references... 

Please note the comments below… everything works until it goes to the point where the image-conversion starts...

7 Replies

RT Ramya Thirugnanam Syncfusion Team January 7, 2019 07:29 AM UTC

Hi Florian, 
Thanks for contacting Syncfusion support. 
We are unable to reproduce the reported issue with mentioned scenario. However, we suspect that the issue may be occurred when the value of the zoomFactor is negative in the jsonObject. We have provided the sample and JsonObject image (screenshot to pdf) to represent this. Please refer to the sample as below. 
The jsonObject must contain variables as shown in the below screenshot to render the PDF document. 
Could you please validate the provided sample with reported issue the above sample and provide us with the modified sample or video to replicate the reported issue and confirm us whether you are sending your own JSON data. if so please provide us JSON data regarding it.  
Ramya T 

FS Florian Schwendtner January 7, 2019 05:38 PM UTC

Hi Ramya,

thanks for your reply!

I brought it alive now... and yes, it was the zoomFactor.

Now another thing: if I load a pdf in the viewer and the viewer is too small to display it at a zoomValue of 100 and tries to open it with a zoomValue of around 0.60 the page is not getting displayed properly. I came across this issue with the following code but you need to help me how to reset the zoomValue programmatically until the document is loaded properly.