GdPicture.NET.14
GdPicture14 Namespace / GdPictureDocumentUtilities Class / FetchLatestChromeHeadlessShell Method
The folder where the executable will be downloaded
Example





In This Topic
FetchLatestChromeHeadlessShell Method
In This Topic
Download the latest version of chrome headless shell and save it to the specified path, if the latest version is already present it'll return the path of the existent browser path.
Syntax
'Declaration
 
Public Shared Function FetchLatestChromeHeadlessShell( _
   ByVal path As String _
) As String
public static string FetchLatestChromeHeadlessShell( 
   string path
)
public function FetchLatestChromeHeadlessShell( 
    path: String
): String; static; 
public static function FetchLatestChromeHeadlessShell( 
   path : String
) : String;
public: static string* FetchLatestChromeHeadlessShell( 
   string* path
) 
public:
static String^ FetchLatestChromeHeadlessShell( 
   String^ path
) 

Parameters

path
The folder where the executable will be downloaded

Return Value

The full path of the downloaded executable
Remarks
In order to ensure the use of the latest revision of Chrome, we strongly advise to run this method regularly. See more here.
Example
var latestChromeDownloadPath = GdPictureDocumentUtilities.GetLatestChromeHeadlessShell(Environment.CurrentDirectory);
 GdPictureDocumentUtilities.SetWebBrowserPath(latestChromeDownloadPath);
            
 using GdPictureDocumentConverter conv = new();
            
 var status = conv.LoadFromHttp(new Uri("https://avepdf.com/"));
    if (status != GdPictureStatus.OK)
 {
    throw new Exception($"Convert from http Failed ! ({status})");
}
            
 status = conv.SaveAsPDF("output.pdf");
 if (status != GdPictureStatus.OK)
 {
    throw new Exception($"Saved from http Failed ! ({status})");
 }
See Also