DivinumOfficium / divinum-officium

The Divinum Officium Project: Traditional Roman Missal and Breviary Texts
http://www.divinumofficium.com/
303 stars 192 forks source link

Use htmldoc to Produce Standalone pdf #2468

Open rl1234567890 opened 3 years ago

rl1234567890 commented 3 years ago

It seems to me that htmldoc produces better looking standalone office texts out of html than the present tools (i.e., epubgen2) It can do several formats, including pdf

htmldoc --webpage --charset utf-8 --embedfonts -f matins4-6-2021.pdf "https://www.divinumofficium.com/cgi-bin/horas/Pofficium.pl?date1=4-6-2021&command=prayMatutinum&version=Rubrics%201960&testmode=regular&lang2=English&votive="

and epub

htmldoc --webpage --charset utf-8 --embedfonts -f matins4-6-2021.epub "https://www.divinumofficium.com/cgi-bin/horas/Pofficium.pl?date1=4-6-2021&command=prayMatutinum&version=Rubrics%201960&testmode=regular&lang2=English&votive="

Would it be possible to modify epubgen2 or make a new script to produce standalone texts?

ajmalton commented 3 years ago

It does produce nice output.

It seems that htmldoc doesn't interpret tables very much and perhaps not CSS at all. Also no funky Unicode. I wonder if all that would constrain the future too much.

Tables: likely not.

CSS: maybe. It would mean that nothing essential could be left to the CSS in the future. (Liturgical) color? Relative font size?

Unicode: in your samples, what happens to the crosses and daggers ( ✠ and ☩ and ‡ ) after htmldoc?

rl1234567890 commented 3 years ago

Looking at the epub file for Compline of today, the ‡ cross is not represented correctly but as ✙ǽ ( ✙œ in the English). The other crosses, colors, and fonts look fine to me. Another thing that does not work correctly is the title: Ad Completoriumóóó í 7-30-2021 é

ajmalton commented 3 years ago

That from the existing generator or from htmldoc? Maybe the existing generator doesn't handle Unicode very well either...

rl1234567890 commented 3 years ago

From htmldoc. The existing generator does not distinguish between the crosses (at least when I look at the epub through calibre).

imjagpul commented 1 year ago

From htmldoc. The existing generator does not distinguish between the crosses (at least when I look at the epub through calibre).

epubgen2 intentionally uses + for all crosses, because some of the eBook readers were not able to display the ✠ and ☩ and ‡ symbols.

In case the distinction is important to anyone it would not be a problem to add another switch to produce the nicer characters (for the devices that can display them) it would be very simple adjustment.

rl1234567890 commented 1 year ago

From htmldoc. The existing generator does not distinguish between the crosses (at least when I look at the epub through calibre).

epubgen2 intentionally uses + for all crosses, because some of the eBook readers were not able to display the ✠ and ☩ and ‡ symbols.

In case the distinction is important to anyone it would not be a problem to add another switch to produce the nicer characters (for the devices that can display them) it would be very simple adjustment. I'd like to have that! Thanks!

mbab commented 1 year ago

FYI: Calibre ebook-convert provides decent pdf when converting output of https://mbab1.gitlab.io/divinumofficium.epub/