• 大小: 2.76MB
    文件类型: .rar
    金币: 2
    下载: 2 次
    发布日期: 2024-03-03
  • 语言: 其他
  • 标签: PDF  c#  

资源简介

PDF的操作(放大、缩小、旋转,搜索),附带一个DEMO

资源截图

代码片段和文件信息

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();
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        959  2013-09-09 10:51  WindowsFormsApplication.sln

    ..A..H.     19968  2013-09-09 15:41  WindowsFormsApplication.suo

     文件       3348  2013-09-09 10:51  _UpgradeReport_Files\UpgradeReport.css

     文件      12505  2010-05-04 01:19  _UpgradeReport_Files\UpgradeReport.xslt

     文件         69  2013-09-09 10:51  _UpgradeReport_Files\UpgradeReport_Minus.gif

     文件         71  2013-09-09 10:51  _UpgradeReport_Files\UpgradeReport_Plus.gif

     文件       2707  2008-10-30 17:32  Backup\WindowsFormsApplication\Form1.cs

     文件      11777  2008-10-30 17:32  Backup\WindowsFormsApplication\Form1.Designer.cs

     文件       6277  2008-10-30 17:32  Backup\WindowsFormsApplication\Form1.resx

     文件        504  2008-10-30 17:13  Backup\WindowsFormsApplication\Program.cs

     文件       1378  2008-10-30 17:13  Backup\WindowsFormsApplication\Properties\AssemblyInfo.cs

     文件       2896  2008-10-30 17:13  Backup\WindowsFormsApplication\Properties\Resources.Designer.cs

     文件       5612  2008-10-30 16:57  Backup\WindowsFormsApplication\Properties\Resources.resx

     文件       1108  2008-10-30 17:13  Backup\WindowsFormsApplication\Properties\Settings.Designer.cs

     文件        249  2008-10-30 16:57  Backup\WindowsFormsApplication\Properties\Settings.settings

     文件       4412  2008-10-30 17:19  Backup\WindowsFormsApplication\WindowsFormsApplication.csproj

     文件        959  2008-10-30 17:11  Backup\WindowsFormsApplication.sln

    ..A..H.     19456  2009-06-29 14:32  Backup\WindowsFormsApplication.suo

     文件        144  2013-09-09 14:18  WindowsFormsApplication\app.config

     文件       7168  2008-10-30 16:58  WindowsFormsApplication\bin\Debug\AxInterop.PDFVIEWLib.dll

     文件       7680  2008-10-30 17:13  WindowsFormsApplication\bin\Debug\Interop.PDFVIEWLib.dll

     文件      13312  2008-10-30 17:32  WindowsFormsApplication\bin\Debug\WindowsFormsApplication.exe

     文件      30208  2008-10-30 17:32  WindowsFormsApplication\bin\Debug\WindowsFormsApplication.pdb

     文件      14328  2009-06-29 14:32  WindowsFormsApplication\bin\Debug\WindowsFormsApplication.vshost.exe

     文件        490  2007-07-21 02:33  WindowsFormsApplication\bin\Debug\WindowsFormsApplication.vshost.exe.manifest

     文件       9216  2013-09-09 14:19  WindowsFormsApplication\bin\Release\AxInterop.PDFVIEWLib.dll

     文件       9216  2013-09-09 14:19  WindowsFormsApplication\bin\Release\Interop.PDFVIEWLib.dll

     文件      11592  2013-09-09 14:19  WindowsFormsApplication\bin\Release\WindowsFormsApplication.vshost.exe

     文件        144  2013-09-09 14:18  WindowsFormsApplication\bin\Release\WindowsFormsApplication.vshost.exe.config

     文件        490  2010-03-17 22:39  WindowsFormsApplication\bin\Release\WindowsFormsApplication.vshost.exe.manifest

............此处省略59个文件信息

评论

共有 条评论