Winform .pdf读者参考 [英] winform .pdf reader reference
本文介绍了Winform .pdf读者参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我应该在winform参考中添加哪个参考来阅读.pdf文件?
Hi,
Which reference do I add in winform references to read .pdf files?
Thanks
推荐答案
ou可以引用Adobe Reader ActiveX控件并将其与您的应用程序捆绑在一起.
ou can reference the Adobe Reader ActiveX control and bundle it with your application.
AxAcroPDFLib.AxAcroPDF pdf = new AxAcroPDFLib.AxAcroPDF();
pdf.Dock = System.Windows.Forms.DockStyle.Fill;
pdf.Enabled = true;
pdf.Location = new System.Drawing.Point(0, 0);
pdf.Name = "pdfReader";
pdf.OcxState = ((System.Windows.Forms.AxHost.State)(new System.ComponentModel.ComponentResourceManager(typeof(ViewerWindow)).GetObject("pdfReader.OcxState")));
pdf.TabIndex = 1;
// Add pdf viewer to current form
this.Controls.Add(pdf);
pdf.LoadFile(@"C:\MyPDF.pdf");
pdf.setView("Fit");
pdf.Visible = true;
这篇关于Winform .pdf读者参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文