Adding Padding to QR Codes

You can add padding (i.e., extra space) between a QR code's border and the QR code itself.

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 Padding 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 The button to change the stylesheet to the advanced view.. If the button displays The button to change the stylesheet to the simplified view. 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. (Optional) You can use the toggle button in the local toolbar to show properties below in a group view Stylesheet local toolbar button to show properties in a group view. or an alphabetical view Stylesheet local toolbar button to show properties in an alphabetical view..
  7. If you are using the group view, expand the Box group.
  8. Locate and select the padding property that you want to change. Each side (bottom, left, right, top) has separate properties that you can set (e.g., padding-top). If you plan to have the same settings for all four sides, you can simply use the padding property.
  9. The area to the right of the property is used for selecting and entering values. If you know how to enter the information correctly, you can click in the value field and type it directly. Otherwise, click the ellipsis button Display more options. to the right of the property. Depending on the type of property, the appropriate controls and options display, allowing you to choose or enter values (e.g., select from a drop-down list, click a button, complete fields in a dialog or popup). If you completed values in a popup, click OK at the bottom of the box.
  10. Click Save the active file. to save your work.

How to Use Local Formatting to Add Padding to QR Codes

  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 Borders & Margins tab.
  2. Set the options in the Padding section. Click in any of the individual fields (Left, Right, Top, Bottom) to specify the settings for the padding. In the left side of the field, enter a number for the amount of padding. In the right side of the field, select a unit of measurement (e.g., point, pixel, centimeter) for the number you entered. See Units of Measurement.

    If you click the down arrow to the right of all the fields, the settings will be applied to all of the padding fields. When you click that down arrow, a small popup displays.

  3. Click OK.
  4. Click Save the active file. to save your work.

What’s Noteworthy?

Note Different browsers may treat margin and padding settings differently. For example, Firefox honors padding settings more than it honors margin settings.