To use the monolithic barcode resources in a PostScript file, include the contents of barcode.ps in the Prolog section. You can then access specific barcode resources (like qrcode) using one of the following patterns:
1. Standard Setup
Define the resource in the Setup or PageSetup section using its full name, then call it by its short name.
2. Avoiding Name Conflicts (Aliasing)
If you need to avoid namespace collisions, map the resource to a local name. This is analogous to from uk.co.terryburton.bwipp import qrcode as foo.
3. Direct Execution (No Setup)
For a quick implementation without a setup section or local names, you can find and execute the resource directly in the page description. This technique also reduces the possibility of namespace collision.
// 1. Standard Setup
/qrcode dup /uk.co.terryburton.bwipp findresource def
0 0 moveto (BWIPP) (eclevel=M) qrcode
// 2. Aliasing to avoid conflicts
/foo /qrcode /uk.co.terryburton.bwipp findresource def
0 0 moveto (BWIPP1) (eclevel=M) foo
0 0 moveto (BWIPP2) (eclevel=M) foo
// 3. Direct Execution (No setup section)
0 0 moveto (BWIPP) (eclevel=M) /qrcode /uk.co.terryburton.bwipp findresource exec