Patent attributes
Characteristics of a code are decided upon. For example, the geometry and how noisy the background of the barcode can be may be decided upon. A representation of the code based on the code's characteristics is automatically placed in a variety of trial locations, which are each tested to see if the current trial location is acceptable. In one embodiment, the representation of the code is slid across the document, and code may be placed in the first acceptable location found. For example, in one embodiment, if placing the code in the trial location results in obscuring foreground information, the location is determined to be unacceptable. In another embodiment, if the trial location obscures information that is critical to the purpose of the document, the location is determined to be unacceptable.