_exceptionHandler.HandleException(ref ex, "TaskController => DigitallySignPdf") Īlso the file(FileConatinsInvisibleSinnature) is getting a signature which is no longer visible because of the Location being PointF(0,). If (!(ex is CustomArgNullException) & !(ex is CustomInvalidOpException)) Using (MemoryStream to_stream = new MemoryStream())ĭoc.SaveToStream(to_stream, FileFormat.PDF) signature.DocumentPermissions = PdfCertificationFlags.AllowFormFill | PdfCertificationFlags.ForbidChanges Signature.SignNameFont = new PdfFont(PdfFontFamily.Courier, 10) Signature.SignDetailsFont = new PdfFont(PdfFontFamily.TimesRoman, 5f) Signature.DocumentPermissions = PdfCertificationFlags.AllowFormFill | PdfCertificationFlags.ForbidChanges Signature.ReasonLabel = "Organisation: " Type Signature: Type your signature into the textbox, select a font to use and finally click. signature.ContactInfoLabel = "ContactInfo:" With a PDF file open, click the Security tab. Signature.NameLabel = "Digitally Signed by:" Signature.LocationInfo = "Ireland,Dublin" Signature.Location = new PointF(0, - 50) Signature.GraphicsMode = GraphicMode.SignDetail //.SignImageAndSignDetail Signature.Bounds = new RectangleF(new PointF(0, 0), new SizeF(150, 90)) PdfSignature signature = new PdfSignature(doc, doc.Pages, cert, "Signature1") PdfCertificate cert = new PdfCertificate(ucm.Certificate, ucm.Password) Ucm.Password = SecurityHelper.DecryptPassword(ucm.Password) Ucm = _userService.GetUserCertificate(UserId).obj UserCertificateModel ucm = new UserCertificateModel() //certificateResponse = _userService.GetUserCertificate(UserId) Response certificateResponse = new Response() Public byte DigitallySignPdf(byte pdfdata, int StatusId) If there's still any doubt, welcome to contact us. Signature.GraphicsMode = GraphicMode.SignImageAndSignDetail Signature.DocumentPermissions = PdfCertificationFlags.AllowFormFill Signature.ConfiguerGraphicPath = "pic.jpg" Signature.ConfigGraphicType = ConfiguerGraphicType.Picture Signature.Reason = "Le document est certifie" Signature.LocationInfoLabel = "Location:" Signature.DigitalSigner = "Jane for Test" Signature.DigitalSignerLable= "Digitally signed by" Signature.Bounds = new RectangleF(new PointF(10,100), new SizeF(300, 300)) Signature.SignDetailsFont = new PdfFont(PdfFontFamily.Helvetica, 5f) change the font size of the content details, only several font is available PdfSignature signature = new PdfSignature(doc, page, digi, "demo") PdfCertificate digi = new PdfCertificate(pfxPath, "e-iceblue") Please refer the following code.Ĭode: Select all string sourcePDF = doc = new PdfDocument(sourcePDF) In regards to your two requirements, our Spire.Pdf only supports modifying the font size at present.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |