示例#1
0
 public PDFSigner(string input, string output, Cert cert, MetaData md)
 {
     this.inputPDF = input;
     this.outputPDF = output;
     this.myCert = cert;
     this.metadata = md;
 }
示例#2
0
        private void ValidateInputFile()
        {
            FileWarningPicture.Hide();

            if (!string.IsNullOrEmpty(InputFileText.Text))
            {
                try
                {
                    reader = new PdfReader(InputFileText.Text);
                }
                catch
                {
                    reader = null;
                    ValidateUIState();
                    FileWarningPicture.Show();
                    return;
                }
            }
            else
            {
                reader = null;
                ValidateUIState();
                return;
            }

            metaData = new MetaData();
            metaData.Info = reader.Info;

            PageNum.Maximum = reader.NumberOfPages;
            PageNum.Minimum = PageNum.Value = 1;
            PageNum_ValueChanged(null, null);

            existingSignatures = reader.AcroFields.GetSignatureNames().Count > 0;
            ValidateUIState();
        }