• 大小: 5.61M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-05-01
  • 语言: C#
  • 标签: view  pdf  

资源简介

使用pdfview加载PDF文件等,PDF阅读控件示例(VeryPDF PDFView OCX)

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication
{
    public partial class Form1 : Form
    {
        int nViewMode = 0;
        public Form1()
        {
            InitializeComponent();
        }

        private void Open_Click(object sender EventArgs e)
        {
            OpenFileDialog dlgOpen = new OpenFileDialog();
            if (dlgOpen.ShowDialog() == DialogResult.OK)
            {
                axPdfview1.OpenPDF(dlgOpen.FileName ““ ““);
            }
        }

        private void NextPage_Click(object sender EventArgs e)
        {
            axPdfview1.ViewNextPage();
        }

        private void ActualSize_Click(object sender EventArgs e)
        {
            axPdfview1.ZoomActualPage();
        }

        private void PreviousPage_Click(object sender EventArgs e)
        {
            axPdfview1.ViewPreviousPage();
        }

        private void FitPage_Click(object sender EventArgs e)
        {
            axPdfview1.ZoomFitPage();
        }

        private void FitWidth_Click(object sender EventArgs e)
        {
            axPdfview1.ZoomFitWidth();
        }

        private void ZoomIn_Click(object sender EventArgs e)
        {
            axPdfview1.ZoomIn();
        }

        private void ZoomOut_Click(object sender EventArgs e)
        {
            axPdfview1.ZoomOut();
        }

        private void ViewMode_Click(object sender EventArgs e)
        {
            if (nViewMode == 0)
                axPdfview1.ViewModeSinglePage();
            else if (nViewMode == 1)
                axPdfview1.ViewModeFacing();
            else if (nViewMode == 2)
                axPdfview1.ViewModeContinuous();
            else if (nViewMode == 3)
                axPdfview1.ViewModeContinuousFacing();
            nViewMode++;
            if (nViewMode >= 4)
                nViewMode = 0;
        }

        private void RotateLeft_Click(object sender EventArgs e)
        {
            axPdfview1.RotateViewLeft();
        }

        private void RotateRight_Click(object sender EventArgs e)
        {
            axPdfview1.RotateViewRight();
        }

        private void Search_Click(object sender EventArgs e)
        {
            axPdfview1.SetFindText(SearchString.Text);
            axPdfview1.FindNextText();
        }

        private void SearchNext_Click(object sender EventArgs e)
        {
            axPdfview1.FindNextText();
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2009-06-30 14:06  PDFView\
     文件     3127142  2012-12-07 01:56  pdfview.exe
     目录           0  2008-10-30 17:35  PDFView\C#\
     目录           0  2008-10-30 17:32  PDFView\C#\WindowsFormsApplication\
     文件         959  2008-10-30 17:11  PDFView\C#\WindowsFormsApplication.sln
     文件       19456  2009-06-29 14:32  PDFView\C#\WindowsFormsApplication.suo
     目录           0  2009-06-29 14:32  PDFView\C#\WindowsFormsApplication\bin\
     目录           0  2008-10-30 17:18  PDFView\C#\WindowsFormsApplication\bin\Debug\
     文件        7168  2008-10-30 16:58  PDFView\C#\WindowsFormsApplication\bin\Debug\AxInterop.PDFVIEWLib.dll
     文件        7680  2008-10-30 17:13  PDFView\C#\WindowsFormsApplication\bin\Debug\Interop.PDFVIEWLib.dll
     文件       13312  2008-10-30 17:32  PDFView\C#\WindowsFormsApplication\bin\Debug\WindowsFormsApplication.exe
     文件       30208  2008-10-30 17:32  PDFView\C#\WindowsFormsApplication\bin\Debug\WindowsFormsApplication.pdb
     文件       14328  2009-06-29 14:32  PDFView\C#\WindowsFormsApplication\bin\Debug\WindowsFormsApplication.vshost.exe
     文件         490  2007-07-21 02:33  PDFView\C#\WindowsFormsApplication\bin\Debug\WindowsFormsApplication.vshost.exe.manifest
     目录           0  2009-06-29 14:32  PDFView\C#\WindowsFormsApplication\bin\Release\
     文件        2707  2008-10-30 17:32  PDFView\C#\WindowsFormsApplication\Form1.cs
     文件       11777  2008-10-30 17:32  PDFView\C#\WindowsFormsApplication\Form1.Designer.cs
     文件        6277  2008-10-30 17:32  PDFView\C#\WindowsFormsApplication\Form1.resx
     目录           0  2009-06-29 14:32  PDFView\C#\WindowsFormsApplication\obj\
     目录           0  2009-06-29 14:32  PDFView\C#\WindowsFormsApplication\obj\Debug\
     文件        7168  2008-10-30 16:58  PDFView\C#\WindowsFormsApplication\obj\Debug\AxInterop.PDFVIEWLib.dll
     文件        8704  2009-06-29 14:32  PDFView\C#\WindowsFormsApplication\obj\Debug\Interop.PDFVIEWLib.dll
     目录           0  2008-10-30 16:57  PDFView\C#\WindowsFormsApplication\obj\Debug\TempPE\
     文件        2244  2009-06-29 14:32  PDFView\C#\WindowsFormsApplication\obj\Debug\WindowsFormsApplication.csproj.FileListAbsolute.txt
     文件         847  2008-10-30 17:32  PDFView\C#\WindowsFormsApplication\obj\Debug\WindowsFormsApplication.csproj.GenerateResource.Cache
     文件         614  2009-06-29 14:32  PDFView\C#\WindowsFormsApplication\obj\Debug\WindowsFormsApplication.csproj.ResolveComReference.cache
     文件       13312  2008-10-30 17:32  PDFView\C#\WindowsFormsApplication\obj\Debug\WindowsFormsApplication.exe
     文件         569  2008-10-30 17:32  PDFView\C#\WindowsFormsApplication\obj\Debug\WindowsFormsApplication.Form1.resources
     文件       30208  2008-10-30 17:32  PDFView\C#\WindowsFormsApplication\obj\Debug\WindowsFormsApplication.pdb
     文件         180  2008-10-30 17:31  PDFView\C#\WindowsFormsApplication\obj\Debug\WindowsFormsApplication.Properties.Resources.resources
     文件         534  2008-10-30 16:58  PDFView\C#\WindowsFormsApplication\obj\Debug\WindowsFormsApplication2.csproj.ResolveComReference.cache
............此处省略76个文件信息

评论

共有 条评论