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

PDF viewer not loading any document when the parent UserControl is loaded by MEF...

1 Answer 74 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Yijun
Top achievements
Rank 1
Yijun asked on 13 Mar 2013, 07:56 AM
I have an application where I use MEF to dynamically load XAP and use composition imports/exports to load the views.
Using the same exact view in a project without MEF, everything works fine.
But, when I use that view in my MEF project, the documents are not loaded.
It use to work properly until I updated to version 2013.1.0220.  I noticed that there were more requirements for DLLs and added them to both projects.  What could be the problem?  I have spent several hours trying to figure out the issue.
What I'm trying to do is just open a PDF from the client PC using the "Open" command from the toolbar (I'm using the exact code as the example in the Demos).

By the way,  My solution is too big to send to you, so in case you need to see it would be better to give you access to my PC and have a life chat/call to explain to you where to find things.  

Thank you.

1 Answer, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 15 Mar 2013, 02:35 PM
Hi Yijun,

There is a known issue that is connected with resource files that are embedded in the Telerik.Windows.Documents.Fixed.dll. In some cases, RadPdfViewer cannot access those resources and throws InvalidOperationException - "Cannot access the resource file.". You can check if this is your case if you try to import your document using directly PdfFormatProvider.Import() method instead of using the PdfDocumentSource. If this is your case, the InvalidOperationException will be thrown when you call the Import() method.

We are looking forward to your reply.

Regards,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

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