winform界面
1.选择加签pdf按钮代码实现
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog op = new OpenFileDialog();
op.Filter = "PDF文件(*.pdf)|*.pdf";
bool flag = op.ShowDialog() == DialogResult.OK;
if (flag)
{
string pdfPath = Path.GetFullPath(op.FileName);
fileName = op.SafeFileName;
label2.Text = pdfPath;
}
}
每页加签按钮代码实现
private void button2_Click(object sender, EventArgs e)
{
string path = Application.StartupPath;
SignEachPage(label2.Text.ToString(), path + "/PDF/" + fileName, path + @"\InspectionSeal\电子章.png"); // 参数