Document Solutions for Word
DS.Documents.Word Assembly / GrapeCity.Documents.Word Namespace / GcWordDocumentExt Class / SaveAsPdf Method / SaveAsPdf(GcWordDocument,Stream,WordLayoutSettings,PdfOutputSettings) Method
The GcWordDocument instance to convert to PDF.
The destination stream.
Settings used for layout of a GcWordDocument.
The set of parameters for the output PDF.

In This Topic
    SaveAsPdf(GcWordDocument,Stream,WordLayoutSettings,PdfOutputSettings) Method
    In This Topic
    Saves the current GcWordDocument as PDF to a specified stream.
    Syntax
    'Declaration
     
    Public Overloads Shared Sub SaveAsPdf( _
       ByVal source As GcWordDocument, _
       ByVal stream As System.IO.Stream, _
       Optional ByVal layoutSettings As WordLayoutSettings, _
       Optional ByVal pdfSettings As PdfOutputSettings _
    ) 
    public static void SaveAsPdf( 
       GcWordDocument source,
       System.IO.Stream stream,
       WordLayoutSettings layoutSettings,
       PdfOutputSettings pdfSettings
    )

    Parameters

    source
    The GcWordDocument instance to convert to PDF.
    stream
    The destination stream.
    layoutSettings
    Settings used for layout of a GcWordDocument.
    pdfSettings
    The set of parameters for the output PDF.
    Remarks
    The new GrapeCity.Documents.Word.Layout.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); }
    See Also