Skip to content

Commit

Permalink
Making the new headless mode the default mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Kees committed Sep 22, 2023
1 parent 85f823f commit 76f067c
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions ChromiumHtmlToPdfLib/Converter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,16 +430,6 @@ public bool DiskCacheDisabled
get => !_useCache;
set => _useCache = !value;
}

/// <summary>
/// When set then the new Chromium headless mode is used
/// </summary>
/// <remarks>
/// In the near feature when Chromium decides to make this the default then
/// probably this property will be removed. See https://developer.chrome.com/articles/new-headless/
/// for more information
/// </remarks>
public bool UseNewHeadlessMode { get; set; }
#endregion

#region Constructor & Destructor
Expand Down Expand Up @@ -780,17 +770,7 @@ public void ResetChromiumArguments()

_defaultChromiumArgument = new List<string>();
// https://developer.chrome.com/articles/new-headless/
if (UseNewHeadlessMode)
{
WriteToLog("The property UseNewHeadlessMode has been set ... using the new --headless=new mode");
AddChromiumArgument("--headless", "new");
}
else
{
WriteToLog("Using the 'old' headless mode");
AddChromiumArgument("--headless");
}

AddChromiumArgument("--headless", "new");
AddChromiumArgument("--disable-gpu");
AddChromiumArgument("--hide-scrollbars");
AddChromiumArgument("--mute-audio");
Expand Down

0 comments on commit 76f067c

Please sign in to comment.