PDFRasterizer.NET 4.0 is now available. Supports .NET Core. Renders pixel-perfectly.

Method Write

Namespace TallComponents.PDF.Layout
Class Document

Write PDF document to a HttpResponse in Declaritive mode.

Sets the following headers:


The following snippets demonstrate how to create a simple PDF document and stream it to a browser from the code-behind of an ASP.NET page (.aspx) using Declaritice mode. See for an example of Event-Driven mode. C# private void Page_Load(object sender, System.EventArgs e) { Document doc = new Document(); Section section = new Section(); doc.Sections.Add( section ); TextParagraph text = new TextParagraph(); section.Paragraphs.Add( text ); text.Fragments.Add( new Fragment( "Hello world from ASP.NET!" ) ); try { // Write in Declaritive mode doc.Write( Response ); } catch( Exception ex ) { // Do some logging or error reporting here ... } } VB.NET Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Create a document Dim doc As New Document Dim section As New Section doc.Sections.Add(section) ' Add some content Dim text As New TextParagraph section.Paragraphs.Add(text) text.Fragments.Add(New Fragment("Hello world from ASP.NET!")) Try ' Write in Declaritive mode doc.Write(Response) Catch ex As Exception ' Do some logging or error reporting here ... End Try End Sub


public Void Write(HttpResponse response)




HttpResponse response
The HTTP response to write to.
Download TallPDF.NET 4.0
We will send you a download link

  • This field is for validation purposes and should be left unchanged.
Why do we ask your email address?
We send tips that speed up your evaluation
We let you know about bug fixes
You can always unsubscribe with one click
We never share your address with a 3rd party
Thank you for your download

We have sent an email with a download link.