digitally signing pdf embedded on web page

Anjali Agarwal 1,531 Reputation points
2023-02-25T23:34:01.3066667+00:00

I have a pdf document embedded on my razor page. I want the users to sign the document digitally. Normally, when I open the pdf document using adobe, I can see a menu bar saying "sign document by typing or drawing signature", something like this:

User's image

I am not seeing anything like this when I embedded the pdf document on my razor web page. below is my code, I used to embed the pdf document:

public IActionResult Index()
        {
            using (MemoryStream stream = new MemoryStream())
            {
                string embed = "<object data=\"{0}\" type=\"application/pdf\" width=\"1000px\" height=\"1000px\">";
                embed += "If you are unable to view file, you can download from <a href = \"{0}\">here</a>";
                embed += " or download <a target = \"_blank\" href = \"http://get.adobe.com/reader/\">Adobe PDF Reader</a> to view the file.";
                embed += "</object>";

                TempData["Embed"] = string.Format(embed, "/BlankPDFFiles/Test.pdf");
                return View();
            }
           
        }

This is an intranet application, Is their any way, I can have the employees sign the pdf document that is embedded on the web page.

Any help will be greatly appreciated.

Developer technologies ASP.NET ASP.NET Core
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2023-02-25T23:54:34.51+00:00

    the user will have to download, edit and upload the pdf. if they just edit the embedded version, its is only updated on their temp copy of the document.

    with an embedded pdf, the browser downloads the pdf to its cache, then calls the registered pdf viewer passing url, when the viewer does the fetch, its pulled from the cache.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.