Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5949047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:11:39+00:00 2026-05-22T17:11:39+00:00

I have a project to generate PDFs on a server using ASP.NET (C #).

  • 0

I have a project to generate PDFs on a server using ASP.NET (C #). But now we need the customer to be able to digitally sign these PDF. From what I saw, the documents must be signed at the client side, using an applet, as in the server I have no access to the private key of the certificate, but as I said above, the PDFs are generated on the server and I keep them there.

So, what I need is to digitally sign PDFs on the server, taking the client’s certificate.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:11:40+00:00Added an answer on May 22, 2026 at 5:11 pm

    Since it is not possible or anyway safe to extract and send the client’s private key, to sign pdfs on the server you need to establish a "session" with the client and let them calculate the signature.


    The steps should be something like:

    1. the client sends his public certificate to be embedded in the signed pdf

    2. the server generates the pdf, embeds the certificate and calculates the hash (eg: sha1)

    3. the server sends the hash to the client applet

    4. the applet calculates the digital signature with her private key

    5. the applet sends the signature to the server

    6. the server embeds the digital signature and closes the pdf.


    To do this with itext you will have to use the preclose method after ambedding the certificate, so to be able to alculate the sha1 hash on the final document.
    Then after pre-closing the pdf you will have to calculate the hash of the pdf and send it to the client.
    Be careful: while preclosed you will have to keep the document in memory, for example in a server session.

    To generate the pdf, embed certificates and prepaare the document you can use itextsharp, the c# port of the itext library. To calculate the hash and create the pkcs7 envelopes you can use the .net crypto api.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project using ASP.Net MVC 3 and now I'm creating a report
I have a project to create an asp.net mvc site to generate a quiz.
I am using ASP.NET Dynamic Data Entities project to generate a web application for
I am using apache ant to generate javadoc for my project. I have a
I have a project where I need to generate a PDF file. Within this
I have a project which needs to generate PDF documents. I am using iTextSharp.
I have a project I'm building with maven and I need to generate a
I have project in ASP.NET with postgreSQL database. I do not know what of
I have a project in which I need to generate a unique 5 digit
I have a project where I would like to generate a report export in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.