Creates a new empty document.
public static LEADDocument Create(
string documentType,
CreateDocumentOptions options
)
Public Shared Function Create(
ByVal documentType As String,
ByVal options As CreateDocumentOptions
) As LEADDocument
public:
static LEADDocument^ Create(
String^ documentType,
CreateDocumentOptions^ options
)
public static Document create(String documentType, CreateDocumentOptions options)
documentType
Document type. Cannot be null.
options
Options to use when creating the document. Cannot be null.
The newly created document.
Use this method to create a new empty document. documentType controls the type of the document created and the following values are currently supported:
Value | Description |
---|---|
"Raster" |
Creates a new Raster document. Requires the Leadtools.Document.Raster.dll assembly. |
"Pdf" |
Creates a new PDF document. Requires the Leadtools.Document.Pdf.dll assembly. |
"Virtual" | Creates a new empty virtual document ready to be filled with pages from other documents. This is the equivalant of calling DocumentFactory.Create(CreateDocumentOptions) |
Any other value | Will throw an exception. |
This method will add items with the key "Created", "Accessed" and "Modified" to Metadata with values equal to the current date and time. The newly created LEADDocument object will have an empty list of Pages. It can then be populated by the user.
The member of options are used as follows:
Member | Description |
---|---|
Cache and UseCache | Used to determine if the newly created document will be saved into the cache later. |
CachePolicy |
If caching is used: Copied to the newly created document and is used to determine when the document and its item are purged from the cache. |
DocumentId |
The ID to be used with the loaded document. When this value is null (the default), then the document factory will create a new unique ID using a (DocumentFactory.NewCacheId). If the value is not null, then it is assumed to be a user-defined ID and used as is. In either case, the value is set in the LEADDocument.DocumentId property of the newly created document. User-defined IDs can be used when the system already has unique ID's associated with the documents to be viewer. The document factory will not check nor guarantee the uniqueness of these IDs. |
MimeType |
Copied as is into the newly created document MimeType member. This value can be null but it is recommended you set it to the MIME type of the document since it will be used when saving the document. Use one of the MIME types constants defined in the Constants class. In the case of virtual documents, this value can be left as null. |
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document