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
filePathstringThe path to the output file.
buildLayoutAction<Document>The handler to build document layout.
Remarks
Read the Building documents article for examples of using this method.
Exceptions
- ArgumentNullException
buildLayoutisnull.
Generate(Stream, Action<Document>)
Generates PDF document and saves it to a stream.
public void Generate(Stream stream, Action<Document> buildLayout)
Parameters
streamStreamThe writable and seekable output stream.
buildLayoutAction<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
streamorbuildLayoutisnull.