怎么给PDF添加数字签名

合集下载

如何在 PDF 文件中添加日期和数字签名字段说明书

如何在 PDF 文件中添加日期和数字签名字段说明书

How to Add Date and Digital Signature Fields to a Portable Document Format (PDF) FileDate FieldIn Adobe Acrobat Pro DC, open the PDF.Click the Tools tab and under Prepare Form, click Open.At the screen stating: “Select a file or scan a document to begin” Adobe should alreadydisplay the file you have opened in Step 1. If you need to change the file, then click on“Change File” and browse to the correct file.a.Do not check the box next to: “This document requires signatures” (it changes whichsignature field options are available).b.Recommendation: Change the Form Field auto detection to OFF by clicking“Change” and unchecking the last box in General for: “Automatically detect formfields,” especially if the files you are adding the digital signature field to are notforms. If you choose to keep the “Form field auto detection is ON” you may get formfields detected in error. If this happens, click on the fields you do not need and deletethem. Do not leave fields that you do not need in the file because this will affectaccessibility and compliance with Section 508.c.You may get a message: “No form fields detected.” This is fine, especially if thedocument is correspondence or the file is not a “form.”Your mouse will turn into a light blue box for you to Left mouse click (and hold) > Draga box > Release mouse button (This is where you want the date stamp field in your document).Using the leader lines Release the date field under the letterhead even and centered on“OFFICE OF THE SECRETARY.” You will standardize the placement and size of box you create in Step 11.Within the Field Name properties box, enter “Date Signed” and check the box next to:“Required field.” In the bottom, right corner, click on the blue hyperlink “All Properties.”Click on the Appearance Tab and ensure the text font and font size matches your document.a.Note: Most DOI documents will be in Times New Roman and 12-point.Click on the Position Tab and ensure the Position Width is 2 inches and the PositionHeight is 0.25 inches. Click the box “Do not change height and width when changing the position.” This grays out the Width and Height fields. You may click and drag the box to center it under the Office of the Secretary, Washington, DC 20240 on the electronic letterhead, as necessary.Click on the Options Tab and change the Alignment Field to “Center” by clicking on thedrop-down menu arrow.Click on the Format Tab and scroll down to highlight “mmm d, yyyy”. Your date willappear in the “Example of current format:” field. Click Close.Close the Prepare Form Tool by clicking Close in the upper-right corner. Your date fieldappears as a light blue box. Hover your cursor in the blue date field box and the Tooltip appears, “Click to date stamp.” Again, you may click and drag to adjust placement of the field, as necessary.If you are date stamping the document, please continue to Steps 16 and 17. Otherwise,you are done creating the Date Stamp field. Proceed to “How to Add a Signature Field to a PDF”.Click in the date field and a drop-down menu arrow appears. Click on the drop-downarrow for a calendar to choose your date.Congratulations! You have date stamped your document. Now, proceed to adding adigital signature field to your PDF file.Digital Signature FieldIn the Digital Signature Properties, dialog box, click on the General Tab enter “Click toClick on the Appearance Tab, leave the font size default to Auto. The font defaults to Helvitica. You can scroll down to change the font to Times New Roman.If you just added the Date Field, Adobe remembers… Uncheck the box “Do not changeheight and width when changing the position.” On the Position Tab ensure the Position Width is 3 inches and the Position Height is 0.40 inches. Recheck the box “Do notchange height and width when changing the position.” This grays out the Width and Height fields. Click Close.a.NOTE: If you have more than one signature in your file (e.g., a “Through” line), youmust give each digital signature field a unique name. Repeat Steps 5-11 for eachsignature required. Click Close after adding each signature field.8.Close the Prepare Form Tool by clicking Close in the upper-right corner. Your signaturefield appears as a light blue box with the red “Sign here” flag. Hover your cursor in the blue date field box and the Tool Tip appears, “Click to sign, check box to lock document (Click to sign)”. Again, you may click and drag to adjust placement of the field, asnecessary.Congratulations! You have added a digital signature field.Save your document, adjusting the file name by adding “ready for signature”. Thisassists with version control.Run the Accessibility Checker Click Start Checking.The Accessibility Checker Menu appears on the left side of the document.Open all the arrows next to headings in bold, which indicates accessibility issues.You must address all issues marked with a question mark and red “X”.To correct the “Title Failed”, right click on it and click FixIn the Description Window, uncheck “Leave As Is” and enter the document Title. Youcan repeat for Subject, Author and Keywords if you wish. Click OK.The Title Failed changes to Title Passed.To correct the Tagged annotations – Failed, click on the Tag panel, highlight the main“Tags” at the top, right-click and select FindIn the Find Element dialog box, click on the dropdown menu, select “UnmarkedAnnotations,” then select the radio button next to Search Document, and click “Find.”The date field you added is highlighted. Click “Tag Element,” select “Form” in the“Type” field, and click OK. The next, if any, unmarked annotated field is automatically highlighted. As you can see, the digital signature field you added is now highlighted. The Find Element dialog box remains open until you close it; therefore, click “Tag Element” and “Form” should already be selected, then click OK. The Find Complete dialog box opens. Click OK and click Close in the Find Element dialog box.Rerun the Accessibility Checker by selecting “Full Check” and clicking “StartChecking.” Three manual checks should be displayed: Logical Reading Order – Needs manual check, Color contrast – Needs manual check, and Navigation links – Needs manual check. The logical reading order and color contrast will be in the Document heading and Navigation links will be in the Page heading. Click Close to close the Accessibility tool. Click the “X” in the upper-right corner of the Accessibility Checker to close the report.Save the file and continue to the “Fixing Reading Order for the Date and DigitalSignature Fields” to finalize the PDF file for digital signature.Fixing Reading Order for Date and Digital Signature FieldsThe Reading Order panel opens. Make sure the box next to: “Display like elements in a single block” is unchecked.You will notice tagged items in the PDF file are displayed in grey blocks with acorresponding number in the upper-left corner to the number listed in the Order panel. The date and digital signature fields are at the bottom of the order for Page 1. In this example, they are numbers 29 and 30. The fields need to be moved so a user using assistive technology has the date field read after the letterhead and the digital signature field read after the full name of the signatory official. To move the date field, you will hold your left mouse button and drag it above the word, “Memorandum” and release your left mouse button.Repeat the same steps for moving the digital signature before the signatory official’s title.Close the Reading Order dialog box by clicking “Close,” then close the Order panel byclicking the “X” in the upper-right corner.Save your file. It is recommended to add “Ready for Signature” to your filename toensure version control and decipher the final PDF to send to the signatory official. Congratulations! Your PDF file is ready for the signatory official’s digital signature. Asa reminder, the signatory official will select the date she or he is signing the PDF filefirst, then click on the digital signature field to digitally sign and click “Lock document after signing.”。

