Re: [groff] Alignment problems in pic drawing when using \X'ps: exec

2018-07-24 Thread Jennifer Sayers
Dear Everyone, Thank you very much for diagnosing my problem and solving it!  I had spent several hours trying to figure out what was going wrong.  Now I see in the pic manual that "command" outputs a *line*, which of course has an end of line character, causing the shift down the page, as has

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

2018-07-24 Thread Robert Thorsby
On 25/07/18 04:57:13, James K. Lowden wrote: On Tue, 24 Jul 2018 12:26:57 -0500 Blake McBride wrote: > Then, a few years ago, I thought of generating groff/tbl input > instead and then calling those tools to generate the final PDF output. You're not the only one. https://github.com/jklowde

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

2018-07-24 Thread John Gardner
*> Thanks! I think for what I am doing, groff/tbl is a simpler solution.* Oh I wasn't suggesting wkhtmltopdf as any alternative to groff (hell, I prefer *roff over anything else for preparing PDF documents). Merely as a good tool for decent HTML to PDF conversion (because there's a lot of crappy

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

2018-07-24 Thread Blake McBride
Thanks! I think for what I am doing, groff/tbl is a simpler solution. On Tue, Jul 24, 2018 at 4:45 PM John Gardner wrote: > Use wkhtmltopdf if you need a graphics-intensive output (such as > background images, colour fills and client logos embedded beside each table > record). This was the form

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

2018-07-24 Thread Damian McGuckin
I used *roff ages ago for creating invoices and accounting reports driven by a timesheeting/debtors system which was built over an SQL database. It worked really well. groff pulled in Postscript templates which contained logos and colored stuff for nice looking pages. Regards - Damian Pa

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

2018-07-24 Thread John Gardner
Use wkhtmltopdf if you need a graphics-intensive output (such as background images, colour fills and client logos embedded beside each table record). This was the format an agency I worked at required be churned out fast, and it had to match what was presented by the webapp. Thankfully the HTML/CSS

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

2018-07-24 Thread James K. Lowden
On Tue, 24 Jul 2018 12:26:57 -0500 Blake McBride wrote: > Then, a few years ago, I thought of generating groff/tbl input > instead and then calling those tools to generate the final PDF output. You're not the only one. https://github.com/jklowden/sqlrpt I wrote it last year to make my use of S

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

2018-07-24 Thread Blake McBride
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, c

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

2018-07-24 Thread John Gardner
Hi Blake, great to hear! Always nice to hear another Troff success story. =) I know the feeling about finding decent PDF converters. The best one I know of is wkhtmltopdf , which uses WebKit's rendering engine to convert an HTML/CSS-enriched webpage into a correctly-laye

[groff] Groff & tbl as a report generator

2018-07-24 Thread Blake McBride
A few years ago I thought of a really, really good use for groff and tbl. Thought I'd share. I write (web-based) business applications. Often I have to generate reports which largely mean PDF files. In the past, I used some open-source PDF generation utilities. They worked, but what a nightmare

Re: [groff] Printing landscape with mm

2018-07-24 Thread Blake McBride
Thanks, Ralph!! On Tue, Jul 24, 2018 at 10:56 AM Ralph Corderoy wrote: > Hi Blake, > > > at the beginning of my document I am doing: > > > > .pl 8.5i > > groff_mm(7) talks of `.PGFORM'. > > printf '%s\n' '.PGFORM 9i 8.5i 1i' ".PF 'left'centre'right'" `seq > 3000` | > groff -mm -Tpdf -P-l

Re: [groff] Printing landscape with mm

2018-07-24 Thread Ralph Corderoy
Hi Blake, > at the beginning of my document I am doing: > > .pl 8.5i groff_mm(7) talks of `.PGFORM'. printf '%s\n' '.PGFORM 9i 8.5i 1i' ".PF 'left'centre'right'" `seq 3000` | groff -mm -Tpdf -P-l -P-pletter >foo.pdf You'll see page one's header is centred on the old page width compared

[groff] Printing landscape with mm

2018-07-24 Thread Blake McBride
Greetings, Having a bit of a hard time printing mm docs in landscape. I am printing using gropdf using the following options: -pletter -l then, at the beginning of my document I am doing: .pl 8.5i The problem I am having is that I can't get the footer to work. I'm using: .PF "''Page nP'

Re: [groff] Alignment problems in pic drawing when using \X'ps: exec

2018-07-24 Thread Ralph Corderoy
Hi Russ, > I already found documented I can't see how \c is any kind of a > solution where the grops man page that's effectively being called by > the X command states: This isn't specific to grops or the use of `ps:' in the `\X' escape. $ cat ralph.tr .PS command "foo bar" linet

Re: [groff] Alignment problems in pic drawing when using \X'ps: exec

2018-07-24 Thread Russell Hyer
Hi Ralph, Thanks for that input, but as I already found documented I can't see how \c is any kind of a solution where the grops man page that's effectively being called by the X command states: "grops man page where it states: " \X'ps: exec code' This executes the arbitrary

Re: [groff] Alignment problems in pic drawing when using \X'ps: exec

2018-07-24 Thread Ralph Corderoy
Hi Jen, > I have boiled down my problem to the following short example: Thanks. $ cat jen.tr .PS #command "\X'ps: exec 0 setlinecap'" linethick = 2 line right 1 move right 0.5 #command "\X'ps: exec 1 setlinecap'" line right 2 .PE $ > The tail of the Post