def ocr_buttons(r):
    """ Generate 'Print PDF' button in the view """

    if not current.deployment_settings.has_module("ocr"):
        return ""

    if r.component:
        urlargs = [r.id, r.component_name]

    else:
        urlargs = []

    f = r.function
    c = r.controller
    a = r.application

    T = current.T
    UPLOAD = T("Upload Scanned OCR Form")
    DOWNLOAD = T("Download OCR-able PDF Form")

    _style = "height:10px;float:right;padding:3px;"

    output = DIV(

        A(IMG(_src=a % "/%s/static/img/upload-ocr.png", _alt=UPLOAD),
          _id="upload-pdf-btn",
          _href=URL(c=c, f=f, args=urlargs + ["import.pdf"]),
          _title=UPLOAD,
          _style=_style),

        A(IMG(_src="/%s/static/img/download-ocr.png" % a, _alt=DOWNLOAD),
          _id="download-pdf-btn",
          _href=URL(c=c, f=f, args=urlargs + ["create.pdf"]),
          _title=DOWNLOAD,
          _style=_style),

        )
    return output

# END =========================================================================
dataset/ETHPy150Open sahana/eden/modules/s3db/ocr.py/ocr_buttons/swapped operands of `%`