Hi Everyone..
I need a little help on an issue. Im getting error while opening a pdf file in safari browser using c# code which uses iTextSharp library.
I coded for pre-populating a pdf form which is of MIME-type: "application/vnd.fdf" and opening it in safari browser.
It gives me the error that: "There was an error opening this document. The file cannot be found"
Some how this code works fine for IE, Chrome and Mozilla Firefox browsers.
The following are the lines i coded:
protected void Page_Load(object sender, EventArgs e)
{
Response.Clear();
Response.ContentType = "application/vnd.fdf";
FdfWriter fdfWriter = new FdfWriter();
fdfWriter.File = targetURL;// target url is the location like: http://testsite/pdf/TestForm.pdf
fdfWriter.SetFieldAsName("txtName", userName);
Response.AddHeader("Content-disposition", "inline; filename=TestForm.fdf");
fdfWriter.WriteTo(Response.OutputStream);
Response.End();
}
Need an urgent help over this issue...
Thanx in advance