Copy text in PDF Viewer?

7 posts, 0 answers
  1. Victor
    Victor avatar
    13 posts
    Member since:
    Jan 2009

    Posted 20 Jul 2012 Link to this post

    How can I select and copy text to the clipboard with PDF Viewer in Q2?

    I couldn't find anything in the documentation?

    There is a copy method but I cannot select text in the viewer control with the mouse.

    regards,
    Victor
  2. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 20 Jul 2012 Link to this post

    Hello Victor,

    From Q2 RadPdfViewer has a new property called Mode, which controls the current mode (Pan / TextSelection). When you use the text selection mode, you will be able to use the mouse to select text.

    Then, using the Ctrl + C key binding (by default) the text will be copied to the clipboard.

    In addition, you can easily select and copy text in code behind. Here is sample code illustrating how this can be done: 

    public void ShowSelectionAndCopyFeature()
    {
        TextPosition position = new TextPosition                                                                       (this.viewer.Document.CaretPosition);
        position.MoveLineDown();
        position.MoveLineDown();
      
        position.MoveToLineStart();
      
        TextPosition position2 = new TextPosition(position);
        position2.MoveToNextWord();
        position2.MoveToNextPosition();
      
        this.viewer.Select(position, position2);
      
        this.viewer.Copy();
      
        MessageBox.Show(this.viewer.GetSelectedText());
    }

    I hope this helps.


    Regards,
    Kammen
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Victor
    Victor avatar
    13 posts
    Member since:
    Jan 2009

    Posted 20 Jul 2012 Link to this post

    Hello Kammen,

    Thank you, that did it.

    I am really happy that Telerik is improving the PDF Viewer with each release.

    Kind regards,
    Victor
  5. Umapathi
    Umapathi avatar
    8 posts
    Member since:
    Oct 2011

    Posted 12 Sep 2012 Link to this post

    Hi all.,



    Will this work in Windows 8 store apps?? The Pdf file Viewer should be within  Windows 8 store apps...





    Thanks

      Umapathi
  6. Georgi
    Admin
    Georgi avatar
    296 posts

    Posted 13 Sep 2012 Link to this post

    Hi Umapathi,

    Thank you for your question.

    We are currently evaluating the user scenarios that may require a PDF Viewer for Windows Store apps. We have the control in our radar but I cannot give any estimation on its availability, so stay tuned for more information to come :)

    I hope this information is useful. Let me know if I can help you in some other way.

    Greetings,
    Georgi
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  7. Will
    Will avatar
    1 posts
    Member since:
    Feb 2012

    Posted 06 Nov 2012 Link to this post

    The ability to embed this PDFViewer into a Windows Store app will be huge for us. I've been searching for a solution for days and came across Foxit that can do the job. But I've had bad tech support from them so I'm trying to stay away from using their products again. Please keep me posted as soon as this product is available for use in Windows Store app. Thanks.
  8. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 12 Nov 2012 Link to this post

    Hi, Will

    Thank you for your trust.

    The interest for PDF Viewer is growing and as soon as we have more clarity about this question I will contact you immediately.

    If you have any other questions or ideas do not hesitate to write us again.

    Regards,
    Ivaylo Gergov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready