Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Some questions signing PDF (streched Image, PKCS1 object for PKCS12 key, only image)

$
0
0
Hi,

I'm signing a PDF with existing signature field per PKCS12 key.
After some tries I figured this out

PdfFileSignature pdfSign2 = new PdfFileSignature( @"C:\page_1.pdf");
PKCS1 p1 = new PKCS1(@"C:\key.pfx", "xyz");
p1.Reason = "Reason";
p1.Location = "Location";
p1.ContactInfo = "ContactInfo";
p1.ShowProperties = false;
pdfSign2.SignatureAppearance = @"C:\sig.jpg";
pdfSign2.Sign("SigField", p1);
pdfSign2.Save(@"F:\page_1_Sign1.pdf");

Now I have some questions.
  1. Do I really have to use a PKCS1 object for my PKCS12 key?
  2. Is there a way to avoid a streched signature image if it doesn't fit the signature field exactly (it never will...)?
  3. Is there a way to put an image inside the signature field only (no signature key)?



Viewing all articles
Browse latest Browse all 3131

Trending Articles