如何通过AdobeAcrobat编辑和签署PDF文件

如何通过AdobeAcrobat编辑和签署PDF文件

如何通过AdobeAcrobat编辑和签署PDF文件Adobe Acrobat是一款强大的PDF编辑和管理工具,可以帮助我们轻松编辑和签署PDF文件。

本文将介绍如何通过Adobe Acrobat编辑和签署PDF文件的详细步骤和方法。

一、安装和启动Adobe Acrobat首先,确保你已经成功安装了Adobe Acrobat软件,并且打开了程序。

一般情况下,安装完毕后,你可以在电脑桌面或开始菜单中找到Adobe Acrobat的图标,点击即可启动软件。

二、打开PDF文件在Adobe Acrobat中,你可以通过多种方式打开PDF文件。

最直接的方式是点击菜单栏的“文件”选项,然后选择“打开”,在文件资源管理器中选择并打开你想要编辑和签署的PDF文件。

三、编辑PDF文件Adobe Acrobat提供了多种编辑工具,方便我们对PDF文件进行修改和调整。

1. 文本编辑:如果你需要修改PDF中的文本内容,可以点击左侧工具栏中的“编辑文本”工具。

然后,在PDF文件中选中你想要编辑的文字,即可进行修改。

你还可以调整字体、字号、颜色等文本样式。

2. 图片编辑:如果你需要替换或删除PDF中的图片,可以点击左侧工具栏中的“编辑对象”工具。

然后,你可以选择图片,并进行替换、删除等操作。

3. 页面编辑:如果你需要重新排列或删除PDF中的页面,可以点击右侧工具栏中的“缩略图”选项卡。

然后,你可以在缩略图中拖动页面的顺序,或者右键点击页面并选择“删除”来删除页面。

