This is a migrated thread and some comments may be shown as answers.

PDF Viewer - first render a smaller size than subsequent renders

5 Answers 177 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Scot
Top achievements
Rank 1
Scot asked on 05 Oct 2020, 09:09 PM

The code places the PDF Viewer in a partial razor view.  I am using Zurb Foundation to display a modal dialog.  The PDF viewer displays on the modal dialog.  I am using the OnRender to change the PDF viewer to fit to width.  What I am seeing is the first time that the PDF file is rendered, the PDF file is smaller than subsequent renders while the modal dialog is open.

For example, on the first render of the dialog, I see the following( see attachment FirstRender.png).

While the modal dialog is displayed, I change to another zoom selection and back to fit to width.  This render does appear to fit to width (see attachment SecondRender.png).  Repeating the switch between the selections and back to fit to width yields the same result where fit to width seems to work (see attachment SecondRender.png).

 

Is there some way I can get the first render to fit to width like the subsequent renders?

5 Answers, 1 is accepted

Sort by
0
Aleksandar
Telerik team
answered on 08 Oct 2020, 11:37 AM

Hi Scot,

This is the first time such behavior is being reported. I tried reproducing the behavior using a PDF Viewer in a Kendo Dialog or a Kendo Window but without success. Here is a dojo with a PDF Viewer in a Kendo Window, where the zoom level is set to "Fit to width" on the first loading of a file. 

Would it be possible to modify the above example or provide a runnable example of your own, where the behavior is isolated and can be observed? This way I will be able to debug locally and investigate the behavior further.

Looking forward to hearing back from you.

Regards,
Aleksandar
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Scot
Top achievements
Rank 1
answered on 14 Oct 2020, 03:03 PM
I created a simple Visual Studio solution.  The solution has two buttons that bring up two different modals.  Both come up with the wrong/smaller size.  Choosing a different size once the pdf viewer is shown and going back shows the correct size for that selection.  Reloading the index page brings the issue back.
0
Scot
Top achievements
Rank 1
answered on 14 Oct 2020, 03:04 PM
I couldn't upload the .zip file (approximately 40+ MB) as it exceeded the 2 MB limit.  Is there another way I can get you the .zip file?
0
Scot
Top achievements
Rank 1
answered on 14 Oct 2020, 03:07 PM
Also, when I click on the link for the dojo, I get the an error.  See attachment.
0
Aleksandar
Telerik team
answered on 15 Oct 2020, 02:33 PM

Hi Scott,

You can open a Support ticket, where you can attach a sample up to 20MB. You can delete any packages that can be restored via NuGet to minimize the size of the application. 

Regards,
Aleksandar
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
PDFViewer
Asked by
Scot
Top achievements
Rank 1
Answers by
Aleksandar
Telerik team
Scot
Top achievements
Rank 1
Share this question
or