retext-project / retext

ReText: Simple but powerful editor for Markdown and reStructuredText
GNU General Public License v2.0
1.88k stars 196 forks source link

Use reasonable borders when printing #437

Open red-kite opened 5 years ago

red-kite commented 5 years ago

When printing a document, page-borders are 4.23mm for all page-sizes on my system and therefore far to small.

For comfort i currently use following shortened patch for printing on A4 mostly:

Subject: [PATCH] Add simple border to pagelayout

 ReText/window.py | 1 +
 1 file changed, 1 insertion(+)

                printer.setCreator('ReText %s' % app_version)
+               printer.setPageMargins(20.0, 25.0, 13.0, 25.0, QPrinter.Millimeter)
                if globalSettings.paperSize:
mitya57 commented 5 years ago

Just to make sure, you are using Qt WebKit renderer, right?

With QTextBrowser the borders should be fine, and with Qt WebEngine with my linked commit it should be fine too, just Qt WebKit still has this problem.

red-kite commented 5 years ago

Yes, using WebKit – mainly because Retext's preview does not use my css stylesheet otherwise.

Can confirm – borders in printPreview with WebEngine are looking nice, even stylesheet seems to be recognized there but looking horrible either.