四、签署PDF文件Adobe Acrobat的签署工具可以帮助我们方便地对PDF文件进行数字签名,确保文件的真实性和完整性。

1. 创建数字ID:首次签署PDF文件前,你需要创建一个数字ID。

点击右侧工具栏中的“签署”选项卡,然后选择“添加数字ID”,按照提示填写个人信息来创建数字ID。

2. 数字签名:当你想要在PDF文件上进行签名时,点击右侧工具栏中的“签署”选项卡,然后选择“签名文档”。

如何使用acrobat reader的数字签名功能

如何使用acrobat reader的数字签名功能

Adobe Acrobat 5.0的数字签名功能Acrobat 5.0是Adobe公司的电子交换文档PDF的制作器。

pdf文档在国外应用的非常广泛,经常用于网络上的文档交换,一些书籍的电子版文档就是用他制作的,例如宝典系列等等。

Acorbat的功能非常强大,今天我们主要讨论的是它的数字签名功能。

Acrobat5现在支持数字签名。

数字签名就像传统的手写签名,表示个人或实体已签署文档。

数字签名可以是手写签名、标志或其它图形,或简单解释签名目的的文本等几种格式之一。

根据签名处理程序,签名甚至可能是不可见的。

单击签名工具就可以在文档中的指定位置进行数字签名。

通过数字签名,可以验证你的文档是否被修改过。

并且是否已经签署通过。

当别人拿来被签名的文档的时候,只要对方把用户证书email来,就可以验证他们的数字签名了。

目录一、Adobe Acrobat 5.0的安装二、如何实现数字签名(一)、制作签名档(二)、转换待签文档(三)、如何签名(四)、验证签名有效性三、文档的安全属性一、Adobe Acrobat 5.0的安装安装过程非常简单,您只需要请选中并运行安装目录下的SETUP.EXE 程序,Acrobat就开始进行安装。

安装时您会遇到如下窗口,请在窗口中填写个人相关信息,注意,“序号”可以在安装目录下名为“SN”的文本文件中找到,如图1-1;图1-1后面出现的窗口无需进一步设置,只要连续点击“下一步”或“是”之类的按钮即可完成安装。

返回二、如何实现数字签名初次运行Acrobat,将会弹出注册窗口,请选择“请不要再显示此对话框”后点击“继续”按钮,如下图;Acrobat安装完成后会自动在Microsoft Word、Microsoft Excel等应用窗口的左上角添加将指定文档或表格转换成PDF格式文件的控件,如下图;下面的内容将详细讲述如何实现数字签名;返回(一)、制作签名档1.在纸上手写您的签名,并将这张带有您的签名的纸张放入扫描仪扫描;2.用图像工具处理该扫描文件,并将自己的签名尽可能大的转换成一个PDF文件,下图2-1为一个扫描后的签名PDF文件;图2-13.重新打开Acrobat程序,并选中“工具”——〉“自签名安全”——〉“登录”,开始制作自己的签名档,如图2-2;图2-24.选中“登录”后,将弹出如下对话框,我们在此窗口选择“新建用户配置文件”,如图2-3;图2-35.在弹出的新窗口中输入个人的相关信息,请注意,“姓名”、“组织名称”和“部门”均不支持中文输入,“国家”栏可通过下拉菜单选中CN-中国,并按要求设置该签名档的密码,密码位数不少于6位,填写如下图2-4,请记住该密码,否则您将无法使用该签名档;图2-46.点击“确定”后,弹出选择此配置文件的存放位置的窗口,选择好后点击“保存”,如图2-5;图2-57.此时弹出窗口,要求您进一步配置您的签名配置文件,如加载您的手写体签名等等,请选择“用户配置”按钮,如图2-6;图2-68.弹出“自签名安全”窗口,该窗口中包含了该签名档的所有信息,如图2-7;图2-79.选择“签名外观”,并在窗口中选中“导入图形”,如图2-8;图2-810.点击“PDF文件…”按钮,出现选择手写体签名扫描文件的窗口,我们选中第二步建立的“张三的签名.pdf”文件,如图2-9;图2-911.点击“选择”按钮后,出现如下图2-10窗口;图2-1012.点击确定按钮后,出现以下窗口,在“标题”栏填写名字,我们可以视需要钩选下方的“显示”项,张三的签名无需“显示”中的任何项,因此全部不钩选,如图2-11,签名的预览情况如下;图2-1113.点击“确定”,回到窗口图2-12;图2-1214.点击“关闭”即完成了张三的签名档的制作。

