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

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

    Parameters

    source
    The GcWordDocument instance to convert to PDF.
    filePath
    Full path to the output file.
    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(filePath, null, pdfSettings); }
    See Also