Bar codes and QR codes in a document, and down the side of every page
A QR code that opens your website, an EAN-13 for a product list, and a bar code down the side of every page of a contract or a delivery note that says which document and which page it is.
Offices scan paper. A delivery note is checked in at the counter with a scanner, a signed contract is filed by its number, a stock list carries the shop codes of its goods, and a poster has a QR code to open a website. Scriptorium draws all of these itself, as sharp drawings that print and scan, with nothing to install and no website to visit.
A bar code in the writing
On the Insert tab, press Bar code. Choose the kind, type what it should say, and the box draws the code as you type, or says what is wrong when it cannot be made.

| Kind | Use it for |
|---|---|
| Code 128 | Letters, digits and signs, such as a document number. |
| QR code | Anything at all, in any language: a web address, a phone number, a few lines of text. |
| EAN-13, EAN-8 and UPC-A | The digits of shop goods. Leave out the check digit and it is worked out; type it and it is checked. |
| Code 39 | Older scanners that read nothing else. |
The words can show under the code or not; it can be small, medium or large, at the left, in the middle or at the right, with a caption. Double-click a code to change it, and Delete takes it away. Like a picture, it has the Layout options, so it can stand beside the words or be fixed in a corner of the page.
A bar code down the side of every page
For a document of many pages, a code on each page says which document and which page it is, so a scanned or dropped stack can be put back in order. Open Page setup (at the foot of Design ▸ Margins, or in the print preview) and tick Bar code on each page.

The words of the code can say something different on every page. A list beside them fills in ready-made words, or you type your own with these names in braces:
| Name | What it says |
|---|---|
{page} and {pages} | The page number, and how many pages there are. |
{title} | The document’s whole title, or its first heading. |
{word} | The first word of the title. |
{date} and {file} | Today’s date, and the document’s name. |
{docno} or any other name | That line of the document’s front matter. |
So with docno: DN-2026-0417 at the top of the document and {docno}-P{page} in the box, page 3 says DN-2026-0417-P3. Put the code down the left or the right side, turned to read along it, or at a corner of the top or the foot, as Code 128, Code 39 or a QR code. A margin too narrow to hold it grows on that side.
The words belong to the document, like a header; the kind and the place are kept for every document. The codes show in the Pages view and the print preview, on paper and in the PDF, inside a page border if there is one.
Sharp, and scanned
Every code is drawn as a drawing, black on white with the quiet space each kind needs, so it prints sharp at any size. Each kind was read back by an independent scanner at screen size and at 300 dpi, upright and turned. The PDF, the web page and the e-book get the drawing, and Word, OpenDocument and RTF a picture of it.
In the Markdown a bar code is a few lines, saved, copied and undone as text:
~~~barcode
type: ean13
value: 6001234567899
caption: Garden hose, 20 m
~~~