使用WPS进行PDF文件签名和保护

使用WPS进行PDF文件签名和保护

使用WPS进行PDF文件签名和保护PDF(Portable Document Format)是一种广泛使用的文档格式,因其跨平台性和易读性而受到许多人的欢迎。

在日常工作和学习中,我们常常需要使用PDF文件进行签名和保护。

本文将介绍如何使用WPS (Word、PDF、Slides)软件来完成这些任务。

1. 使用WPS签名PDF文件在很多情况下,我们需要对PDF文件进行签名以确认文件的真实性和完整性。

WPS提供了方便的签名工具,使我们可以轻松地添加数字签名。

(1)打开WPS软件,并导入需要签名的PDF文件。

(2)在菜单栏中找到“签名”选项,点击后会出现一个签名工具栏。

(3)选择“添加签名”,此时会弹出一个对话框,要求选择签名文件。

如果之前已经创建了数字签名文件,可直接选择导入。

如果没有,需要先创建签名文件。

(4)签名文件可以通过多种方式创建,比如使用WPS软件的数字签名工具、使用手写板等。

选择合适的方式,创建并导入签名文件。

(5)在PDF文件中选择需要签名的位置,并点击鼠标左键进行签名。

(6)签名完成后,可以对签名进行调整、删除或移动。

2. 使用WPS保护PDF文件有时候我们需要对PDF文件进行保护,以防止文件的内容被篡改或者未经授权的访问。

WPS提供了多种保护措施,保护PDF文件的安全性。

(1)打开WPS软件,并导入需要保护的PDF文件。

(2)在菜单栏中找到“保护”选项,点击后会出现一个保护工具栏。

(3)选择“设置密码”,此时会弹出一个对话框,要求设置打开密码和编辑密码。

(4)设置打开密码后,只有知道密码的人才能打开此PDF文件。

设置编辑密码后,只有知道密码的人才能对PDF文件进行修改。

(5)点击确认后,系统会要求再次输入密码进行确认。

(6)保护设置完成后,PDF文件会自动保存并重新加密。

3. 使用WPS进行PDF文件的签名和保护的注意事项在使用WPS进行PDF文件的签名和保护时,需要注意以下事项:(1)创建和导入签名文件时,确保文件的安全性。

pdf 验签方法

pdf 验签方法

pdf 验签方法
要验证PDF文件的数字签名,可以使用以下方法:
1. 使用合适的PDF阅读器(如Adobe Acrobat)打开PDF文件。

2. 在工具栏上找到“签名”或“证书”按钮,点击它。

3. 找到与数字签名相关的选项,如“验证签名”或“证书验证”。

4. 选择要验证的签名,并点击验证按钮。

5. 验证过程可能需要一些时间,等待验证结果的显示。

6. 如果签名有效,则会显示签名的详细信息,如签名者的姓名、签名日期等。

7. 如果签名无效,则会显示相应的错误信息,可能是签名已过期、被篡改或者与证书不匹配等。

需要注意的是,具体的验证步骤和选项可能会因PDF阅读器的版本和设置而有所不同。

WPSOffice如何进行PDF文档签名和水印添加

WPSOffice如何进行PDF文档签名和水印添加

WPSOffice如何进行PDF文档签名和水印添加WPSOffice是一款功能强大的办公软件,除了常见的文字处理、表格编辑和幻灯片制作外,它还提供了便捷的PDF文档操作功能,如签名和添加水印。

本文将介绍如何在WPSOffice中进行PDF文档签名和水印添加。

以下是详细步骤:一、签名PDF文档PDF文档签名功能可以在WPSOffice中实现电子签名,让文件具有法律效力。

下面是详细步骤:步骤1:打开WPSOffice软件,并选择需要签名的PDF文档。

步骤2:在工具栏中找到“插入”选项,并点击“签名”按钮。

步骤3:在签名窗口中,选择自己的签名方式。

可以选择手写签名、上传签名图片或者使用默认的电子签名。

步骤4:根据选择的签名方式进行操作。

如果选择手写签名,可以使用鼠标或触控笔在界面上绘制签名。

如果选择上传签名图片,点击“上传签名图片”按钮,并选择本地的签名图片进行上传。

