Table of Contents

Method Generate

Namespace
BitMiracle.Docotic.Pdf.Layout
Assembly
BitMiracle.Docotic.Pdf.Layout.dll

Generate(string, Action<Document>)

Generates PDF document and saves it to a file.

public void Generate(string filePath, Action<Document> buildLayout)

Parameters

filePath string

The path to the output file.

buildLayout Action<Document>

The handler to build document layout.

Remarks

Read the Building documents article for examples of using this method.

Exceptions

ArgumentNullException

buildLayout is null.

Generate(Stream, Action<Document>)

Generates PDF document and saves it to a stream.

public void Generate(Stream stream, Action<Document> buildLayout)

Parameters

stream Stream

The writable and seekable output stream.

buildLayout Action<Document>

The handler to build document layout.

Remarks

Caller of the method is responsible for disposing of the stream.

Read the Building documents article for examples of using this method.

Exceptions

ArgumentNullException

stream or buildLayout is null.