首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

-Form画面显示PDF文件-解决方案

2012-05-08 
--Form画面显示PDF文件--C#的Form程序显示PDF文件,要实现放大,缩小,翻转,取页数等功能,用什么来实现比较好

--Form画面显示PDF文件--
C#的Form程序显示PDF文件,要实现放大,缩小,翻转,取页数等功能,用什么来实现比较好,大家讨论讨论!
先谢谢了!!!

[解决办法]
try
 {
 System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(PdfForm));
 AxAcroPDFLib.AxAcroPDF axAcroPdf = new AxAcroPDFLib.AxAcroPDF();
 
((System.ComponentModel.ISupportInitialize)(axAcroPdf)).BeginInit();
 
axAcroPdf.Location = new Point(50, 50);
 axAcroPdf.Size = new Size(500, 500);
 axAcroPdf.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axAcroPdf.OcxState")));
 
this.Controls.Add(axAcroPdf);
 ((System.ComponentModel.ISupportInitialize)(axAcroPdf)).EndInit();
 
axAcroPdf.LoadFile("C:\\test.pdf");
 axAcroPdf.Show();
 }
 catch (Exception ex)
 {
 MessageBox.Show(ex.Message);
 }
 

热点排行