[Top][All Lists]

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

Re: One groff file outputting multiple pdfs?

From: Richard Morse
Subject: Re: One groff file outputting multiple pdfs?
Date: Thu, 19 Nov 2020 18:22:48 -0500

> On Nov 19, 2020, at 6:01 PM, Robert Thorsby <> wrote:
> On 20/11/20 09:32:03, Richard Morse wrote:
>> > On Nov 19, 2020, at 5:11 PM, Heinz-Jürgen Oertel <> 
>> > wrote:
>> > Can you use pdftk to split the groff output file file afterwards in pages?
>> Unfortunately each center’s invoice is a different, arbitrary, number of 
>> pages. The file internally knows when it becomes a new one, but that 
>> information is not fixed (there are listings of items, so sometimes a center 
>> could be one page, sometimes 5 (or any other number)).
>> This is why I was hoping that there is something internal to groff that 
>> would let me change the output file…
> Hi Richard,
> I suspect you are going about this the wrong way.  Why not interrogate your 
> database and then pass the data to your favourite text parsing program to 
> pipe it through groff to typeset your invoices?

Caveat that the data isn’t coming from a database but from a different set of 
invoices, that is what I’m doing… I have a perl program that parses the 50-odd 
HTML files, and builds up the roff file, combining the data into the 13 or so 

> Is there any reason why groff should be used only once, and not once for each 
> invoice?

Right now, it generates one output file, and that’s very useful for the people 
in my group reviewing things to make sure it is all correct. But when we submit 
it, it needs to be separated by center. For reasons having to do with how it is 
being run, it’s not clear to me that I can automate running groff, so right now 
I am manually running the groff command for each generation. Doing that for one 
file is fine, but doing it for all of them would be more annoying.

However, it sounds increasingly like this is not something that can be solved 
in groff, but rather I will have to explore modifying the rest of the process 
to handle this.


reply via email to

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