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 stream in Declaritive mode.

It is the responsibility of the client (caller) to Flush and Close the .

Please check the turorial on differences in the Push (normal) and Pull (low resource, event driven) mode generation. There are some features that change behavior when using Pull-mode.

The following snippets demonstrate how to create a simple PDF document and save it to a file using Declaritive mode. C# // Create a document Document doc = new Document(); Section section = new Section(); doc.Sections.Add( section ); // Add some content TextParagraph text = new TextParagraph(); text.Fragments.Add( new Fragment( "Hello world!" ) ); section.Paragraphs.Add( text ); using( FileStream fs = new FileStream( "out.pdf", FileMode.Create, FileAccess.ReadWrite ) ) { // Write the document in Declaritive mode doc.Write( fs ); } VB.NET ' Create a new document Dim doc As New Document Dim section As New Section doc.Sections.Add(section) ' Add some content Dim text As New TextParagraph text.Fragments.Add(New Fragment("Hello world!")) section.Paragraphs.Add(text) Dim fs As FileStream = Nothing Try fs = New FileStream("out.pdf", FileMode.Create, FileAccess.ReadWrite) ' Write in Declaritive mode doc.Write(fs) Finally If Not fs Is Nothing Then fs.Close() End If End Try


public Void Write(Stream stream)




Stream stream
Write to this stream.
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.