Master page for PDF
I am uploading a PDF file using the following code
if (FileUploadControl.PostedFile.ContentType == "application/pdf")
{
string filename = Path.GetFileName(FileUploadControl.FileName);
File开发者_JS百科UploadControl.SaveAs(Server.MapPath("~/App_Data/") + filename);
// Renaming the file uploaded with the ApplicationId
string filePathName = Server.MapPath("~/App_Data/") + filename;
string newfilePathName = (Server.MapPath("~/App_Data/") + Session["ApplicationId"] + ".pdf");
System.IO.File.Move(filePathName, newfilePathName);
lblStatusLabel.Text = "Upload status: File uploaded!";
roUpdate = engeStamp.UpdateAppStatus(5, Convert.ToInt16(Session["ApplicationId"]));
Response.Redirect("Estamp.aspx", false);
roUpdate = engeStamp.UpdateAppStatus(5, Convert.ToInt16(Session["ApplicationId"]));
}
I need to add a header to the uploaded PDF in all the PDF pages (Like a master page in asp.net)
How is it possible?
There are a number of PDF editor API's that are available. My favorite of them is ActivePDF Toolkit. There are others of varying utilities and price and there is probably some freeware out there as well. ActivePDF will allow you to "stitch" together multiple elements, for instance your header with a users uploaded document.
As Cos Callis stated there are many PDF editor API's available. I would like to recommend Amyuni PDF Creator .Net. You can experiment with the trial version and you will have technical support during your evaluation period. I am part of the development team of this product.
精彩评论