![]() 'Creates a new PDF document Dim document As New PdfDocument () 'Adds a new page Dim page As PdfPageBase = document. DrawImage ( signatureImage, 0, 0 ) //Saves and closes the document document. Reason = "I am author of this document." //Draws the signature image graphics. LocationInfo = "Honolulu, Hawaii" signature. Bounds = new RectangleF ( new PointF ( 0, 0 ), signatureImage. Graphics //Creates a certificate instance from PFX file with private key PdfCertificate pdfCert = new PdfCertificate (, "password123" ) //Creates a digital signature PdfSignature signature = new PdfSignature ( document, page, pdfCert, "Signature" ) //Sets an image for signature field PdfBitmap signatureImage = new PdfBitmap ( ) //Sets signature information signature. Add () //Create PDF graphics for the page PdfGraphics graphics = page. Creates a new PDF document PdfDocument document = new PdfDocument () //Adds a new page PdfPageBase page = document. return File ( stream, contentType, fileName ) string fileName = "Output.pdf" //Creates a FileContentResult object by using the file contents, content type, and file name. string contentType = "application/pdf" //Define the file name. Close ( true ) //Defining the ContentType for PDF file. MemoryStream stream = new MemoryStream () document. DrawImage ( signatureImage, 0, 0 ) //Save the document into stream. Reason = "I am author of this document." //Draws the signature image. PdfBitmap signatureImage = new PdfBitmap ( imageStream ) //Sets signature information. Read ) //Sets an image for signature field. FileStream imageStream = new FileStream ( "signature.jpg", FileMode. PdfSignature signature = new PdfSignature ( document, page, pdfCert, "Signature" ) //Sets an image for signature field. Read ) PdfCertificate pdfCert = new PdfCertificate ( certificateStream, "password123" ) //Creates a digital signature. FileStream certificateStream = new FileStream ( "PDF.pfx", FileMode. Graphics //Creates a certificate instance from PFX file with private key. Add () //Create PDF graphics for the page. PdfDocument document = new PdfDocument () //Adds a new page. Now you have a nice verified PDF which you can print without any problems.//Creates a new PDF document. Now print the copy of your E-Aadhaar Card on paper and make backups of your PDF file.Sed "/mark currentfile eexec/,/cleartomark/ d" aadhaar-verified.ps | ps2pdf - aadhaar-verified.pdf The “sed” removes a stupid “copy protection” from the postscript file and ps2pdf then creates the PDF file. Print the page into the file “aadhaar-verified.ps”.Click “Close” to close the Signature Properties window.Click “OK” to close the certificate window.Click “Show Certificate” to open the certificate window.Click “Signature Properties” to open the window with the same title.Click on the question mark, a window with title “Signature Validation Status” opens.Open the file with acroread, the password is the ZIP of the city.Install acrobat reader and javascript plugins from the repository: apt-get install acroread acroread-plugins acroread-escript.I assume you saved it as “aadhaar-unverified.pdf”. Enter the code from the SMS to download and save the file.The following steps show how to download the Aadhaar Card and convert it to a nice PDF:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |