電子簽章及IronPdf 簽章編輯

  • 128
  • 0
  • 2024-08-07
  1. 透過IronPdf做pdf簽章及內容編輯. 中華電信提供的範本, 可以在簽章後再加comments, 不會破壞簽章, 測試結果只有可能範本是html格式, 才能在簽章前先做好form field, 並在簽章後做form field的修改.
  2. IronPdf範例筆記
  3. 線上電子簽名軟體平台測試筆記
  4. 淺談企業電子簽名與法律保障 – 專訪法律白話文運動 楊貴智律師
淺談企業電子簽名與法律保障 – 專訪法律白話文運動 楊貴智律師
線上平台測試
就開發Web時遇到的幾個設計及方法問題, 對比其他平台做測試
測試平台
https://www.jotform.com/mysigndocuments/
https://app.breezysign.com/
測試pdf檔案:已有簽章
測試功能筆記
1.[編輯簽署內容]可設定[核取方塊]及[單選]或[拉式選單]
2.簽署對象都在上傳文件時直接keyin(或做通訊錄), 未有會員管理設計
3.簽署對象可透過[link]or[email with link]方式直接進用印編輯頁面
4.都只有一個簽章, 非雙方個別簽章,沒有先用印後簽章等順序問題
5.合約分組or貼標籤
6.將[編輯簽署內容]儲存成樣版
7.作業到期設定
Jotform會移除上傳文件上的舊簽章, 再簽新章
Jotform可上傳word,簽完後轉pdf供下載
Jotform電子簽名時有法律聲名
提醒簽署頻率
BreezySign預設不會移除舊簽章(不確定有沒有功能), 直接簽新章
BreezySign只能上傳pdf,不能上傳word
Gembox incremental updates
  • 中華電信提供範本及說明提到, 簽章後修改相關功能可找[incremental updates/saves]等字眼
  • 依gembox所附的實作範例, 把簽章後的pdf上傳, 範例在pdf新增"Hello World again!", 但簽章失效
Append byte array to pdf file c# asp.net using FileStream.

You are aware that adding some byte[] makes the PDF invalid? Unless your added byte[] contains an incremental update according to section 7.5.6 of the PDF specification ISO 32000-1, but a normal PDF (like your rdlc local report rendered to pdf) is not such a update.

– mkl

Oct 17, 2014 at 8:50

Q1: Create Pdf.
// Input and Text Area forms HTML
string FormHtml = @"
<html>
    <body>
        <h2>編輯 PDF Form</h2>
        <form>
            First name: <br> <input type='text' name='firstname' value=''> <br>
            Last name: <br> <input type='text' name='lastname' value=''> <br>
            Address: <br> <textarea name='address' rows='4' cols='50'></textarea>
        </form>
    </body>
</html>
";
// Instantiate Renderer
ChromePdfRenderer Renderer = new ChromePdfRenderer();
Renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
Renderer.RenderHtmlAsPdf(FormHtml).SaveAs(“form.pdf”);
Create Pdf.
Q2. signed pdf with FormFillingAndAnnotationsAllowed and form filled.
//sign pdf
PdfDocument signedPdfDoc = PdfDocument.FromFile(“form.pdf”, TrackChanges: ChangeTrackingModes.EnableChangeTracking);
signedPdfDoc.SignWithFile("server.pfx", "1234", Permissions: SignaturePermissions.FormFillingAndAnnotationsAllowed);
signedPdfDoc.SaveAsRevision(“formSigned.pdf”);

//edit pdf.
var FormField = signedPdfDoc.Form.FirstOrDefault().Value = ("Filled");
var pdfWithRevision = signedPdfDoc.SaveAsRevision(“formAlter.pdf”);
edit: add “Filled” below first name.
Q3. signed pdf with FormFillingAndAnnotationsAllowed and add annotation.
// add annotation but invaliding the signature.
var annotation1 = new TextAnnotation(0)
{
    Title = "This is the major title 1",
};

signedPdfDoc.Annotations.Add(annotation1);
signedPdfDoc.SaveAsRevision(“annotation.pdf”);
//asking ironPdf, but didn’t figure that out. And they suggest add annotation after removing the signature, then what “FormFillingAndAnnotationsAllowed” all about? 
Q4. signed pdf then adding stamper.
//stamp.
signedPdfDoc = PdfDocument.FromFile(targetBase(formSigned), TrackChanges: ChangeTrackingModes.EnableChangeTracking);
// Create text stamper
TextStamper textStamper = new TextStamper()
{
    Text = "Text Stamper!",
    FontFamily = "Bungee Spice",
    UseGoogleFont = true,
    FontSize = 30,
    IsBold = true,
    IsItalic = true,
    VerticalAlignment = VerticalAlignment.Top,
};
// Stamp the text stamper
signedPdfDoc.ApplyStamp(textStamper);
signedPdfDoc.SaveAsRevision(“formStampNew.pdf”);
invalid signature.
Q5. Signed and then remove singature, add stamper and signed again.
signedPdfDoc = PdfDocument.FromFile(“formSigned.pdf”);

//Remvoe Signature.
signedPdfDoc.RemoveSignatures();
signedPdfDoc.SaveAsRevision(targetBase(remove));

// Create text stamper
TextStamper textStamper = new TextStamper()
{
    Text = "Text Stamper!"
};
// Stamp the text stamper
signedPdfDoc.ApplyStamp(textStamper);
signedPdfDoc.SignWithFile(@"D:\tmp\pdf\SignTest.pfx", "1234", Permissions: SignaturePermissions.FormFillingAndAnnotationsAllowed);
signedPdfDoc.SaveAsRevision(“formStampNew.pdf”);
Remvoe Signature and add stamp and sign again.
Q6. Can edit signed pdf with non-html form format?

不確定, 如果原本是html格式, 且html和pdf互轉不會格式出錯應該可以。