Click here to Skip to main content
15,896,445 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Export Gridview to PDF Pin
SamRST22-Mar-10 23:32
SamRST22-Mar-10 23:32 
GeneralRe: Export Gridview to PDF Pin
PSK_22-Mar-10 23:50
PSK_22-Mar-10 23:50 
GeneralRe: Export Gridview to PDF Pin
SamRST22-Mar-10 23:53
SamRST22-Mar-10 23:53 
GeneralRe: Export Gridview to PDF Pin
PSK_23-Mar-10 0:08
PSK_23-Mar-10 0:08 
GeneralRe: Export Gridview to PDF Pin
SamRST23-Mar-10 0:13
SamRST23-Mar-10 0:13 
AnswerRe: Export Gridview to PDF Pin
mrcooll23-Mar-10 11:35
mrcooll23-Mar-10 11:35 
GeneralRe: Export Gridview to PDF Pin
SamRST23-Mar-10 19:23
SamRST23-Mar-10 19:23 
GeneralRe: Export Gridview to PDF Pin
mrcooll23-Mar-10 21:29
mrcooll23-Mar-10 21:29 
http://www.asppdf.com/[^]

I used this product
http://www.html-to-pdf.net/ExpertPDF-HtmlToPdf-Converter.aspx[^]
''' <summary>
        ''' Convert the HTML code from the specified URL to a PDF document and send the 
        ''' document as an attachment to the browser
        ''' </summary>
        ''' <remarks></remarks>
        Private Sub ConvertURLToPDF(ByVal url As String)

            Dim urlToConvert As String = url
            Dim selectablePDF As Boolean = True

            ' Create the PDF converter. Optionally you can specify the virtual browser 
            ' width as parameter. 1024 pixels is default, 0 means autodetect
            Dim pdfConverter As PdfConverter = New PdfConverter()
            ' set the license key
            'pdfConverter.LicenseKey = "put your license key here"
            ' set the converter options
            pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4
            pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal
            pdfConverter.PdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait

            ' set if header and footer are shown in the PDF - optional - default is false 
            pdfConverter.PdfDocumentOptions.ShowHeader = False
            pdfConverter.PdfDocumentOptions.ShowFooter = False
            ' set to generate a pdf with selectable text or a pdf with embedded image - optional - default is true
            pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = True
            ' set if the HTML content is resized if necessary to fit the PDF page width - optional - default is true
            pdfConverter.PdfDocumentOptions.FitWidth = True

            ' set the embedded fonts option - optional - default is false
            pdfConverter.PdfDocumentOptions.EmbedFonts = False
            ' set the live HTTP links option - optional - default is true
            pdfConverter.PdfDocumentOptions.LiveUrlsEnabled = True


            ' set if the JavaScript is enabled during conversion to a PDF with selectable text 
            ' - optional - default is false
            pdfConverter.ScriptsEnabled = False
            ' set if the ActiveX controls (like Flash player) are enabled during conversion 
            ' to a PDF with selectable text - optional - default is false
            pdfConverter.ActiveXEnabled = False


            ' set if the images in PDF are compressed with JPEG to reduce the PDF document size - optional - default is true
            pdfConverter.PdfDocumentOptions.JpegCompressionEnabled = True

            ' enable auto-generated bookmarks for a specified list of tags (e.g. H1 and H2)
            'If (cbBookmarks.Checked) Then
            '    pdfConverter.PdfBookmarkOptions.TagNames = New String() {"H1", "H2"}
            'End If

            ' set PDF security options - optional
            'pdfConverter.PdfSecurityOptions.CanPrint = True
            'pdfConverter.PdfSecurityOptions.CanEditContent = True
            'pdfConverter.PdfSecurityOptions.UserPassword = ""

            ' set PDF document description - optional
            pdfConverter.PdfDocumentInfo.AuthorName = "Winnovative HTML to PDF Converter"

            ' add HTML header
            'If (cbAddHeader.Checked) Then
            '    AddHeader(pdfConverter)
            'End If
            '' add HTML footer
            'If (cbAddFooter.Checked) Then
            '    AddFooter(pdfConverter)
            'End If

            ' Performs the conversion and get the pdf document bytes that you can further 
            ' save to a file or send as a browser response
            Dim pdfBytes As Byte() = pdfConverter.GetPdfBytesFromUrl(urlToConvert)

            ' send the PDF document as a response to the browser for download
            Dim Response As System.Web.HttpResponse = System.Web.HttpContext.Current.Response
            Response.Clear()
            Response.AddHeader("Content-Type", "binary/octet-stream")
            Response.AddHeader("Content-Disposition", "attachment; filename=ConversionResult.pdf; size=" & pdfBytes.Length.ToString())
            Response.Flush()
            Response.BinaryWrite(pdfBytes)
            Response.Flush()
            Response.End()
        End Sub

GeneralRe: Export Gridview to PDF [modified] Pin
SamRST23-Mar-10 23:07
SamRST23-Mar-10 23:07 
GeneralRe: Export Gridview to PDF Pin
mrcooll24-Mar-10 0:12
mrcooll24-Mar-10 0:12 
GeneralRe: Export Gridview to PDF Pin
SamRST24-Mar-10 1:29
SamRST24-Mar-10 1:29 
QuestionLogin Pin
Morgs Morgan22-Mar-10 22:54
Morgs Morgan22-Mar-10 22:54 
AnswerRe: Login Pin
sashidhar22-Mar-10 23:06
sashidhar22-Mar-10 23:06 
Questionpage load tester tool Pin
hussain.attiya22-Mar-10 22:36
hussain.attiya22-Mar-10 22:36 
AnswerRe: page load tester tool Pin
PSK_22-Mar-10 22:40
PSK_22-Mar-10 22:40 
GeneralRe: page load tester tool Pin
hussain.attiya22-Mar-10 23:16
hussain.attiya22-Mar-10 23:16 
AnswerRe: page load tester tool Pin
Pranay Rana22-Mar-10 22:45
professionalPranay Rana22-Mar-10 22:45 
QuestionCookieUrl Passing to iframe page [modified] Pin
Member 387988122-Mar-10 20:22
Member 387988122-Mar-10 20:22 
AnswerRe: CookieUrl Passing to iframe page Pin
PSK_22-Mar-10 20:32
PSK_22-Mar-10 20:32 
GeneralRe: CookieUrl Passing to iframe page Pin
Member 387988122-Mar-10 21:08
Member 387988122-Mar-10 21:08 
GeneralRe: CookieUrl Passing to iframe page Pin
PSK_22-Mar-10 22:08
PSK_22-Mar-10 22:08 
GeneralRe: CookieUrl Passing to iframe page Pin
Member 387988122-Mar-10 22:58
Member 387988122-Mar-10 22:58 
QuestionAfter capturing the image,how to transfer the image to image control with picture property using java script Pin
vbmadhavi22-Mar-10 20:05
vbmadhavi22-Mar-10 20:05 
AnswerRe: After capturing the image,how to transfer the image to image control with picture property using java script Pin
PSK_22-Mar-10 20:25
PSK_22-Mar-10 20:25 
AnswerRe: After capturing the image,how to transfer the image to image control with picture property using java script Pin
Arindam Tewary22-Mar-10 21:32
professionalArindam Tewary22-Mar-10 21:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.