groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [groff] Groff & tbl as a report generator


From: Larry Kollar
Subject: Re: [groff] Groff & tbl as a report generator
Date: Sun, 29 Jul 2018 23:30:45 -0400

Blake McBride <address@hidden> wrote:

> Thanks.  I've seen a tool or two that converts HTML to PDF in the past but
> I immediately shied away from them for the following reasons.
> 
> 1. I figured HTML was just too loosey-goosey with the layout.  I wanted
> better control.
> 
> 2.  I figured HTML didn't deal with paging and repeating page headers,
> column titles, and page numbers on each page.
> 
> Am I wrong?
> 
> I have to say, groff/tbl fits the bill well.

If you’re yanking stuff out of a database, or even a CSV file, it’s pretty
easy to use awk or perl (or Python or Ruby, for that matter) to massage
*roff markup into it. But it you’re starting from HTML, it might be easier
to skip a conversion step.

For HTML with simple formatting requirements (like fiction), or with a good
print-oriented CSS linked in, something like wkhtmltopdf works OK. Just
remember to use the —print-media-type option if your CSS uses it. Seems
like its CSS support was pretty limited last time I tried, but that was several
years ago and I don’t think it was actively supported then. It is now, so I
ought to try it again.

There are commercial offerings (Prince and Antenna House come to mind),
but they’re very pricey. You could check out Oxygen PDF Chemistry, free
as in beer for now.

https://www.oxygenxml.com/chemistry.html

I think I’ve mentioned my HTML to XSL:FO transform. It’s meant to format
fiction that comes out of Scrivener via Multimarkdown, and populates the
headers, footers, and title page from <meta> elements in the HTML. It works
fine as long as I remember to add the metadata in Scrivener!

        Larry


reply via email to

[Prev in Thread] Current Thread [Next in Thread]