![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,777
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
PageEdit new feature...
Would it be possible to add the command "Print..." to the "File" menu?
Sigil has that command but prints the source code of the xhtml file. In some cases, I'd like to print the output of one xhtml file (and not its source code) and with PageEdit so far I can't do it. Thanks in advance. Rubén Last edited by RbnJrg; 01-25-2021 at 02:08 PM. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,577
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I don't think it would be too difficult (famous last words!). I can take a stab at this.
|
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,777
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
![]() |
![]() |
![]() |
#4 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,736
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Sometimes proofreading needs every page to be visible, e.g. spread out on a table. What I've been doing is using calibre to convert the Book to DOCX, and then print the Chapter from Word. BR |
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,577
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Well it's not at all as simple as WebKit's view()->print(), but it's not impossible either.
One thing to keep in mind is that QWebEnginePage::print() first renders the page into a temporary PDF and then prints that. Which means that everything will be printed exactly as it's seen on your screen. That includes light text on a dark background if someone happens to have the "Make PageEdit simulate a dark appearance in Dark Mode" option checked in PageEdit's preferences. So while I have a working proof of concept, I'm probably going to put a few guardrails on this thing so people can choose whether or not they really, really, really want to empty their black ink cartridge when printing under certain conditions! |
![]() |
![]() |
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
![]() Horrible, and I'll never make that mistake again! LibreOffice 7 has a few checkboxes: The two key settings being "Page Background" and "Print text in black". |
|
![]() |
![]() |
![]() |
#7 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,288
Karma: 169098402
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Would it be easier to have the print function do a print to PDF and then have the user do the physical print from a PDF viewer? I often find doing that an easier way to print a range of pages instead of the whole document.
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,777
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
With the "Print..." command you can do also that if you has, for example, a program like pdfFactory (that allows you to print with a major quality that the Print as pdf command). And with the Windows print dialog, you can disable the printing of the background graphics. Lastly, we can "tweak" (disable) temporally in Sigil (before sending the xhtml file to PageEdit) any css code that would be able to generate some troubles when printing under certain conditions!
|
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,577
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm not seeing much ability to change the pdf that's being generated/printed by QPrinter (other than margins, orientation and such), I'm afraid. What is is seen is what will be printed.
I think I'd rather leave this up to the user. If they have need of such granularity, they can always choose to "print" to a file using any configured PDF printer. The built-in QWebEnginePage::printToPdf() function has its own quirks that I'd like to avoid. |
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,577
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
This has been incorporated into the new PageEdit 1.5.0 release. Please give it a try and see what you think. None of Sigil's own dark mode features will print, but it's still going to print whatever is specified in the ebook's css. So there's a dismissable warning to be certain to note that the subsequent print preview will show you exactly what IS going to print. From there you can change margins, and print to any configured printer (including a PDF printer).
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PageEdit 1.40 | pete6055 | Sigil | 9 | 02-08-2021 12:07 PM |
PageEdit-1.4.0 Released | DiapDealer | Sigil | 1 | 11-13-2020 01:00 PM |
PageEdit-1.3.0 Released | DiapDealer | Sigil | 26 | 08-19-2020 04:22 PM |
PageEdit alternative? | ghmerrill | Sigil | 74 | 12-21-2019 09:08 AM |
PageEdit-0.9.5 Released | DiapDealer | Sigil | 46 | 10-26-2019 06:55 PM |