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
stringThe 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
isnull
.
Generate(Stream, Action<Document>)
Generates PDF document and saves it to a stream.
public void Generate(Stream stream, Action<Document> buildLayout)
Parameters
stream
StreamThe 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
orbuildLayout
isnull
.