在WPF应用程序中打开PDF
我已通过此链接在WPF应用程序中打开PDF:在WPF应用程序中打开PDF,wpf,pdf,Wpf,Pdf,我已通过此链接在WPF应用程序中打开PDF: System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AxAcroPDFLib.AxAcroPDF)); ` // axAcroPdf1 = new AxAcroPDFLib.AxAcroPDF(); //this.axAcroPdf1.Dock = System.Win
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AxAcroPDFLib.AxAcroPDF)); ` // axAcroPdf1 = new AxAcroPDFLib.AxAcroPDF();
//this.axAcroPdf1.Dock = System.Windows.Forms.DockStyle.Fill;
//this.axAcroPdf1.Enabled = true;
//this.axAcroPdf1.Name = "Demo";
//this.axAcroPdf1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axAcroPdf1.OcxState")));
//axAcroPdf1.LoadFile(AppDomain.CurrentDomain.BaseDirectory + "\\FileStorage\\Demo.pdf");
// axAcroPdf1.Visible = true;
有这样一个例外:
找不到任何适合指定区域性或中性>区域性的资源。确保在编译时已将AxAcroPDFLib.axacropdpdf.resources正确嵌入或链接>到程序集AxInterop.AcroPDFLib中,或者确保所需的所有附属>程序集都是可加载和完全签名的
我可以想到两件事:1。您缺少AxAcroPDFLib.AxAcroPDF.resources参考资料希望这不是太高人一等:2。DLL被阻止。使用资源管理器在其上单击鼠标右键,单击“属性”,然后单击“取消阻止”。