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

2 posts, 0 answers
  1. Yijun
    Yijun avatar
    5 posts
    Member since:
    Feb 2013

    Posted 13 Mar 2013 Link to this post

    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.
  2. Kammen
    Kammen avatar
    313 posts

    Posted 15 Mar 2013 Link to this post

    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.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top