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

PDFViewer "Fit"

5 Answers 544 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Kellie
Top achievements
Rank 1
Kellie asked on 17 Feb 2012, 07:09 PM
I would like to make page 1 of my PDF to "fit" to my container size.

Is there a way to do this?

5 Answers, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 27 Feb 2012, 05:46 PM
Hi Kellie,

RadPdfViewer uses the size that is set in the PDF file. The only way to change this behavior is to zoom in/out the content using the ScaleFactor property.
Furthermore, RadPdfViewer does not fit to its parent's size and you should be careful when you are trying to use it in a container element. 

All the best,
Kammen
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Jason
Top achievements
Rank 1
answered on 21 Aug 2012, 05:44 PM
I'd sure like to see this as an enhancement.  While we can do the calculations to determine the viewer size and compare to the PDF size and set the scale factor to fit.
0
Kammen
Telerik team
answered on 24 Aug 2012, 03:22 PM
Hi Jason,

Thank you for the feedback. We have this feature in our todo list, but we have not scheduled it yet.

Regards,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Anna Katrina
Top achievements
Rank 1
answered on 03 Aug 2015, 07:04 PM

Hi guys, any news about this feature? Im hoping to apply in on my control.

0
Deyan
Telerik team
answered on 05 Aug 2015, 02:04 PM
Hello Anna Katrina,

Thank you for contacing us.

The current version of RadPdfViewer allows you to achieve the desired behaviour through the following approaches:
  • You may use the ScaleMode property of RadPdfViewer to specify whether you want to fit to width, fit to page or use the default non-fitting behaviour.
  • You may bind two buttons in the UI to FitToWidthFixedDocumentPagesPresenterCommandDescriptor and FitToPageFixedDocumentSinglePageViewPresenterCommandDescriptor commands. You can see how exactly you can achieve this in the code of our PdfViewer online example.

I hope this is helpful. If you have other questions please contact us again.

Regards,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
PDFViewer
Asked by
Kellie
Top achievements
Rank 1
Answers by
Kammen
Telerik team
Jason
Top achievements
Rank 1
Anna Katrina
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or