خرید بک لینک

Greeting,

I using asp to display PDF files. Some PDFs can be viewed from IE broswer fine but some got error messge "PDF: File is damaged and couldn't be repaired". Any Suggestions?

Thanks.

Below are part of my asp.

Dim theFile theFile=request.querystring("file") Dim filepath

if (theFile <> "" and not isNULL(theFile)) then filepath = "c:File"&theFile&".pdf"

filename=right(filepath, len(filepath)-instrrev(filepath, ""))

Set oFileStream = Server.CreateObject("ADODB.Stream") oFileStream.Open oFileStream.Type = 1 'Binary

oFileStream.LoadFromFile filepath

Response.ContentType = MimeType Response.AddHeader "Content-Disposition", "inline; filename=" & filename Response.BinaryWrite(oFileStream.Read)

oFileStream.Close Set oFileStream= Nothing

end if

برچسب: نویسنده: استخدام کار تاريخ: شنبه 7 فروردين 1395 ساعت: 20:35

صفحه بندی