The story so far... I'm printing customer material, such as estimates, invoices, appointments and so on, from a custom application programmed (by me) in Harbour (on a FreeBSD system), which is a clone of CA-Clipper and therefor similar to dBase.
At the moment I'm creating the 'forms' and the text in one go using HP PCL commands (so called Escape commands), sent to a text file and then direct to a laser printer. I'm finding this inflexible.
What I'd like to do is create the underlying form separately, then 'merge' the text from the Harbour application from the command line using modifications to the Harbour code. Then send the 'completed' form to the laser printer.
I'm struggling to find a straightforward way to do this.
I tried ImageMagick but found it didn't seem to have the ability I need in terms of merging an existing file, say a pdf file, with the text file produced by the application. I suppose I'm really looking for a system like the old word processor 'mail merge' systems, but just for a single output file. What other tools should I review?