如果选择使用默认的电子签名,直接点击“确定”按钮即可。

步骤5:将签名拖动到所需位置,并调整大小。

步骤6:保存签名后的PDF文档即可。

二、添加水印到PDF文档水印是一种保护PDF文件内容安全性的方式,可以在WPSOffice 中添加文字或图片水印。

下面是详细步骤:步骤1:打开WPSOffice软件,并选择需要添加水印的PDF文档。

步骤2:在工具栏中找到“插入”选项,并点击“水印”。

步骤3:在水印窗口中,选择水印类型,可以选择文本水印或者图片水印。

步骤4:如果选择文本水印,输入所需文字,并设置字体、大小、颜色等属性。

步骤5:如果选择图片水印,点击“选择图片”按钮,并选择本地的图片进行上传。

步骤6:根据需要设置水印的位置、透明度和旋转角度。

步骤7:点击“确定”按钮,水印将自动添加到PDF文档中。

步骤8:保存水印后的PDF文档即可。

通过以上步骤,您可以在WPSOffice中轻松地进行PDF文档的签名和添加水印操作。

无论是个人使用还是商务需求,这些功能都能帮助您提高工作效率和文档安全性。

怎么弄电子签名

怎么弄电子签名

怎么弄电子签名在数字化时代,电子签名已成为日常工作生活中不可或缺的一部分。

它能够帮助我们简化文件签署过程,提高工作效率,同时也更加环保。

那么,你知道怎么弄电子签名吗?在本文中,我们将向你介绍几种常用的电子签名方法。

1. 电子签名是什么电子签名是一种以数字或电子形式表示同意、认可或批准文档的方式。

它将传统纸质签名转化为电子形式,以便在数字环境下使用。

电子签名通常使用加密技术,确保文件的完整性和可追溯性。

2. 使用PDF编辑器创建电子签名PDF编辑器是创建电子签名的常用工具之一。

以下是使用Adobe Acrobat Reader DC创建电子签名的步骤:- 打开PDF文档,点击“工具”菜单中的“签名”选项。

- 选择“签名”工具,然后选择“创建签名”。

- 在弹出的对话框中,选择“使用相机”或“从文件中选择图片”两种创建签名的方式之一。

- 如果选择“使用相机”,可以通过摄像头拍摄签名,然后点击“采样签名”保存。

- 如果选择“从文件中选择图片”,可以从电脑中选择已有的签名图片,然后点击“导入”完成创建。

- 创建签名后,将鼠标放在文档的签名位置,点击鼠标左键即可插入电子签名。

3. 使用电子签名软件除了PDF编辑器外,还有许多专门用于创建电子签名的软件可供选择。

以下是几种常见的电子签名软件:- DocuSign:一款功能强大的电子签名平台,可帮助个人和企业创建和管理电子签名。

用户可以在任何设备上创建和签署文件。

- HelloSign:提供简洁明了的界面,用户可以通过电子邮件发送和签署文件。

它还支持团队协作和集成到其他应用程序。

- Adobe Sign:Adobe的电子签名解决方案,支持无纸化流程,让签署合同和文件变得更加便捷和高效。

- PandaDoc:提供全面的合同管理解决方案,包括电子签名、文件跟踪和自动化流程等功能。

4. 电子签名的法律效力在许多国家和地区,电子签名已经被法律认可,并具有与传统纸质签名相同的法律效力。

JavaPDF添加数字签名的实现方法

JavaPDF添加数字签名的实现方法

JavaPDF添加数字签名的实现⽅法经过数字签名的⽂档,能够使作者之外的⼈⽆法对其进⾏修改。

因此,在PDF⽂档中添加数字签名可以保证其安全性和真实性。

同时根据添加内容的差异性,数字签名可分为⽂本数字签名、图⽚数字签名、图⽚及⽂本数字签名。

本⽂将通过Spire.PDF for Java来演⽰如何在PDF⽂档中添加数字签名。

使⽤⼯具:Jar⽂件获取及导⼊:⽅法1:通过获取Jar包。

下载后,解压⽂件,并将lib⽂件夹下的Spire.Pdf.jar⽂件导⼊Java程序。

(如下图)⽅法2:通过maven仓库安装导⼊。

具体安装教程详见此⽹页。

