Open nicolasr75 opened 1 week ago
Didn't I add a parameter that you can use to select if you want to use chrome or edge?
Uhm ... seems I forgot that :-) --> https://github.com/Sicos1977/ChromiumHtmlToPdf/blob/master/ChromiumHtmlToPdfConsole/Options.cs
I will try to add an option this weekend and release a new console app, did not even know that there are people like you that use the console app. Most questions I always got was about the library itself :-)
private static void Convert(Options options)
{
var stopWatch = Stopwatch.StartNew();
var pageSettings = GetPageSettings(options);
using var converter = new Converter(options.ChromiumLocation, options.ChromiumUserProfile, _logger, browser: Browser.Edge);
SetConverterSettings(converter, options);
...
This is the code that I am seeing. Do you mean the ChromiumLocation? The thing is that it is very handy to let CHTP search for the browser instead of me having to find out the location myself ;-)
I will try to add an option this weekend and release a new console app, did not even know that there are people like you that use the console app. Most questions I always got was about the library itself :-)
Thanks! Yes, we thought about using the lib but to avoid issues because of the different release cycles of CHTP, .NET and ourselves we decided to use it standalone which worked quite well in recent years. I have even published it self-contained today to be independent of any .NET installation. Hard disk space is available so this saves me some trouble.
I noticed with the newest version of ChromiumHtmlToPdfConsole that it doesn't work for me on Linux anymore.
The call to the Converter lib in
private static void Convert(Options options)
hardcodes the browser parameter as Browser.Edge. But I have Chromium installed on my Debian. The lib therefore tries to find Edge, fails and aborts with the message:Could not find Microsoft Edge in location ''
I solved the problem by rebuilding with Browser.Chrome as the default value. Do you think there is a better solution?
Some ideas: