Back to Devexpress

XmpDocument.FromStream(Stream) Method

officefileapi-devexpress-dot-pdf-dot-xmp-dot-xmpdocument-dot-fromstream-x28-system-dot-io-dot-stream-x29.md

latest2.6 KB
Original Source

XmpDocument.FromStream(Stream) Method

Creates an XmpDocument object from the specified stream.

Namespace : DevExpress.Pdf.Xmp

Assembly : DevExpress.Pdf.v25.2.Core.dll

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public static XmpDocument FromStream(
    Stream xmlStream
)
vb
Public Shared Function FromStream(
    xmlStream As Stream
) As XmpDocument

Parameters

NameTypeDescription
xmlStreamStream

A stream that contains the data for the XmpDocument object.

|

Returns

TypeDescription
XmpDocument

The resulting XmpDocument object.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FromStream(Stream) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

pdf-document-api-xmp-example/CS/XmpMetadataExamples/Program.cs#L118

csharp
{
    metadata = XmpDocument.FromStream(xmlStream);
    pdfDocumentProcessor.Document.SetMetadata(metadata);

pdf-document-api-xmp-example/VB/XmpMetadataExamples/Program.vb#L93

vb
Using xmlStream As FileStream = New FileStream("Documents//metadata_new.xml", FileMode.Open, FileAccess.Read)
    metadata = XmpDocument.FromStream(xmlStream)
    pdfDocumentProcessor.Document.SetMetadata(metadata)

See Also

XmpDocument Class

XmpDocument Members

DevExpress.Pdf.Xmp Namespace