⽰例1:添加⽂本数字签名import com.spire.pdf.PdfDocument;import com.spire.pdf.graphics.PdfTrueTypeFont;import com.spire.pdf.security.GraphicMode;import com.spire.pdf.security.PdfCertificate;import com.spire.pdf.security.PdfCertificationFlags;import com.spire.pdf.security.PdfSignature;import java.awt.*;import java.awt.geom.Point2D;import java.awt.geom.Rectangle2D;public class TextSignature {public static void main(String[] args) {//加载PDF⽂档PdfDocument doc = new PdfDocument();doc.loadFromFile("C:\\Users\\Test1\\Desktop\\Sample.pdf");//加载pfx证书PdfCertificate cert = new PdfCertificate("C:\\Users\\Test1\\Desktop\\gary.pfx", "abc123");//添加数字签名,设置其位置和⼤⼩PdfSignature signature = new PdfSignature(doc, doc.getPages().get(doc.getPages().getCount()-1), cert, "MySignature");Rectangle2D rect = new Rectangle2D.Float();rect.setFrame(new Point2D.Float((float) doc.getPages().get(0).getActualSize().getWidth() - 270, (float) doc.getPages().get(0).getActualSize().getHeight() - 300), new Dimension(200, 110)); signature.setBounds(rect);//设置签名为⽂本形式signature.setGraphicMode(GraphicMode.Sign_Detail);//设置签名的内容signature.setNameLabel("签字者:");signature.setName("Gary");signature.setContactInfoLabel("联系电话:");signature.setContactInfo("010333555");signature.setDateLabel("⽇期:");signature.setDate(new java.util.Date());signature.setLocationInfoLabel("地点:");signature.setLocationInfo("US");signature.setReasonLabel("原因:");signature.setReason("我是⽂档所有者");signature.setDistinguishedNameLabel("DN: ");signature.setDistinguishedName(signature.getCertificate().get_IssuerName().getName());//设置签名的字体signature.setSignDetailsFont(new PdfTrueTypeFont(new Font("Arial Unicode MS", Font.PLAIN, 11)));//设置⽂档权限为禁⽌更改signature.setDocumentPermissions(PdfCertificationFlags.Forbid_Changes);signature.setCertificated(true);//保存⽂档doc.saveToFile("output/TextSignature.pdf");doc.close();}}⽂本数字签名效果:⽰例2:添加图⽚数字签名import com.spire.pdf.PdfDocument;import com.spire.pdf.graphics.PdfImage;import com.spire.pdf.graphics.PdfTrueTypeFont;import com.spire.pdf.security.GraphicMode;import com.spire.pdf.security.PdfCertificate;import com.spire.pdf.security.PdfCertificationFlags;import com.spire.pdf.security.PdfSignature;import java.awt.*;import java.awt.geom.Point2D;import java.awt.geom.Rectangle2D;public class ImageSignature {public static void main(String[] args) {//加载PDF⽂档PdfDocument doc = new PdfDocument();doc.loadFromFile("C:\\Users\\Test1\\Desktop\\Sample.pdf");//加载pfx证书PdfCertificate cert = new PdfCertificate("C:\\Users\\Test1\\Desktop\\gary.pfx", "abc123");//添加数字签名,设置其位置和⼤⼩PdfSignature signature = new PdfSignature(doc, doc.getPages().get(doc.getPages().getCount()-1), cert, "MySignature");Rectangle2D rect = new Rectangle2D.Float();rect.setFrame(new Point2D.Float((float) doc.getPages().get(0).getActualSize().getWidth() - 250, (float) doc.getPages().get(0).getActualSize().getHeight() - 300), new Dimension(170, 150)); signature.setBounds(rect);//设置签名为图⽚形式signature.setGraphicMode(GraphicMode.Sign_Image_Only);signature.setSignImageSource(PdfImage.fromFile("C:\\Users\\Test1\\Desktop\\Image.png"));//设置签名的字体signature.setSignDetailsFont(new PdfTrueTypeFont(new Font("Arial Unicode MS", Font.PLAIN, 11)));//设置⽂档权限为禁⽌更改signature.setDocumentPermissions(PdfCertificationFlags.Forbid_Changes);signature.setCertificated(true);//保存⽂档doc.saveToFile("output/ImageSignature.pdf");doc.close();}}图⽚数字签名效果:⽰例3:添加图⽚及⽂本数字签名import com.spire.pdf.PdfDocument;import com.spire.pdf.graphics.*;import com.spire.pdf.security.GraphicMode;import com.spire.pdf.security.PdfCertificate;import com.spire.pdf.security.PdfCertificationFlags;import com.spire.pdf.security.PdfSignature;import java.awt.*;import java.awt.geom.Point2D;import java.awt.geom.Rectangle2D;public class TextAndImageSignature {public static void main(String[] args) {//加载PDF⽂档PdfDocument doc = new PdfDocument();doc.loadFromFile("C:\\Users\\Test1\\Desktop\\Sample.pdf");//加载pfx证书PdfCertificate cert = new PdfCertificate("C:\\Users\\Test1\\Desktop\\gary.pfx", "abc123");//添加数字签名,设置其位置和⼤⼩PdfSignature signature = new PdfSignature(doc, doc.getPages().get(doc.getPages().getCount()-1), cert, "MySignature");Rectangle2D rect = new Rectangle2D.Float();rect.setFrame(new Point2D.Float((float) doc.getPages().get(0).getActualSize().getWidth() - 350, (float) doc.getPages().get(0).getActualSize().getHeight() - 170), new Dimension(300, 170)); signature.setBounds(rect);//设置签名为图⽚加⽂本模式signature.setGraphicMode(GraphicMode.Sign_Image_And_Sign_Detail);//设置签名的内容signature.setNameLabel("签字者:");signature.setName("Gary");signature.setContactInfoLabel("联系电话:");signature.setContactInfo("010333555");signature.setDateLabel("⽇期:");signature.setDate(new java.util.Date());signature.setLocationInfoLabel("地点:");signature.setLocationInfo("US");signature.setReasonLabel("原因:");signature.setReason("我是⽂档所有者");signature.setDistinguishedNameLabel("DN: ");signature.setDistinguishedName(signature.getCertificate().get_IssuerName().getName());signature.setSignImageSource(PdfImage.fromFile("C:\\Users\\Test1\\Desktop\\Image.png"));//设置签名的字体 signature.setSignDetailsFont(new PdfTrueTypeFont(new Font("Arial Unicode MS", Font.PLAIN, 11)));//设置⽂档权限为禁⽌更改signature.setDocumentPermissions(PdfCertificationFlags.Forbid_Changes);signature.setCertificated(true);//保存⽂档doc.saveToFile("output/TextAndImageSignature.pdf");doc.close();}}图⽚及⽂本数字签名效果:以上就是本⽂的全部内容,希望对⼤家的学习有所帮助,也希望⼤家多多⽀持。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

文件有时候需要签名的时候,上司没在公司的时候又是个急件这个时候我们就需要使用电子档的签名文件,那么如何给PDF文件添加数字签名呢?今天就为大家分享PDF文件的设置签名的方法,想知道的小伙伴们就一起来看看吧!
方法一:迅捷PDF编辑器
1.首先我们需要在电脑中下载一个PDF编辑器,然后在编辑器中打开一个PDF文件。

2.在给PDF文件添加签名之前,需要将文件在迅捷PDF编辑器中打开。

打开文件后,选择菜单栏中的文档选项,在文档选项中找到数字签名工具。

3.数字签名工具后,可以看到数字签名中有签名文档与放置数
字签名,我们先来说说签名文档吧。

4.点击签名文档后,将会弹出一个文件框,在文件框中设置数字签名,然后点击确定,这样数字签名就设置完成了。

5.如果文件中已经有数字签名的话我们就只需要放置数字签
名就可以了,点击放置数字签名。

点击放置数字签名之后,去到文件中需要放置签名的地方进行放置,这样数字签名就完成了。

方法二:PDF在线编辑器
6.还可以在百度中搜索PDF在线编辑器,选择其中的文档处理中的PDF在线编辑。

7.把PDF文件在PDF在线编辑器中打开。

8.打开之后找到右边编辑工具中的签名工具。

然后点击签名工具。

9.在签名框中输入签名的内容,输入完成之后点击确定这样PDF文件的签名就完成了。

10.点击确定之后我们就可以看到文件中的签名就已经设置完成了。

怎么给PDF添加数字签名就跟大家分享完了,有兴趣的小伙伴可以下载上面的编辑器来进行操作哦!。

相关文档
最新文档