ASP.NET

Moderators: None (Apply to moderate this forum)
Number of threads: 1727
Number of posts: 3292

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
can't download pdf with internet explorer Posted by jacobgold on 23 May 2012 at 8:01 PM
I'm working on a website in which a user enters a name and then presses a button that prompts the server to create a pdf file according to the information provided, and then sends the file to the user.

I'm testing the website on my laptop without IIS.

I needed the pdf to be hebrew and couldn't find a pdfwrite with vb on hebrew; instead, I create a MS Word document and then convert it to pdf using the code below.

This works fine on Firefox, Chrome, and Safari, but on Internet Explorer the page disconnects before the download. It disconnects when the create word statement is executed.

Can anyone help me?

   Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles      Button1.Click
      Dim strname As String
      strname = TextBox1.Text.Trim

      Dim oword As New word.Application
      Dim odoc As New word.Document
      oword = CreateObject("word.Application")

      odoc = oword.Documents.Add("C:\documents\tamp.dotx")

      odoc.Bookmarks.Item("name1").Range.Text = strname
      odoc.Bookmarks.Item("name2").Range.Text = strname
      odoc.Bookmarks.Item("name3").Range.Text = strname
      odoc.Bookmarks.Item("name4").Range.Text = strname
      odoc.Bookmarks.Item("name5").Range.Text = strname
      odoc.Bookmarks.Item("name6").Range.Text = strname

      odoc.ExportAsFixedFormat(Server.MapPath("\neshume.pdf"), 17)
      Response.Redirect(Server.MapPath("\neshume.pdf"))
      end sub

Thread Tree
jacobgold can't download pdf with internet explorer on 23 May 2012 at 8:01 PM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.