zoukankan      html  css  js  c++  java
  • 怎样把PDF文件在WinForm窗口中显示出来

    Steps to create the C# version
    1. Create a windows form application by using VS

    2. Make the Acrobat control available in the toolbox of VS
    Tools->Add/Remove Toolbox Items: turn on "Adobe Acrobat 7.0 Browser Document" in COM Components tab. You will see it in the Toolbox's General tab.

    3. Drag this control to the form. you get:
    private AxAcroPDFLib.AxAcroPDF axAcroPDF1;

    4. Load a pdf file and make it show up.
    axAcroPDF1.LoadFile("mypdf.pdf");
    axAcroPDF1.Show();
    5. Compile and run, you will see the document showing up inside of the control.

    Here is the code piece.
    public class Form1 : System.Windows.Forms.Form
    {
    private AxAcroPDFLib.AxAcroPDF axAcroPDF1;
    ///
    /// Required designer variable.
    ///
    private System.ComponentModel.Container components = null;

    public Form1()
    {
    //
    // Required for Windows Form Designer support
    //
    InitializeComponent();

    axAcroPDF1.LoadFile("mypdf.pdf");
    axAcroPDF1.Show();
    }

    ... ... ... here is the code generated by VS.

    本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/JimFire/archive/2006/02/18/601949.aspx

  • 相关阅读:
    Linux文件结构
    磁盘分区
    BASH简介
    磁盘的基本概念
    Linux文件操作
    创建文件系统
    文件系统挂载
    一些常用命令
    asp.net创建PPT
    asp.net创建、删除、移动文件夹 文件
  • 原文地址:https://www.cnblogs.com/OwenWu/p/1677350.html
Copyright © 2011-2022 走看看