$(document).ready(function() { // pdf容器contenterPdf var contenterPdf = $("#contenterPdf") var baseX = contenterPdf.offset().left var baseY = contenterPdf.offset().top // 每一页pdf var page_cell = contenterPdf.find(".page_cell") // pdf数据 var pdfData = { "stdPoints":[], "titleInfo":{}, "studentInfo":[], "studentNo":[], "noteInfo":[], "barCodeInfo":[], "missExamInfo":[], "objectiveQues":[] } Array.from(page_cell).forEach((item) => { console.log(item) // 标准点 var std_points = $(".stdPoints") for(var i=0;i{ let tmid = $(item).find(".page_cell_tm_id").eq(0); let tmoptions = $(item).find(".page_cell_tm_id"); pointList.push({ x:tmid.offset().left-baseX, y:tmid.offset().top-baseY, w:tmid.width(), h:tmid.height(), type:"text", text:tmid.text() }) for(var i=0;i