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
- filePathstring
- The 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
- buildLayoutis- null.
Generate(Stream, Action<Document>)
Generates PDF document and saves it to a stream.
public void Generate(Stream stream, Action<Document> buildLayout)Parameters
- streamStream
- The 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
- streamor- buildLayoutis- null.