PdfOperator/FrmPdfDecryption.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using Spire.Pdf;
using Spire.Pdf.Security;
using System;
using System.IO;
using System.Windows.Forms;

namespace PdfOperator
{
    public partial class FrmPdfDecryption : Form
    {
        public FrmPdfDecryption()
        {
            InitializeComponent();
        }

        private void btnOpenfile_Click(object sender, EventArgs e)
        {
            OpenFileDialog fileDialog = new OpenFileDialog();
            fileDialog.Title = "打开PDF";
            fileDialog.Filter = "pdf文件|*.pdf";
            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                string name = fileDialog.FileName;
                txtFilePath.Text = name;
            }
        }

        private void btnSavePath_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtFilePath.Text))
            {
                MessageBox.Show("请先选择要操作的pdf!");
                return;
            }
            SaveFileDialog saveFile = new SaveFileDialog();
            saveFile.Title = "选择保存路径";
            saveFile.Filter = "pdf文件|*.pdf";
            saveFile.DefaultExt = ".pdf";
            saveFile.FileName = "解密的PDF.pdf";
            if (saveFile.ShowDialog() == DialogResult.OK)
            {
                txtSavePath.Text = saveFile.FileName;
            }
        }

        private void btnStart_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtFilePath.Text))
            {
                MessageBox.Show("请先选择要操作的pdf!");
                return;
            }
            if (string.IsNullOrEmpty(txtSavePath.Text))
            {
                MessageBox.Show("请先选择解密后的pdf保存路径!");
                return;
            }
            try
            {
                //使用密码加载一个加密的PDF文档

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。