使用AxInterop.AcroPDFLib打开pdf

首先添加两个dll到引用中

AxInterop.AcroPDFLib.dll

Interop.AcroPDFLib.dll

 

使用前,一定要初始化。下面摘自网上,没有测试过

AxAcroPDFLib.AxAcroPDF acroPDF = new AxAcroPDFLib.AxAcroPDF();
            ((System.ComponentModel.ISupportInitialize)(acroPDF)).BeginInit();
            acroPDF.Location = new Point(0, 24);
            acroPDF.Size = new Size(300, 300);
            acroPDF.Dock = DockStyle.Fill;
            this.Controls.Add(acroPDF);
            ((System.ComponentModel.ISupportInitialize)(acroPDF)).EndInit();
            acroPDF.LoadFile(filepath);

posted on 2016-11-17 21:59  mol1995  阅读(2905)  评论(0)    收藏  举报

导航