PDFViewer "Fit"

6 posts, 0 answers
  1. Kellie
    Kellie avatar
    6 posts
    Member since:
    Oct 2011

    Posted 17 Feb 2012 Link to this post

    I would like to make page 1 of my PDF to "fit" to my container size.

    Is there a way to do this?
  2. Kammen
    Kammen avatar
    312 posts

    Posted 27 Feb 2012 Link to this post

    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,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
  4. Jason
    Jason avatar
    13 posts
    Member since:
    Jul 2010

    Posted 21 Aug 2012 Link to this post

    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.
  5. Kammen
    Kammen avatar
    312 posts

    Posted 24 Aug 2012 Link to this post

    Hi Jason,

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

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Anna Katrina
    Anna Katrina avatar
    9 posts
    Member since:
    Feb 2013

    Posted 03 Aug 2015 Link to this post

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

  7. Deyan
    Deyan avatar
    125 posts

    Posted 05 Aug 2015 Link to this post

    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.

    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
Back to Top
DevCraft R3 2016 release webinar banner