var printState = 0,LODOP = perCerPrintUtil.getLodop();
        LODOP.PRINT_INITA("-2.38mm", -7, "169.99mm", "144.99mm", "北京保安员证书打印V3.5.1");
        LODOP.SET_PRINT_MODE("PRINT_NOCOLLATE", 1);
        LODOP.ADD_PRINT_SETUP_BKIMG("<img border='0' src='" + restHost + securityPic + "'+>");
        LODOP.SET_SHOW_MODE("BKIMG_LEFT", -50);
        LODOP.SET_SHOW_MODE("BKIMG_TOP", -50);
        LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "205.32mm");
        LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "144.99mm");
        LODOP.SET_SHOW_MODE("BKIMG_PRINT", true);
        //照片
        if (detail.photo) {
            LODOP.ADD_PRINT_IMAGE(30, 104, "26.01mm", "31.99mm", detail.photo);//+1
            LODOP.SET_PRINT_STYLEA(0, "Stretch", 2);
        } else {
            LODOP.ADD_PRINT_IMAGE(30, 104, "26.01mm", "31.99mm", "");//+1
            LODOP.SET_PRINT_STYLEA(0, "Stretch", 2);
        }
        //二维码50
        LODOP.ADD_PRINT_IMAGE(91, 501, 116, 111, detail.qrcode);

        LODOP.SET_PRINT_STYLEA(0, "Stretch", 2);
        //姓名
        LODOP.ADD_PRINT_TEXT(193, 109, 133, 20, detail.xm);
        LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
        // LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
        //地址
        LODOP.ADD_PRINT_TEXT(300, 110, 171, 56, detail.address == null ? '' : detail.address.substring(0, 9) + "\r\n" + detail.address.substring(9, detail.address.length));
        LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
        //  LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
        LODOP.SET_PRINT_STYLEA(0, "LineSpacing", 3);
        //民族
        LODOP.ADD_PRINT_TEXT(227, 110, 163, 20, detail.nation);
        LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
        //LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
        LODOP.SET_PRINT_STYLEA(0, "LetterSpacing", -1);
        //出生日期
        LODOP.ADD_PRINT_TEXT(266, 110, 163, 20, changeBirthFormat(getBirthdayFromIDNo(detail.idnum)));
        LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
        //LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
        LODOP.SET_PRINT_STYLEA(0, "LetterSpacing", -1);
        //身份证号
        LODOP.ADD_PRINT_TEXT(391, 111, 163, 20, detail.idnum);
        LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
        //LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
        LODOP.SET_PRINT_STYLEA(0, "LetterSpacing", -1);

        //发证日期
        LODOP.ADD_PRINT_TEXT(325, 461, 200, 20, (detail.fzrq == null ? "" : changeBirthFormatFZRQBJ(detail.fzrq.substring(0, 10))));
        LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
        // LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
        LODOP.SET_PRINT_STYLEA(0, "LetterSpacing", -1);
        //编号
        LODOP.ADD_PRINT_TEXT(383, 496, 186, 20, detail.zsbh.replace("京", ""));
        LODOP.SET_PRINT_STYLEA(0, "FontSize", 16);
        // LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
        LODOP.SET_PRINT_STYLEA(0, "LetterSpacing", -2);
        //姓名
        LODOP.ADD_PRINT_TEXT(34, 432, 75, 20, detail.xm);
        // LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
        LODOP.SET_PRINT_STYLEA(0, "FontSize", 16);
        //谷歌浏览器
        if (LODOP.CVERSION) {
            CLODOP.On_Return = function (TaskID, Value) {
                //打印状态
                printState = Value;
                if(printState >= 1) {
                    perCerPrintUtil.updatePrinted(detail.securitypersonid, detail.snapshotId);
                    //查询刷新
                    setTimeout("refresh();", 1000);
                    setTimeout("layer.closeAll();", 1500);
                }
            };
        }
        //打印维护
        printState = LODOP.PRINT_SETUP();