[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.GcWordDocumentExt

Class GcWordDocumentExt

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.Layout.dll

Provides extension methods for converting GcWordDocument to other formats.

public static class GcWordDocumentExt
Inheritance
object
GcWordDocumentExt
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Methods

SaveAsPdf(GcWordDocument, Stream, WordLayoutSettings, PdfOutputSettings)

Saves the current GcWordDocument as PDF to a specified stream.

[Obsolete("Create GcWordLayout and use its methods instead.")]
public static void SaveAsPdf(this GcWordDocument source, Stream stream, WordLayoutSettings layoutSettings = null, PdfOutputSettings pdfSettings = null)

Parameters

source GcWordDocument

The GcWordDocument instance to convert to PDF.

stream System.IO.Stream

The destination stream.

layoutSettings WordLayoutSettings

Settings used for layout of a GcWordDocument.

pdfSettings PdfOutputSettings

The set of parameters for the output PDF.

Remarks

The new GcWordLayout class is more efficient and offers more abilities than this extension method. Use code like the following instead:

using (var wl = new GcWordLayout(gcWordDocument, layoutSettings))
{
    wl.SaveAsPdf(stream, null, pdfSettings);
}

SaveAsPdf(GcWordDocument, string, WordLayoutSettings, PdfOutputSettings)

Saves the current GcWordDocument as PDF to a specified file.

[Obsolete("Create GcWordLayout and use its methods instead.")]
public static void SaveAsPdf(this GcWordDocument source, string filePath, WordLayoutSettings layoutSettings = null, PdfOutputSettings pdfSettings = null)

Parameters

source GcWordDocument

The GcWordDocument instance to convert to PDF.

filePath string

Full path to the output file.

layoutSettings WordLayoutSettings

Settings used for layout of a GcWordDocument.

pdfSettings PdfOutputSettings

The set of parameters for the output PDF.

Remarks

The new GcWordLayout class is more efficient and offers more abilities than this extension method. Use code like the following instead:

using (var wl = new GcWordLayout(gcWordDocument, layoutSettings))
{
    wl.SaveAsPdf(filePath, null, pdfSettings);
}