Hi,
I used the this code already, but it gives me the same problem.Here is my code that I used.
Imports System
Imports System.IO
Imports System.Xml
Imports System.Xml.XPath
Imports System.Net.WebClient
Imports System.Web
Imports System.Web.Mail
Imports System.Configuration
Imports System.Text
Imports System.Runtime.Remoting.Messaging
Imports System.Web.HttpContext
Imports Aspose
Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents lnl As System.Web.UI.WebControls.Label
Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
Protected WithEvents CheckBox1 As System.Web.UI.WebControls.CheckBox
Protected WithEvents ListBox1 As System.Web.UI.WebControls.ListBox
Protected WithEvents RadioButton1 As System.Web.UI.WebControls.RadioButton
Protected WithEvents RadioButton2 As System.Web.UI.WebControls.RadioButton
Protected WithEvents Table1 As System.Web.UI.WebControls.Table
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Public Sub SaveAsPDF()
'Dim licenseFile As String = ConfigurationSettings.AppSettings("AsposeLicenseFile")
'If (Not licenseFile Is Nothing) AndAlso (Not String.Empty.Equals(licenseFile)) Then
' Dim asposeWordLicense As New Aspose.Word.License
' asposeWordLicense.SetLicense("C:\\Inetpub\wwwroot\WebApplication2\Aspose.Custom.lic")
' Dim asposePdfLicense As New Aspose.Pdf.License
' asposePdfLicense.SetLicense("C:\\Inetpub\wwwroot\WebApplication2\Aspose.Custom.lic")
'End If
Dim pdf As New Aspose.Pdf.Pdf
Dim surl As String = Request.Url.ToString()
'================================================================================
' with Aspose 2.3 and 3.6.5
'pdf.BindHTMLFromUrl(surl, "GET")
'pdf.Save("aspose.pdf", Aspose.Pdf.SaveType.OpenInBrowser, HttpContext.Current.Response)
'==============================================================================
Dim webClient As System.Net.WebClient = New System.Net.WebClient
Dim myDataBuffer As Byte() = webClient.DownloadData(surl)
Dim postStream As MemoryStream = New MemoryStream(myDataBuffer)
Dim download As String = Encoding.ASCII.GetString(myDataBuffer)
pdf.BindHTML(postStream)
pdf.Save("c:\\ICMS.pdf")
'=======================================================================
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SaveAsPDF()
End Sub
Private Sub InitializeComponent()
End Sub
End Class