PresentationDocument.Create Method

Definition

Overloads

Create(Package, PresentationDocumentType)

Created a new instance of the PresentationDocument class from the specified package.

Create(Stream, PresentationDocumentType)

Created a new instance of the PresentationDocument class from the IO stream.

Create(String, PresentationDocumentType)

Creates a new instance of the PresentationDocument class from the specified file.

Create(Package, PresentationDocumentType, Boolean)

Creates a new instance of the PresentationDocument class from the specified package.

Create(Stream, PresentationDocumentType, Boolean)

Creates a new instance of the PresentationDocument class from the IO stream.

Create(String, PresentationDocumentType, Boolean)

Created a new instance of the PresentationDocument class from the specified file.

Create(Package, PresentationDocumentType)

Created a new instance of the PresentationDocument class from the specified package.

C#
public static DocumentFormat.OpenXml.Packaging.PresentationDocument Create (System.IO.Packaging.Package package, DocumentFormat.OpenXml.PresentationDocumentType type);

Parameters

package
Package

The specified OpenXml package.

type
PresentationDocumentType

The type of the PresentationDocument.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "package" is null reference.

Thrown when "package" is not opened with Write access.

Applies to

DocumentFormat.OpenXml 3.0.1 and other versions
Product Versions
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0, 3.0.0, 3.0.1

Create(Stream, PresentationDocumentType)

Created a new instance of the PresentationDocument class from the IO stream.

C#
public static DocumentFormat.OpenXml.Packaging.PresentationDocument Create (System.IO.Stream stream, DocumentFormat.OpenXml.PresentationDocumentType type);

Parameters

stream
Stream

The IO stream on which to create the PresentationDocument.

type
PresentationDocumentType

The type of the PresentationDocument.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "stream" is null reference.

Thrown when "stream" is not opened with Write access.

Applies to

DocumentFormat.OpenXml 3.0.1 and other versions
Product Versions
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0, 3.0.0, 3.0.1

Create(String, PresentationDocumentType)

Creates a new instance of the PresentationDocument class from the specified file.

C#
public static DocumentFormat.OpenXml.Packaging.PresentationDocument Create (string path, DocumentFormat.OpenXml.PresentationDocumentType type);

Parameters

path
String

The path and file name of the target PresentationDocument.

type
PresentationDocumentType

The type of the PresentationDocument.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "path" is null reference.

Applies to

DocumentFormat.OpenXml 3.0.1 and other versions
Product Versions
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0, 3.0.0, 3.0.1

Create(Package, PresentationDocumentType, Boolean)

Creates a new instance of the PresentationDocument class from the specified package.

C#
public static DocumentFormat.OpenXml.Packaging.PresentationDocument Create (System.IO.Packaging.Package package, DocumentFormat.OpenXml.PresentationDocumentType type, bool autoSave);

Parameters

package
Package

The specified OpenXml package.

type
PresentationDocumentType

The type of the PresentationDocument.

autoSave
Boolean

Whether to auto save the created document.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "package" is null reference.

Thrown when "package" is not opened with Write access.

Applies to

DocumentFormat.OpenXml 3.0.1 and other versions
Product Versions
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0, 3.0.0, 3.0.1

Create(Stream, PresentationDocumentType, Boolean)

Creates a new instance of the PresentationDocument class from the IO stream.

C#
public static DocumentFormat.OpenXml.Packaging.PresentationDocument Create (System.IO.Stream stream, DocumentFormat.OpenXml.PresentationDocumentType type, bool autoSave);

Parameters

stream
Stream

The IO stream on which to create the PresentationDocument.

type
PresentationDocumentType

The type of the PresentationDocument.

autoSave
Boolean

Whether to auto save the created document.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "stream" is null reference.

Thrown when "stream" is not opened with Write access.

Applies to

DocumentFormat.OpenXml 3.0.1 and other versions
Product Versions
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0, 3.0.0, 3.0.1

Create(String, PresentationDocumentType, Boolean)

Created a new instance of the PresentationDocument class from the specified file.

C#
public static DocumentFormat.OpenXml.Packaging.PresentationDocument Create (string path, DocumentFormat.OpenXml.PresentationDocumentType type, bool autoSave);

Parameters

path
String

The path and file name of the target PresentationDocument.

type
PresentationDocumentType

The type of the PresentationDocument.

autoSave
Boolean

Whether to auto save the created document.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "path" is null reference.

Applies to

DocumentFormat.OpenXml 3.0.1 and other versions
Product Versions
DocumentFormat.OpenXml 2.7.1, 2.7.2, 2.8.0, 2.8.1, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.13.0, 2.13.1, 2.14.0, 2.15.0, 2.16.0, 2.17.1, 2.18.0, 2.19.0, 2.20.0, 3.0.0, 3.0.1