Adding Backgrounds to QR Codes

You can add background settings to a QR code. This includes the ability to specify a color, image, and a repeating pattern for the background image. Normally you would not see a QR code's background, but if you give the QR code a certain amount of padding, you would see the background around the edges of it.

This can be done through styles or by using local formatting. Using styles is usually recommended because the setting is automatically applied to any content using that style throughout the project, whereas local formatting affects only the particular content that you are working on.

How to Use a Style to Add a Background to QR Codes

  1. From the Content Explorer, open the stylesheet that you want to modify.
  2. In the local toolbar, make sure the first button displays Advanced View button. If the button displays Simplified View button instead, then click it.
  3. In the upper-left corner of the editor, click in the drop-down field and select .
  4. Select the MadCap|qrCode style.
  5. From the Show drop-down list on the upper-right side of the editor, select Show drop-down set to display all properties in styles..
  6. If you are using the grouped view, expand the Background group.
  7. Locate the background property that you want to change.

    To Set a Color for the Background

    To the right of background-color, click Display more options. and select a color. For advanced color options, click and use the fields in the Color Picker dialog, or click to select a color already used elsewhere on your screen. You can use the Color Picker to select a CSS variable.

    To Add an Image to the Background

    1. To the right of background-image, click Display more options.. The Insert Image dialog opens.
    2. Select an image file to insert. You can do this in one of the following ways.

      • Select an image already in the project by finding and selecting it in the built-in tree.
      • Click The browse ellipsis button opens to more options. to find and select an image file outside of the project.

      Note If you want to select an image file recently inserted into your project, click the down arrow in the field next to the The browse ellipsis button opens to more options. button, and select the file from the list.

    3. If you want the background image to repeat, click Display more options. to the right of background-repeat and select one of the options from the drop-down (definitions from http://www.w3.org).
      • no-repeat The image is not repeated: only one copy of the image is drawn.
      • repeat The image is repeated both horizontally and vertically.
      • repeat-x The image is repeated horizontally only.
      • repeat-y The image is repeated vertically only.
  8. Click Save the active file. to save your work.

How to Use Local Formatting to Add a Background to a QR Code

  1. Open the content file.
  2. Right-click on the QR code.
  3. From the drop-down list, select Edit QR Code. The Edit QR Code dialog opens.
  1. Select the Background tab.
  2. Use the tab to specify the settings that you want for the background.

    To set a color for the background

    • In the Color field, click the down arrow and select a color from the popup. For advanced color options, select More Colors and use the fields in the Color Picker dialog.

    To add an image to the background

    1. Next to the Image field, click the Browse button.

      The Insert Image dialog opens.

    2. Select an image file to insert. You can do this in one of the following ways.
      • Select an image already in the project by finding and selecting it in the built-in tree.
      • Click The browse ellipsis button opens to more options. to find and select an image file outside of the project.

      Note If you want to select an image file recently inserted into your project, click the down arrow in the field next to the The browse ellipsis button opens to more options. button, and select the file from the list.

    3. If you want the background image to repeat, select one of the options from the Repeat field. You can also set the image position horizontally and vertically by using the X and Y fields.
    4. Click OK.
  3. In the other dialog, click OK.
  4. Click Save the active file. to save your work.