Issue with Compression#3
Conversation
Added print_options to convert method
I figured it out; I had to swap "gs" to "gswin64c" to specify my executable install, and the 'c' specified headless mode. |
…ated options and changed the arguments to webdriver.Chrome().
Update for Selenium 4.10 compatibility
Windows bugfix
New Features and better resource handling
Fix selenium internal API changes
When I try to use the
compress=True,power=0or any other power, I get a 'can't find the file specified' error.File ~\mambaforge\envs\rss\Lib\site-packages\pyhtml2pdf\converter.py:40 in convert
__compress(result, target, power)
File ~\mambaforge\envs\rss\Lib\site-packages\pyhtml2pdf\compressor.py:50 in __compress
compress(tmp_file, target, power)
File ~\mambaforge\envs\rss\Lib\site-packages\pyhtml2pdf\compressor.py:33 in compress
subprocess.call(['gs', '-sDEVICE=pdfwrite', '-dCompatibilityLevel=1.4',
File ~\mambaforge\envs\rss\Lib\subprocess.py:389 in call
with Popen(*popenargs, **kwargs) as p:
File ~\mambaforge\envs\rss\Lib\site-packages\spyder_kernels\customize\spydercustomize.py:109 in init
super(SubprocessPopen, self).init(*args, **kwargs)
File ~\mambaforge\envs\rss\Lib\subprocess.py:1022 in init
self._execute_child(args, executable, preexec_fn, close_fds,
File ~\mambaforge\envs\rss\Lib\subprocess.py:1491 in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified