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

Updating to SP1: Error InvalidCastException

4 Answers 58 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Deepak Shakya
Top achievements
Rank 1
Deepak Shakya asked on 03 Jan 2012, 09:09 AM
Hi,

I just updated to Q3 2011 SP1 so that I can get more document support for PDF viewer. After the installation and the upgrade wizard in VS2010, I have now reference to assemblies of version: 2011.3.1220.1040

When I run the project, it runs fine, expect that when I click on the button to open to PDFViewer in ChildWIndow, it crashes and gives error that says that I have a InvalidCastException.

Please see attached.

  • Basically it says that it cannot convert "System.Windows.Controls.ComboBox" to type "Telerik.Windows.Controls.RadComboBox".
  • I do not have any ComboBoxes in the childwindow. Just the PDFViewer inside a border.

Any help is appreciated.

4 Answers, 1 is accepted

Sort by
0
Accepted
Kammen
Telerik team
answered on 04 Jan 2012, 10:51 AM
Hello Deepak,

Are you sure that all the references you are using are replaced with that from the Q3 SP1? This problem is certainly caused by an "old" reference. Please double check the versions of all dlls and let us know if the problem persists.

Regards,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Deepak Shakya
Top achievements
Rank 1
answered on 05 Jan 2012, 02:46 AM
Hi Kammen,

Thanks once again for your reply. I checked all the dlls and they were all the recent version. The problem was in the styling of the PDFViewer. I had modified the template of the PDFViewer. After upgrading, even though I had new dlls, the style was still the old one. Upon investigating the style, the old one uses ComboBox for the zoom percent whereas the new one uses RadComboBox for the zoom percent. Hence the issue of InvalidCastException.

Solution:
Creating a new template design from the new PDFViewer.

Many thanks!

However, the embedded images in the PDF document is still not being displayed.
0
Deepak Shakya
Top achievements
Rank 1
answered on 05 Jan 2012, 02:59 AM
Hi Kammen,

Could you please try and open the PDF document in my skydrive and see you can view the embedded bitmap? I can see the embedded bitmap with Acrobat Reader but not with PDFViewer.

https://skydrive.live.com/redir.aspx?cid=56c17b3fa2de6729&resid=56C17B3FA2DE6729!129&parid=56C17B3FA2DE6729!128&authkey=!AK11it3y7SFSEKc
0
Kammen
Telerik team
answered on 06 Jan 2012, 11:43 AM
Hello Deepak Shakya,

Thank you for the feedback. Extending the supported image formats is next in our to-do list. We will do our best to support as many different image formats as possible for the Q1 release of the RadPdfViewer.
Let us know if anything else pops up.


Greetings,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
PDFViewer
Asked by
Deepak Shakya
Top achievements
Rank 1
Answers by
Kammen
Telerik team
Deepak Shakya
Top achievements
Rank 1
Share this question
or