-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't convert Page url to Pdf on Linux #180
Comments
Yeah actually I think we are facing the same issue right now. Using Convert works on Windows but returns empty bytes on Linux |
ok, I've used this package and it's working correctly on linux machine: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: