Report Manager
ENES

← All articles

How do you print on the bank's pre-printed form so each field lands in its box?

· Toni Martir, arquitecto de software

At the end of the month, the business software prints the promissory notes (pagarés, the Spanish payment instrument) for the suppliers on sheets that already carry the form: the top is left for the invoice or a letter, and the note sits at the bottom right, separated from it by a perforated line. The template, the report that fills in the sheet, has to put each field in its box.

You get there with the scanned form as the background, at its real size and never printed, and with each field measured from the edge of the sheet.

The promissory note of an invented bank, Banco de Ejemplo, as the template's background in the Report Manager designer, with the dot grid on top. On the due date boxes sit the day, month and year fields; on the EUR box, NOTES.AMOUNT; on the line marked A, NOTES.SUPPLIER; on the EUROS line, NUMTOTEXT(NOTES.AMOUNT, FALSE); and on the place and date line, Barcelona and the day, month and year fields in words. Below, the line of magnetic characters is left clear.
The sample's promissory note in the Report Manager designer, at 200%: the scanned form as the background and, on top of it, each field on its box or its dotted line. The bank, the account and the numbers are invented.

The background, at its real size

A scan is pixels, and its size on paper depends on the resolution, in dots per inch (dpi). An A4 sheet scanned at 150 dpi gives 1,240 × 1,754 pixels, which is 210 × 297 millimetres only if the template also uses 150 dpi. At 200, the background shrinks to three quarters, and the sample's amount, placed on its box, prints six centimetres too high.

So you scan at 100% and give the template the same resolution. And its margins go to zero, because the scan starts at the edge of the paper, which every position is measured from.

What the banks' standard sets out

In 2001, Spain's financial institutions agreed a common standard for promissory notes, booklet 56 from their associations, AEB, CECA and UNACC. The note measures 175 × 80 millimetres, give or take two, and its lines are spaced in sixths of an inch, 4.23 millimetres. Attached to an invoice wider than itself, it goes at the bottom right, separated by a perforation. The booklet's model says what goes where:

The standard promissory note: where the template writes

The bank, the account and the note's number At the top, the bank, the branch, the Spanish account code (CCC) and the IBAN; at the bottom, the number
pre-printed
Due date and amount in figures Each in its own space, on the same line
written by the template
Payee, amount in words, place and date On dotted lines; the place and date in words
written by the template
Magnetic band The bottom 15 mm, along the whole length of the note, for the CMC-7 characters
nothing from the template

From the model in booklet 56, July 2001. CMC-7 characters are the ones the banks' machines read.

The background stays off the paper, and you test on paper

The scan is a guide and it isn't printed, or the sheet would carry the form twice. It shows while you design, and in the preview if you like.

The sample's note, filled in, in the preview.

Only the data goes onto the paper: the sheet already carries the form.

You test with the first note on plain paper, laid over a blank form and held up to the light. If every field is off by the same amount, you move the whole page, not field by field, as I explained in the article on labels that don't line up. And if the sheet comes from a PDF, you print it at actual size.

So how do you print on it?

With the scanned form as the background, at the resolution of the scan and never printed; with each field measured from the edge of the sheet, on its box and clear of the magnetic band; and testing first on plain paper.


In Report Manager, a section's background image has its own resolution in dpi and a style: designer only, preview as well, or printed. The pre-printed forms guide asks for the scanner's resolution and zero margins. That is how the "Promissory notes (pre-printed form)" sample in the screenshots is built. It writes the amount in words with NumToText, and the words are what prevails over the figures (that article also covers NumToText's slips with accents). In my test, with the preview style, the PDF from printreptopdf, in the Delphi engine, left the form out, and the PDF from the .NET engine included it: if the note is printed from a PDF, the safe style is designer only. Report Manager also prints notes on continuous paper, 3 inches × 175 mm under the standard, on dot matrix printers at full speed, with a text driver: text only, without the graphics that crawl on an impact printer. An option in the Edit menu rounds section heights to multiples of 1/6 inch, the dot matrix line, so the strip of notes stays in register.

Sources

Toni Martir, arquitecto de software · · sources checked on