Creates an empty PDF document with no pages and writes it to a stream.
A Stream class descendant specifying the stream to which the PDF empty document should be written.
Use this method to create an empty document and write it to a stream.
Use the PDF document creation API to continue to generate the document layout (e.g., append pages with graphics to the PDF document, generate bookmarks, and attach files). Refer to the following topic for more information: Additional Content
The PDF specification does not describe empty documents. For this reason, most third-party PDF viewers cannot open such files. This does not apply to the DevExpress WinForms PDF Viewer and WPF PDF Viewer, which are less demanding concerning the validity of opened documents, and are capable of opening documents containing no pages.
This CreateEmptyDocument method overload writes generated document content into the stream specified as this method’s parameter. The SaveDocument method call rewrites this stream.