I'm having problems producing a pdf file on a specific W2003 box.
On two seemingly identical w2003 boxes (a virtual and a physical test server) I get different results producing a pdf file:
Dim pdf1 As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf
pdf1.BindXML(System.Web.HttpContext.Current.Server.MapPath("frame.xml"), Nothing)
pdf1.Save("x.pdf", SaveType.OpenInAcrobat, Response)
On the virtual server the pdf renders fine.
On the testserver the pdf renders to an empty document that is named as the virtual site (ie virtual site is test = test.pdf). The file downloads file, but when opening the file adobe reader prompts saying "cound not open.... because ... not supported file type or.... damaged...".
I think it may be IIS differences between the machines, but am unsure where to start looking/debugg'in.
If I replace the Save call with this:
pdf1.Save(Server.MapPath(String.Format("{0}.Pdf", "xyz")))
The file is produced just fine on both servers.
If I replace the Save call with this:
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
pdf1.Save(Response.OutputStream)
Response.End()
and
a) run the page from the local host on the testserver I'm prompted to download an unknown file. After downloading this unknown file and adding the extension pdf the file loads correctly.
b) run the page via its ip (not localhost) the page first appears "all white" or empty, but appears just fine loaded in adobe reader after I hit F5 (refresh).
Any clues?