Fetching contributors…
Cannot retrieve contributors at this time
48 lines (25 sloc) 2.07 KB
Monolithic Flavours
The monolithic `` file provides Barcode Writer in Pure PostScript as generic PostScript Level 2 named resources shipped in a single file for ease of inclusion within the Prolog section of a PostScript document template or for installing into a printer's initial job VM.
Prepared tarballs of BWIPP packages into the monolithic flavours are available from with filenames such as `postscriptbarcode-monolithic` and `postscriptbarcode-monolithic-package`. Alternatively you can build these flavours from source with `make monolithic` or `make monolithic_package`.
Inclusion Within the Prolog Section of a Document
An application will first include the contents of `` in the Prolog section of a PostScript file and then generate code like the following.
In the file's `Setup` or `PageSetup` section:
/qrcode dup / findresource def
and in the page description where a barcode is needed:
0 0 moveto (BWIPP) (eclevel=M) qrcode
If the application needs to import the resource under a different name to avoid a conflict, then the setup could be:
/foo /qrcode / findresource def
followed by:
0 0 moveto (BWIPP1) (eclevel=M) foo
0 0 moveto (BWIPP2) (eclevel=M) foo
(The above is analogous to `from import qrcode as foo` in other languages.)
Or, to generate a few barcodes with no setup section or local name at all:
0 0 moveto (BWIPP) (eclevel=M) /qrcode / findresource exec
This technique also reduces the possibility of namespace collision when using the library's procedures with other code.
Installing to a Printer Initial Job VM
Send to the printer with the line `true () startjob` added at the top where the parentheses contain the printer's `startjob` password.
The named resources will remain available between jobs but will not persist accoss power cycles.