mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / WebKitXCEF3 Object / SavePDF Method

The path of the local PDF file to save HTML5 to.

If True it will save the PDF in Landscape layout.

In This Topic
    SavePDF Method
    In This Topic
    Description

    Prints HTML5 to a local PDF file.

    Syntax
    Visual Basic
    Public Sub SavePDF( _
       ByVal FileName As String, _
       ByVal Landscape As Boolean _
    ) 
    Parameters
    FileName

    The path of the local PDF file to save HTML5 to.

    Landscape

    If True it will save the PDF in Landscape layout.

    Example
    Private Sub mnuPrintPDF_Click()
        On Error GoTo ErrHnd
        CommonDialog1.Filter = "PDF Files (.pdf)"
        CommonDialog1.ShowSave
        If CommonDialog1.FileName <> vbNullString Then
            WebKitX1.SavePDF CommonDialog1.FileName, False
        End If
    ErrHnd:
    End Sub
    private void menuItemSaveHTMLToPDF_Click(object sender, EventArgs e)
    {
        SaveFileDialog saveFileDialog2 = new SaveFileDialog();
        saveFileDialog2.Filter = "PDF Files|*.pdf";
        saveFileDialog2.ShowDialog();
        if (saveFileDialog2.FileName != "")
        {
            FileName = saveFileDialog2.FileName;
            WebKitXCEF31.SavePDF(FileName, false);
        }
    }
    See Also