You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've corrected the configuration of Dockerfile and it's working correctly on Linux (don't have a problem with dependencies). But when I want to use the Convert method from DinkToPdf, it always returns an empty byte[] on Linux. (on Windows there return some bytes).
A similar problem was described here: https://stackoverflow.com/questions/72901484/dinktopdf-converter-returns-empty-byte-array-on-ubuntu
If I am using ObjectSettings.Page = url from the page, there is this problem. Otherwise, if I am using ObjectSettings.HtmlContent = some content(string), then will generate correctly. This is only on Linux behavior. On Windows, both settings work properly.
My code: var document = new HtmlToPdfDocument { GlobalSettings = { ColorMode = ColorMode.Color, Orientation = model.IsLandscape ? Orientation.Landscape : Orientation.Portrait, PaperSize = PaperKind.A4Plus, Margins = new MarginSettings { Bottom = MarginTopBottom, Left = MarginLeftRight, Right = MarginLeftRight, Top = MarginTopBottom, Unit = Unit.Millimeters } }, Objects = { new ObjectSettings { PagesCount = true, WebSettings = { DefaultEncoding = "utf-8" } Page = model.HtmlUrl } } };
I've corrected the configuration of Dockerfile and it's working correctly on Linux (don't have a problem with dependencies). But when I want to use the
Convert
method from DinkToPdf, it always returns an empty byte[] on Linux. (on Windows there return some bytes).A similar problem was described here:
https://stackoverflow.com/questions/72901484/dinktopdf-converter-returns-empty-byte-array-on-ubuntu
If I am using
ObjectSettings.Page
= url from the page, there is this problem. Otherwise, if I am usingObjectSettings.HtmlContent
= some content(string), then will generate correctly. This is only on Linux behavior. On Windows, both settings work properly.My code:
var document = new HtmlToPdfDocument { GlobalSettings = { ColorMode = ColorMode.Color, Orientation = model.IsLandscape ? Orientation.Landscape : Orientation.Portrait, PaperSize = PaperKind.A4Plus, Margins = new MarginSettings { Bottom = MarginTopBottom, Left = MarginLeftRight, Right = MarginLeftRight, Top = MarginTopBottom, Unit = Unit.Millimeters } }, Objects = { new ObjectSettings { PagesCount = true, WebSettings = { DefaultEncoding = "utf-8" } Page = model.HtmlUrl } } };
Some logs during invoke
Convert
method:QSslSocket: cannot resolve CRYPTO_num_locks
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
QSslSocket: cannot resolve sk_free
QSslSocket: cannot resolve sk_num
QSslSocket: cannot resolve sk_pop_free
QSslSocket: cannot resolve sk_value
QSslSocket: cannot resolve SSL_library_init
QSslSocket: cannot resolve SSL_load_error_strings
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv23_client_method
QSslSocket: cannot resolve SSLv3_server_method
QSslSocket: cannot resolve SSLv23_server_method
QSslSocket: cannot resolve X509_STORE_CTX_get_chain
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
Does somebody have the same problem only on Linux and for urlPage?
Thanks a lot!
The text was updated successfully, but these errors were encountered: