Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-09-2023, 05:39 PM   #16
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Ahh... Ok. I often lose track of which files the actual slot procedures can be found in. Those connect statements tend to be so vague!
DiapDealer is offline   Reply With Quote
Old 02-10-2023, 09:18 AM   #17
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
Okay there was a signal/slot connection inside the CodeViewEditor for its print slot that was not quite correct (needed identical type match not a type inherited from).

I just pushed the fix to master.

So print preview of the front open tab via the menu should work again in the next release.

Thank you everyone for your bug report and help in tracking this one down.
KevinH is offline   Reply With Quote
Old 02-10-2023, 10:48 AM   #18
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Will it print the background css colors as well? I added a dismissable warning to PageEdit's print feature so that people could fully understand that they could waste a ton of ink depending on the css. I used a WebEngine procedure to do it for PageEdit. Is Sigil's feature simpler?
DiapDealer is offline   Reply With Quote
Old 02-10-2023, 10:59 AM   #19
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
It just uses QPlainTextEdit print(QPrinter*) so on my screen when running "print preview" it just shows syntax coloured html source code of the current Tab on a white background for me.

This is much easier stuff than printing from a QtWebEngine webview which is what you do in PageEdit. We still need to fix that when printing Image Tabs and Audio Video tabs.

The current code only broke because how signals and slots changed in Qt over the years and, not because of QtWebEngine vs QtWebKit as far as I can tell.

Last edited by KevinH; 02-10-2023 at 11:03 AM.
KevinH is offline   Reply With Quote
Old 02-10-2023, 11:28 AM   #20
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
Just to test, I put my macOS into dark mode and fired up Sigil master and even though the CodeView tab showed white text on a black background (dark mode) when I hit Print Preview, it showed dark text on a light background in the PrintPreview dialog (suitable for printing on white paper) which makes sense.

So this appears to just work unlike trying to print the contents of a QtWebEnginePage.
KevinH is offline   Reply With Quote
Old 02-10-2023, 11:35 AM   #21
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
Just for the record, I used the Print Preview to print the CodeView tab from the pd Alice in Wonderland xhtml page and after previewing it, I was able to then print directly from that dialog and redirect it to a pdf (long a built in feature of the os Print dialog on a mac).

Here is what I get. If I change to dark mode, all that changes are the syntax highlighting colours, not the text. The text stays black on a white background.

So this all appears to work as desired at least on my mac.
Attached Files
File Type: pdf testing.pdf (39.8 KB, 156 views)
KevinH is offline   Reply With Quote
Old 02-10-2023, 12:32 PM   #22
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
Just for the record, I used the Print Preview to print the CodeView tab from the pd Alice in Wonderland xhtml page and after previewing it, I was able to then print directly from that dialog and redirect it to a pdf (long a built in feature of the os Print dialog on a mac).
Unfortunately, Print Preview used to print the contents of the Preview window not the Code View window. Here's a screenshot of the Sigil 0.9.6 Print Preview window:

Spoiler:
Doitsu is offline   Reply With Quote
Old 02-10-2023, 12:33 PM   #23
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,771
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by KevinH View Post
Just for the record, I used the Print Preview to print the CodeView tab from the pd Alice in Wonderland xhtml page and after previewing it, I was able to then print directly from that dialog and redirect it to a pdf (long a built in feature of the os Print dialog on a mac).

Here is what I get. If I change to dark mode, all that changes are the syntax highlighting colours, not the text. The text stays black on a white background.

So this all appears to work as desired at least on my mac.
Nice work! Thank you very much for enabling again the "PrintPreview" command.
RbnJrg is offline   Reply With Quote
Old 02-10-2023, 12:37 PM   #24
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Just for the record, I used the Print Preview to print the CodeView tab from the pd Alice in Wonderland xhtml page and after previewing it, I was able to then print directly from that dialog and redirect it to a pdf (long a built in feature of the os Print dialog on a mac).

Here is what I get. If I change to dark mode, all that changes are the syntax highlighting colours, not the text. The text stays black on a white background.

So this all appears to work as desired at least on my mac.
Got it. Good to know. I hadn't realized this was printing code view rather than the rendered text like the PageEdit version does. We modified that feature to make sure our injected dark mode stuff gets ignored, but there's no easy way to make the WebView-rendered stuff ignore css colors. So it will print those background/foreground colors that are specified in the css. Hence the warning. That feature shouldn't be hard to move to Sigil. It's basically two source files (.h + .cpp) and a MainWindow procedure (with a couple of global variables used).
DiapDealer is offline   Reply With Quote
Old 02-10-2023, 12:37 PM   #25
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,771
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Doitsu View Post
Unfortunately, Print Preview used to print the contents of the Preview window not the Code View window. Here's a screenshot of the Sigil 0.9.6 Print Preview window:

Spoiler:
But that feature now is in PageEdit, or am I in a mistake?
RbnJrg is offline   Reply With Quote
Old 02-10-2023, 12:38 PM   #26
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
@DiapDealer, when you get a free moment:

In order to properly print the contents of the PreviewWindow, and the Image tab and AV tabs, we really should bring your webviewprinter code over from PageEdit and put it into Sigil (maybe into Misc/ or ViewEditors/ or ...) so that we can fix the Print Preview and Print actions for the remaining Tab types and add it to the PreviewWindow as well (since the old BookView had that capability).

Thanks!

KevinH
KevinH is offline   Reply With Quote
Old 02-10-2023, 12:39 PM   #27
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
@DiapDealer, when you get a free moment:

In order to properly print the contents of the PreviewWindow, and the Image tab and AV tabs, we really should bring your webviewprinter code over from PageEdit and put it into Sigil (maybe into Misc/ or ViewEditors/ or ...) so that we can fix the Print Preview and Print actions for the remaining Tab types and add it to the PreviewWindow as well (since the old BookView had that capability).

Thanks!

KevinH
We cross-posted. Will do.
DiapDealer is offline   Reply With Quote
Old 02-10-2023, 12:40 PM   #28
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by RbnJrg View Post
But that feature now is in PageEdit, or am I in a mistake?
No. You're correct. Printing the rendered content can be done with PageEdit. Eventually Sigil too, I hope
DiapDealer is offline   Reply With Quote
Old 02-10-2023, 12:43 PM   #29
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
Yes, Print Preview in the old Sigil (0.9.8) would print the top tab, so it would print the code if in CodeView and print the rendered webkit view if the top tab was in BookView.

PageEdit does properly handle that now. But the ability to print the PreviewWindow directly in Sigil would be nice.
KevinH is offline   Reply With Quote
Old 02-10-2023, 12:48 PM   #30
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
Perhaps we add a Printer icon to the PreviewWindow lower icon bar to enable it printing? As printing from the PreviewWindow only makes sense when it is visible. Then the css swap in/out code code we added last time could be used to help control how things print.

Just a thought.

ps:

Also we need to be worried about mathjax and mathml and make sure to copy the contents of the current page source code from PreviewWindow to get mathml enabled properly.

To get that but skip the darkmode css that is injected might not be straightforward.

Last edited by KevinH; 02-10-2023 at 12:51 PM.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
table in reader doesn't look like preview in Sigil gib65 Sigil 11 11-15-2013 05:32 PM
Print Preview Problem townsend Sigil 3 05-11-2013 05:11 PM
preview vs print preview isalherbo Sigil 7 04-23-2013 03:52 PM
Print Preview problems illustrata Sigil 5 10-25-2011 02:50 PM
eBook viewer Print Preview settings not saved Agama Calibre 3 08-22-2010 08:04 PM


All times are GMT -4. The time now is 04:10 AM.


MobileRead.com is a privately owned, operated and funded community.