Document.DrawToWeb

Overloads

DrawToWeb()Outputs the generated Document to the current ASPX page.
DrawToWeb(String)Outputs the generated Document to the current ASPX page.
DrawToWeb(String, Boolean)Outputs the generated Document to the current ASPX page.

DrawToWeb()

Outputs the generated Document to the current ASPX page.

public void DrawToWeb()
public Sub DrawToWeb()

Licensing Info

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to output a PDF to the page.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
        
Module MyModule
        
    Sub Main()
        
        'Create a PDF Document
        Dim document As Document = New Document
        'Create a Page and add it to the document
        Dim page As Page = New Page
        Document.Pages.Add(page)
        ' Add a label to the page 
        page.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
        ' Save the PDF document
        Document.DrawToWeb()
    End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
         
public class MyClass : System.Web.UI.Page
{
    private void Page_Load(object sender, System.EventArgs e)
    {
        // Create a PDF Document
        Document document = new Document();
        
        // Create a Page and add it to the document
        Page page = new Page();
        document.Pages.Add( page );
         		
        // Add a label to the page 
        page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
        
        // Save the PDF document
        document.DrawToWeb();
    }
}

Remarks

This method is not available for .NET standard.

DrawToWeb(String)

Outputs the generated Document to the current ASPX page.

public void DrawToWeb(string downloadAsFileName)
public Sub DrawToWeb(downloadAsFileName As String)

Parameters

downloadAsFileName
String

Specifies the file name of the document if it is downloaded.

Licensing Info

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to output a PDF to the page.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
    
Module MyModule
    
    Sub Main()
            'Create a PDF Document
            Dim document As Document = New Document
    
            'Create a Page and add it to the document
            Dim page As Page = New Page
            document.Pages.Add(page)
    
            ' Add a label to the page 
            page.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
    
            ' Save the PDF document
            document.DrawToWeb("MyDocument.pdf")
    End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
     
public class MyClass : System.Web.UI.Page
{
    private void Page_Load(object sender, System.EventArgs e)
{
        // Create a PDF Document
    Document document = new Document();
    
    // Create a Page and add it to the document
    Page page = new Page();
    document.Pages.Add( page );
     		
    // Add a label to the page 
    page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
    
    // Save the PDF document
    document.DrawToWeb( "MyDocument.pdf" );
    }
}

Remarks

This method is not available for .NET standard.

DrawToWeb(String, Boolean)

Outputs the generated Document to the current ASPX page.

public void DrawToWeb(string downloadAsFileName, bool forceDownload)
public Sub DrawToWeb(downloadAsFileName As String, forceDownload As Boolean)

Parameters

downloadAsFileName
String

Specifies the file name of the document if it is downloaded.

forceDownload
Boolean

Specifies if the Save As dialog should appear.

Licensing Info

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to output a PDF to the page.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
        
Module MyModule
        
    Sub Main()
            'Create a PDF Document
            Dim document As Document = New Document
        
            'Create a Page and add it to the document
            Dim page As Page = New Page
            document.Pages.Add(page)
        
            ' Add a label to the page 
            page.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))
        
            ' Save the PDF document
            document.DrawToWeb("MyDocument.pdf",True)
    End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
         
public class MyClass : System.Web.UI.Page
{
    private void Page_Load(object sender, System.EventArgs e)
    {
        // Create a PDF Document
        Document document = new Document();
        
        // Create a Page and add it to the document
        Page page = new Page();
        document.Pages.Add( page );
         		
        // Add a label to the page 
        page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) );
        
        // Save the PDF document
        document.DrawToWeb( "MyDocument.pdf", true );
    }
}

Remarks

This method is not available for .NET standard.

See Also

Document
ceTe.DynamicPDF

In this topic