Click here to Skip to main content
15,889,865 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have many link buttons in my page.

When i click the link button, it should open a file from specific server folder and it should show in iframe.

The challenging of the task is, when i open the pdf, then i want edit the pdf file (in iframe), then it should save n the same server folder.

Is it possible to open/save in same folder even if i get the read/write access server and pdf..?


What I have tried:

<asp:LinkButton ID="lnkView" runat="server" Text="View PDF" OnClick="View"></asp:LinkButton>
            <asp:Literal ID="ltEmbed" runat="server" />


protected void View(object sender, EventArgs e)
  {
          string embed = "<object data=\"{0}\" type=\"application/pdf\" width=\"500px\" height=\"500px\">";
          embed += "If you are unable to view file, you can download from <a href = \"{0}&download=1\">here</a>";
          embed += " or download <a target = \"_blank\" href = \"http://get.adobe.com/reader/\">Adobe PDF Reader</a> to view the file.";
          embed += "</object>";
          ltEmbed.Text = string.Format(embed, ResolveUrl("\\ServerTM101A\TEST\TEST.pdf"));

  }
Posted
Updated 6-Mar-19 0:29am

1 solution

There are a few problems with this:
1. The edit-ability of the PDF is very limited with browser plug-in.
2. The save function would only save to the local machine and not to the server.

The potential good news is that there were many changes to the <object> in HTML5 that does let an object to be submitted within a form. I have not worked with this functionality so i could not tell you if it will indeed upload the edited PDF,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900