PrintAsPDF

Description

Prints the current web page as a PDF file.

Applies to

WebBrowser control

Syntax

controlname.PrintAsPDF ( string PdfFile )

Argument

Description

controlname

The name of the WebBrowser control.

PdfFile

The file path and file name of the PDF file to be saved.


Return value

Integer.

Returns 1 if the function succeeds and a negative value if an error occurs. If any argument's value is null, the method returns null.

Examples

This example prints the current web page as printaspdf.pdf and saves it under the current directory:

Integer li_rtn
String ls_pdfpath
Ls_pdfpath = getcurrentdirectory() + "\printaspdf.pdf"
Li_rtn = wb_1.PrintAsPDF(ls_pdfpath)

See also

CancelDownload

EvaluateJavascriptAsync

EvaluateJavascriptSync

GetSource

GoBack

GoForward

Navigate

PauseDownload

Refresh

RegisterEvent

ResumeDownload

StopNavigation

UnregisterEvent

Zoom