From 951e99c640d0e2f107e0d4818b100bd83da0a3da Mon Sep 17 00:00:00 2001 From: John Lyu Date: Tue, 8 Oct 2024 08:52:29 +0800 Subject: [PATCH] use --headless=old for chrome --- dataframe_image/_browser_pdf.py | 2 +- dataframe_image/_version.py | 2 +- dataframe_image/converter/browser/chrome_converter.py | 2 +- dataframe_image/converter/browser/selenium_converter.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dataframe_image/_browser_pdf.py b/dataframe_image/_browser_pdf.py index cfe6a41..79910b8 100644 --- a/dataframe_image/_browser_pdf.py +++ b/dataframe_image/_browser_pdf.py @@ -91,7 +91,7 @@ def get_launch_args(): # temp_dir = TemporaryDirectory() temp_dir_name = os.path.abspath(".") args = [ - "--headless", + "--headless=old", "--enable-logging", "--disable-gpu", "--run-all-compositor-stages-before-draw", diff --git a/dataframe_image/_version.py b/dataframe_image/_version.py index 54cfb10..2c85561 100644 --- a/dataframe_image/_version.py +++ b/dataframe_image/_version.py @@ -1 +1 @@ -__version__ = "0.2.5.dev1+g527edaf.d20240913" \ No newline at end of file +__version__ = "0.2.5.dev8+g18a693c.d20241008" \ No newline at end of file diff --git a/dataframe_image/converter/browser/chrome_converter.py b/dataframe_image/converter/browser/chrome_converter.py index f3a42a6..0878456 100644 --- a/dataframe_image/converter/browser/chrome_converter.py +++ b/dataframe_image/converter/browser/chrome_converter.py @@ -115,7 +115,7 @@ def screenshot(self, html, ss_width=1400, ss_height=900) -> Image: args = [ "--enable-logging", "--disable-gpu", - "--headless", + "--headless=old", # "--no-sandbox", f"--crash-dumps-dir={temp_dir}", f"--force-device-scale-factor={self.device_scale_factor}", diff --git a/dataframe_image/converter/browser/selenium_converter.py b/dataframe_image/converter/browser/selenium_converter.py index d691128..413c23b 100644 --- a/dataframe_image/converter/browser/selenium_converter.py +++ b/dataframe_image/converter/browser/selenium_converter.py @@ -20,7 +20,7 @@ def screenshot(self, html: str) -> Image: from selenium.webdriver.firefox.service import Service options = selenium.webdriver.FirefoxOptions() - options.add_argument("--headless") + options.add_argument("--headless=old") profile = selenium.webdriver.FirefoxProfile(temp_dir) profile.set_preference(