Display PDF and WORD documents in Carousel control

6 posts, 0 answers
  1. Dip
    Dip avatar
    3 posts
    Member since:
    Jun 2009

    Posted 07 Jul 2009 Link to this post

    Hi,
    Can we display PDF or MS Word documents or Simple Text Documents using the Carousel Control?
    If yes, can anyone point tme to some samples or codes using which I can do this.
    This is one of the requirements and we are evaluating the Telerik Carousel Control for the feasibility.
    Thanks.
    -Dip.
  2. Ivan Rivas
    Ivan Rivas avatar
    2 posts
    Member since:
    Jul 2009

    Posted 07 Jul 2009 Link to this post

    Hola,

    Generally, you can show any kind of documents as hosted ActiveX controls. I saw a post here that duscusses how to add ActiveX control in RadCarousel - this may be helpful for you, Dip. On the other hand, hosting ActiveX control will hit the performance since the animated documents will require much more resources. In addition, RadCarousel supports reflections, scaling and many visual effects which will be affected by the complex visual appearance that a document has. However, note that the ActiveX content is your responsibility - there should be a component which opens the the word/pdf document and then this component should be wrapped as an ActiveX control.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dip
    Dip avatar
    3 posts
    Member since:
    Jun 2009

    Posted 08 Jul 2009 Link to this post

    Thanks Ivan.
    I tried doing this using TxTextControl which provides an ActiveX control for displaying various documents.
    But the scaling/reflection doesn't work and hence the display and animation doesn't look very elegant.
    Let's see if I can find something better.
    BTW Ivan, the link you provided doesn't seem to work. Can you please post the correct link?
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 09 Jul 2009 Link to this post

    Hi all,

    Thank you Ivan for the clarifications.

    Dip, RadCarousel can show external controls, but the reflection and RadCarousel performance depend on the complexity of the specific control. For more complex controls, there are possible visual issues, for example - the reflection relies on the GetAsBitmap API function and if the specific hosted control does not support it, the reflection could be missing. The best approach in such situations is to rotate not the actual control, but a screenshot of it, and when the user clicks on the screenshot, you should then show the real document.

    Please refer to this RadCarousel Code Library where we are demonstrating how RadCarousel rotates large images using this approach.

    Kind regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Dip
    Dip avatar
    3 posts
    Member since:
    Jun 2009

    Posted 13 Jul 2009 Link to this post

    Thankyou Peter, that was really helpful.
    I have used pdf2image (a 3rd party dll) for creating the images and using your example, it is working great now.
    Infact my client has already purchased the Telerik Control Suite. (Unique customer ID is: lQ293336)
    I was just wondering if you could tell me how to automatically zoom the foremost/frontmost image, while we are clicking 'Previous' or 'Next', just like the way it zooms when we click on an image.
    On double clicking an image, I am opening the actual pdf file.
    Hope to hear from you soon.
    -Dip.
  7. Nick
    Admin
    Nick avatar
    767 posts

    Posted 13 Jul 2009 Link to this post

    Hi Dip,

    You need to subscribe to the DoubleClick event of the button if you use an ImageButton:

    button.DoubleClick += new EventHandler(button_DoubleClick); 
     
    ... 
     
    void button_DoubleClick(object sender, EventArgs e) 
        throw new Exception("The method or operation is not implemented."); 

    Do not hesitate to write me back if you have further questions.

    All the best,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for WinForms is Visual Studio 2017 Ready