diff --git a/.github/workflows/html_generation.yml b/.github/workflows/html_generation.yml
index 90d9a780d6..e176c2b9a9 100644
--- a/.github/workflows/html_generation.yml
+++ b/.github/workflows/html_generation.yml
@@ -19,7 +19,11 @@ jobs:
- name: Install dependencies (apt-get)
run: |-
sudo apt-get update
- sudo apt-get install -y libmagickwand-dev wkhtmltopdf
+ wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
+ sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
+ sudo apt install -y build-essential xorg libssl-dev libxrender-dev wget
+ wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb"
+ sudo apt install -y ./wkhtmltox_0.12.6-1.bionic_amd64.deb
- name: Install dependencies (pip)
run: |-
diff --git a/code-generators/SinglePageDocGenerator.py b/code-generators/SinglePageDocGenerator.py
index b473b68aff..cf9dae1875 100644
--- a/code-generators/SinglePageDocGenerator.py
+++ b/code-generators/SinglePageDocGenerator.py
@@ -242,7 +242,7 @@ def WriteToHtmlFile(content: str, name: str) -> Path:
def PdfConversion(html_path: Union[Path, str], language: str, css: Union[str, List[str]] = None) -> None:
try:
pdf_name = f'{str(html_path)[:-5]}-{"CSharp" if language == "csharp" else "Python"}.pdf'
- pdfkit.from_file(str(html_path), pdf_name, css=f'{css}/pdf-styles-{language}.css')
+ pdfkit.from_file(str(html_path), pdf_name, css=f'{css}/pdf-styles-{language}.css', options={"image-quality": 50})
print(f"PdfConversion(): Successfully converting {html_path} to {pdf_name}")
except Exception as e:
# Do not break with raising exceptions in case due to warnings