'JupyterLab pdf conversion settings?

Conversion from JupyterLab Notebook to a pdf file works from the menu as expected. However, the pdf-file has some extra line changes and it also displays extra symbols in the places where the additional line changes have been made. I did not find any kind of settings for pdf (or other) conversion. There seems to be incompatibility between JupyterLab Notebook resolution and pdf resolution. In JupyterLab the codes fit nicely to their rows, but in the pdf they have been split extra times as can be seen from these two example pictures.

enter image description here

enter image description here

Is this something I just have to live with or can it be fixed? I use Linux (Pop OS).



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source