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

Display PDF and WORD documents in Carousel control

5 Answers 271 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Dip
Top achievements
Rank 1
Dip asked on 07 Jul 2009, 08:15 AM
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.

5 Answers, 1 is accepted

Sort by
0
Ivan Rivas
Top achievements
Rank 2
answered on 07 Jul 2009, 03:50 PM
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.
0
Dip
Top achievements
Rank 1
answered on 08 Jul 2009, 05:11 AM
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?
0
Peter
Telerik team
answered on 09 Jul 2009, 08:55 AM
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.
0
Dip
Top achievements
Rank 1
answered on 13 Jul 2009, 05:43 AM
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.
0
Nick
Telerik team
answered on 13 Jul 2009, 11:22 AM
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.
Tags
Carousel
Asked by
Dip
Top achievements
Rank 1
Answers by
Ivan Rivas
Top achievements
Rank 2
Dip
Top achievements
Rank 1
Peter
Telerik team
Nick
Telerik team
Share this question
or