Hallo Ja ich weiss, wollte ich auch. Aber leider ist das Projekt nur lokal im Moment.
Gr�sse Patrik >-- Original-Nachricht -- >From: "Thomas Bandt" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Subject: AW: AW: AW: [Asp.net] PDF im Browser anzeigen zum x-ten Mal >Reply-To: [EMAIL PROTECTED] >Date: Mon, 8 Nov 2004 13:35:21 +0100 > > >hm... w�re nat�rlich praktischer wenn du uns das in der form >http://xyz.de/pdf.aspx geben w�rdest ;-) > >> -----Urspr�ngliche Nachricht----- >> Von: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] Im Auftrag von >> [EMAIL PROTECTED] >> Gesendet: Montag, 8. November 2004 13:31 >> An: [EMAIL PROTECTED] >> Betreff: RE: AW: AW: [Asp.net] PDF im Browser anzeigen zum x-ten Mal >> >> Hallo >> >> Nat�rlich gerne: >> >> >> >>>schnipp im Page_Load >> >> byte[] file = - bytearray PDF Datei - >> string fileName = - dateiname - >> string fileType = - dateeindung - >> >> Response.Clear(); >> Response.ClearHeaders(); >> >> switch (fileType.ToLower()) { >> case "pdf" : >> Response.ContentType = "application/pdf"; >> break; >> case "doc" : >> Response.ContentType = "application/msword"; >> break; >> case "xls" : >> Response.ContentType = "application/vnd.ms-excel"; >> break; >> } >> >> // Datei tempor�r speichern >> // damit WriteFile verwendet werden kann. (WriteFile wegen >> PDF Problem) >> string destdirectory = >> Path.GetDirectoryName(Request.PhysicalPath); >> string destfilename = Path.GetTempFileName(); >> >> FileStream destfile = File.Create(destfilename,file.Length); >> int count = 0; >> while (count < file.Length) { >> destfile.WriteByte(file[count]); >> count++; >> } >> destfile.Close(); >> >> Response.WriteFile(destfilename); >> Response.End(); >> >> // tempor�re Datei wieder l�schen >> File.Delete(destfilename); >> >> <<<schnapp >> >> >> Dies ist die neuste Variante. Ein �ltere Variante ging direkt >> �ber BinaryWrite >> ohne tempor�re Datei. >> >> Gr�sse >> Patrik >> >> >> >> >> >> >-- Original-Nachricht -- >> >From: "Alexander Zeitler" <[EMAIL PROTECTED]> >> >To: <[EMAIL PROTECTED]> >> >Subject: RE: AW: AW: [Asp.net] PDF im Browser anzeigen zum x-ten Mal >> >Reply-To: [EMAIL PROTECTED] >> >Date: Mon, 8 Nov 2004 13:10:51 +0100 >> > >> > >> >Hallo, >> > >> >> >> >> Den Acrobat hab ich schon mal De- und wieder installiert. >> >> Beim IE wird das >> >> wohl schwieriger. Jedenfalls habe ich alle Updates und >> >> Patches installiert, >> >> m�glicherweise ist das aber genau das Problem. >> >> >> > >> >lade doch den Code mal hoch, damit ein Dritter mit >> >IE testen kann. >> > >> >Gruss >> > >> >Alex >> > >> > >> >_______________________________________________ >> >Asp.net Mailingliste, Postings senden an: >> >[EMAIL PROTECTED] >> >An-/Abmeldung und Suchfunktion unter: >> >http://www.glengamoi.com/mailman/listinfo/asp.net >> >> _______________________________________________ >> Asp.net Mailingliste, Postings senden an: >> [EMAIL PROTECTED] >> An-/Abmeldung und Suchfunktion unter: >> http://www.glengamoi.com/mailman/listinfo/asp.net >> > >_______________________________________________ >Asp.net Mailingliste, Postings senden an: >[EMAIL PROTECTED] >An-/Abmeldung und Suchfunktion unter: >http://www.glengamoi.com/mailman/listinfo/asp.net _______________________________________________ Asp.net Mailingliste, Postings senden an: [EMAIL PROTECTED] An-/Abmeldung und Suchfunktion unter: http://www.glengamoi.com/mailman/listinfo/asp.net
