Blame view

PDFUtil.java 104 KB
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
package com.subsidy.util;

import com.itextpdf.text.*;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
import com.subsidy.common.exception.HttpException;
import com.subsidy.model.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Slf4j
@Component
public class PDFUtil {

    static BaseFont baseFont;

    {
        try {
            baseFont = BaseFont.createFont("https://zhongzhi-cms.oss-cn-shanghai.aliyuncs.com/STSONG.TTF", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

涂亚平 committed
39
    public static void createTeach(ProjectDO projectDO1, MatchDictDO matchDictDO, TeacherDO teacherDO, List<ProjectMembersDO> projectMembersDOS, CollegesDictDO collegesDictDO) {
涂亚平 committed
40 41
        try {
            ByteArrayOutputStream bao = new ByteArrayOutputStream();
涂亚平 committed
42
            Document document = new Document(PageSize.A4, 20f, 20f, 20, 20);
涂亚平 committed
43 44 45 46 47 48
            PdfWriter.getInstance(document, bao);
            document.open();

            document.add(new Paragraph(" \n"));
            document.add(new Paragraph(" \n"));

涂亚平 committed
49
            Paragraph p1 = new Paragraph(matchDictDO.getMatchName()+"报名表(教学赛道)", new Font(baseFont, 20, Font.BOLD));
涂亚平 committed
50 51 52 53 54 55 56 57
            p1.setAlignment(Element.ALIGN_CENTER);
            document.add(p1);
            document.add(new Paragraph(" \n"));
            document.add(new Paragraph(" \n"));

            PdfPTable table = new PdfPTable(13);
            PDFUtil.tableStyle(new PdfPTable(13), new int[13]);
            PdfPCell cell;
涂亚平 committed
58 59 60 61 62 63 64 65 66 67 68 69 70
            table.setWidthPercentage(90);

            Paragraph t1 = new Paragraph("一、参赛选手基本信息", new Font(baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t1);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);
            document.add(new Paragraph(" \n"));
            document.add(new Paragraph(" \n"));

涂亚平 committed
71

涂亚平 committed
72
            Paragraph t3 = new Paragraph("学校名称", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
73
            cell = new PdfPCell(t3);
涂亚平 committed
74
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
75 76 77 78 79 80
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
81
            Paragraph t4 = new Paragraph(collegesDictDO.getName(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
82 83 84
            cell = new PdfPCell(t4);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
85
            cell.setColspan(4);
涂亚平 committed
86 87 88
            cell.setPadding(5);
            table.addCell(cell);

涂亚平 committed
89
            Paragraph t5 = new Paragraph("参赛组别", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
90
            cell = new PdfPCell(t5);
涂亚平 committed
91
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
92 93 94 95 96 97
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
98
            Paragraph t6 = new Paragraph(projectDO1.getProjectGroup(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
99 100 101
            cell = new PdfPCell(t6);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
102
            cell.setColspan(5);
涂亚平 committed
103 104 105 106
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
107
            Paragraph t7 = new Paragraph("姓名", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
108
            cell = new PdfPCell(t7);
涂亚平 committed
109
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
110 111 112 113 114 115
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
116
            Paragraph t8 = new Paragraph(teacherDO.getUserName(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
117 118 119 120 121 122 123 124
            cell = new PdfPCell(t8);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
125
            Paragraph t9 = new Paragraph("性别", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
126
            cell = new PdfPCell(t9);
涂亚平 committed
127
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
128 129 130 131 132 133
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
134
            Paragraph t10 = new Paragraph(idCard2Gender(teacherDO.getIdCard()), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
135 136 137 138 139 140 141 142 143 144
            cell = new PdfPCell(t10);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t11 = new Paragraph("出生年月", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t11);
涂亚平 committed
145
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t12 = new Paragraph(idCard2BirthDate(teacherDO.getIdCard()), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t12);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(3);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
161
            Paragraph t13 = new Paragraph("民族", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
162
            cell = new PdfPCell(t13);
涂亚平 committed
163
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
164 165 166 167 168 169
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
170
            Paragraph t14 = new Paragraph(teacherDO.getNationality(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
171 172 173
            cell = new PdfPCell(t14);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
174
            cell.setColspan(2);
涂亚平 committed
175 176 177 178
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
179
            Paragraph t15 = new Paragraph("职务", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
180
            cell = new PdfPCell(t15);
涂亚平 committed
181
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
182 183 184 185 186 187
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
188
            Paragraph t16 = new Paragraph(teacherDO.getPosition(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
189 190 191
            cell = new PdfPCell(t16);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
192
            cell.setColspan(2);
涂亚平 committed
193 194 195 196
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
197
            Paragraph t17 = new Paragraph("工作年限", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
198
            cell = new PdfPCell(t17);
涂亚平 committed
199
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
200 201 202 203 204 205
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
206
            Paragraph t18 = new Paragraph(teacherDO.getYears() + "", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
207 208 209
            cell = new PdfPCell(t18);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
210
            cell.setColspan(3);
涂亚平 committed
211 212 213 214
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
215
            Paragraph t19 = new Paragraph("最高学历", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
216
            cell = new PdfPCell(t19);
涂亚平 committed
217
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
218 219 220 221 222 223
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
224
            Paragraph t20 = new Paragraph(teacherDO.getEducation(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
225 226 227
            cell = new PdfPCell(t20);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
228
            cell.setColspan(2);
涂亚平 committed
229 230 231 232
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
233
            Paragraph t21 = new Paragraph("职称", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
234
            cell = new PdfPCell(t21);
涂亚平 committed
235
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
236 237 238 239 240 241
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
242
            Paragraph t22 = new Paragraph(teacherDO.getTitle(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
243 244 245
            cell = new PdfPCell(t22);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
246
            cell.setColspan(2);
涂亚平 committed
247 248 249 250
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
251
            Paragraph t23 = new Paragraph("研究方向", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
252
            cell = new PdfPCell(t23);
涂亚平 committed
253
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
254 255 256 257 258 259
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
260
            Paragraph t24 = new Paragraph(teacherDO.getMajor(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
261 262 263
            cell = new PdfPCell(t24);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
264
            cell.setColspan(3);
涂亚平 committed
265 266 267 268
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
269
            Paragraph t25 = new Paragraph("身份证号", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
270
            cell = new PdfPCell(t25);
涂亚平 committed
271
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
272 273 274 275 276 277
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
278
            Paragraph t26 = new Paragraph(teacherDO.getIdCard(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
279 280 281
            cell = new PdfPCell(t26);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
282
            cell.setColspan(13);
涂亚平 committed
283 284 285 286
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
287
            Paragraph t27 = new Paragraph("手机号", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
288
            cell = new PdfPCell(t27);
涂亚平 committed
289
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
290 291 292 293 294 295
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
296
            Paragraph t28 = new Paragraph(teacherDO.getTelephone(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
297 298 299
            cell = new PdfPCell(t28);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
300
            cell.setColspan(6);
涂亚平 committed
301 302 303 304
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
305
            Paragraph t29 = new Paragraph("电子邮箱", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
306
            cell = new PdfPCell(t29);
涂亚平 committed
307
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
308
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
309
            cell.setColspan(2);
涂亚平 committed
310 311 312 313
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
314
            Paragraph t30 = new Paragraph(teacherDO.getEmail(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
315 316 317
            cell = new PdfPCell(t30);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
318
            cell.setColspan(3);
涂亚平 committed
319 320 321 322
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
323
            Paragraph t31 = new Paragraph("相关成果(与课程教学相关近3年所获奖项或发表成果)", new Font(PDFUtil.baseFont, 12, Font.BOLD));
涂亚平 committed
324
            cell = new PdfPCell(t31);
涂亚平 committed
325
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
326
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
327
            cell.setColspan(13);
涂亚平 committed
328 329 330 331
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
332
            Paragraph t32 = new Paragraph(projectDO1.getRelateResult(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
333
            cell = new PdfPCell(t32);
涂亚平 committed
334 335 336 337
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
//            cell.setMinimumHeight(160f);
            cell.setColspan(13);
涂亚平 committed
338 339 340 341
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
342
            Paragraph t33 = new Paragraph("教学反思和自我评价(500字以内)", new Font(PDFUtil.baseFont, 12, Font.BOLD));
涂亚平 committed
343
            cell = new PdfPCell(t33);
涂亚平 committed
344
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
345
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
346
            cell.setColspan(13);
涂亚平 committed
347 348 349 350
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
351
            Paragraph t34 = new Paragraph(projectDO1.getTeachComment(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
352
            cell = new PdfPCell(t34);
涂亚平 committed
353 354 355 356
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
//            cell.setMinimumHeight(195f);
            cell.setColspan(13);
涂亚平 committed
357 358 359 360
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

涂亚平 committed
361 362 363 364 365 366
            document.add(table);
            document.newPage();

            PdfPTable table2 = new PdfPTable(13);

            Paragraph t35 = new Paragraph("二、参赛课程信息", new Font(PDFUtil.baseFont, 16, Font.BOLD));
涂亚平 committed
367
            cell = new PdfPCell(t35);
涂亚平 committed
368
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
369
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
370 371 372 373
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);
涂亚平 committed
374

涂亚平 committed
375
            Paragraph t36 = new Paragraph("课程名称", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
376 377 378
            cell = new PdfPCell(t36);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
379 380 381 382
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);
涂亚平 committed
383

涂亚平 committed
384
            Paragraph t37 = new Paragraph(projectDO1.getCourseName(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
385 386 387
            cell = new PdfPCell(t37);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
388
            cell.setColspan(11);
涂亚平 committed
389 390
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
391
            table2.addCell(cell);
涂亚平 committed
392

涂亚平 committed
393
            Paragraph t38 = new Paragraph("英文名称", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
394 395
            t38.setAlignment(Element.ALIGN_CENTER);
            cell = new PdfPCell(t38);
涂亚平 committed
396
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
397
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
398
            cell.setColspan(2);
涂亚平 committed
399 400
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
401
            table2.addCell(cell);
涂亚平 committed
402

涂亚平 committed
403
            Paragraph t39 = new Paragraph(projectDO1.getCourseNameEn(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
404 405 406
            cell = new PdfPCell(t39);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
407
            cell.setColspan(11);
涂亚平 committed
408 409
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
410
            table2.addCell(cell);
涂亚平 committed
411

涂亚平 committed
412
            Paragraph t40 = new Paragraph("课程编码", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
413
            cell = new PdfPCell(t40);
涂亚平 committed
414
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
415
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
416 417 418 419
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);
涂亚平 committed
420

涂亚平 committed
421
            Paragraph t41 = new Paragraph(projectDO1.getCourseCode(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
422 423 424
            cell = new PdfPCell(t41);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
425 426 427 428
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);
涂亚平 committed
429

涂亚平 committed
430
            Paragraph t42 = new Paragraph("课程性质", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
431
            cell = new PdfPCell(t42);
涂亚平 committed
432
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
433
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
434
            cell.setColspan(2);
涂亚平 committed
435 436
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
437
            table2.addCell(cell);
涂亚平 committed
438

涂亚平 committed
439
            Paragraph t43 = new Paragraph(projectDO1.getCourseType(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
440 441 442
            cell = new PdfPCell(t43);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
443
            cell.setColspan(11);
涂亚平 committed
444 445
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
446
            table2.addCell(cell);
涂亚平 committed
447

涂亚平 committed
448
            Paragraph t44 = new Paragraph("开课年级", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
449
            cell = new PdfPCell(t44);
涂亚平 committed
450
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
451
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
452
            cell.setColspan(2);
涂亚平 committed
453 454 455 456
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

涂亚平 committed
457
            Paragraph t45 = new Paragraph(projectDO1.getGrade(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
458 459 460
            cell = new PdfPCell(t45);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
461
            cell.setColspan(11);
涂亚平 committed
462 463 464 465
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

涂亚平 committed
466
            Paragraph t46 = new Paragraph("开课对象", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
467
            cell = new PdfPCell(t46);
涂亚平 committed
468
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
469 470 471 472 473 474
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

涂亚平 committed
475 476 477 478 479 480 481 482
            StringBuilder stringBuilder = new StringBuilder();
            if (0 == projectDO1.getCourseObject()) {
                stringBuilder.append("专业不限");
            } else {
                stringBuilder.append("限制专业,请填写专业名称  " + projectDO1.getCourseObjectMajor());
            }

            Paragraph t47 = new Paragraph(stringBuilder.toString(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
483 484 485
            cell = new PdfPCell(t47);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
486
            cell.setColspan(11);
涂亚平 committed
487 488 489 490
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

涂亚平 committed
491 492

            Paragraph t48 = new Paragraph("学时学分", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
493
            cell = new PdfPCell(t48);
涂亚平 committed
494
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
495 496 497 498 499 500
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

涂亚平 committed
501
            Paragraph t49 = new Paragraph("学时:" + projectDO1.getCourseHour() + ",学分:" + projectDO1.getScore(), new Font(PDFUtil.baseFont, 12));
涂亚平 committed
502 503 504
            cell = new PdfPCell(t49);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
505
            cell.setColspan(3);
涂亚平 committed
506 507 508 509
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

涂亚平 committed
510
            Paragraph t50 = new Paragraph("其中实验/实践学时", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
511
            cell = new PdfPCell(t50);
涂亚平 committed
512
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
513
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
514
            cell.setColspan(4);
涂亚平 committed
515 516 517 518
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

涂亚平 committed
519
            Paragraph t51 = new Paragraph(projectDO1.getPractiseHour() + "", new Font(PDFUtil.baseFont, 12));
涂亚平 committed
520 521 522
            cell = new PdfPCell(t51);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
523
            cell.setColspan(4);
涂亚平 committed
524 525 526 527
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

涂亚平 committed
528 529 530
            Paragraph t52 = new Paragraph("开课单位", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t52);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
531
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
532
            cell.setColspan(2);
涂亚平 committed
533 534
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
535
            table2.addCell(cell);
涂亚平 committed
536

涂亚平 committed
537 538
            Paragraph t53 = new Paragraph(projectDO1.getCompanyName(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t53);
涂亚平 committed
539 540
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
541
            cell.setColspan(3);
涂亚平 committed
542 543
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
544
            table2.addCell(cell);
涂亚平 committed
545

涂亚平 committed
546 547 548
            Paragraph t54 = new Paragraph("课程网址", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t54);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
549
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
550
            cell.setColspan(4);
涂亚平 committed
551 552
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
553
            table2.addCell(cell);
涂亚平 committed
554

涂亚平 committed
555 556
            Paragraph t55 = new Paragraph(projectDO1.getCourseUrl(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t55);
涂亚平 committed
557 558
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
559
            cell.setColspan(4);
涂亚平 committed
560 561
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
562
            table2.addCell(cell);
涂亚平 committed
563

涂亚平 committed
564 565 566
            Paragraph t56 = new Paragraph("最近2轮开课时间", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t56);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
567 568
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
涂亚平 committed
569
            cell.setRowspan(2);
涂亚平 committed
570 571
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
572
            table2.addCell(cell);
涂亚平 committed
573

涂亚平 committed
574 575
            Paragraph t57 = new Paragraph(projectDO1.getStartDate1() + "--" + projectDO1.getEndDate1() + ",学生人数:" + projectDO1.getStudentTotalNum1() + "人", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t57);
涂亚平 committed
576 577
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
578
            cell.setColspan(11);
涂亚平 committed
579 580
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
581
            table2.addCell(cell);
涂亚平 committed
582

涂亚平 committed
583 584
            Paragraph t58 = new Paragraph(projectDO1.getStartDate2() + "--" + projectDO1.getEndDate2() + ",学生人数:" + projectDO1.getStudentTotalNum2() + "人", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t58);
涂亚平 committed
585 586
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
587
            cell.setColspan(11);
涂亚平 committed
588 589
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
590
            table2.addCell(cell);
涂亚平 committed
591

涂亚平 committed
592 593 594
            Paragraph t59 = new Paragraph("三、课程概述(400字以内)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t59);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
595
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
596
            cell.setColspan(13);
涂亚平 committed
597 598
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
599
            table2.addCell(cell);
涂亚平 committed
600

涂亚平 committed
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877
            Paragraph t60 = new Paragraph(projectDO1.getCourseDesc(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t60);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
//            cell.setMinimumHeight(170f);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t61 = new Paragraph("四、课程目标(300字以内)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t61);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t62 = new Paragraph(projectDO1.getCourseMission(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t62);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
//            cell.setMinimumHeight(135f);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);
//            document.newPage();
//
//            PdfPTable table2 = new PdfPTable(13);
//            PDFUtil.tableStyle(new PdfPTable(13), new int[13]);
//            PdfPCell cell2;
//            table2.setWidthPercentage(90);


            Paragraph t63 = new Paragraph("五、课程内容与教学安排(500字以内)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t63);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t64 = new Paragraph(projectDO1.getCourseContent(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t64);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t65 = new Paragraph("六、课程特色与创新点(400字以内)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t65);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t67 = new Paragraph(projectDO1.getCourseFeature(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t67);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t68 = new Paragraph("七、教研成果及教学改革(500字以内)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t68);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t69 = new Paragraph(projectDO1.getTeachResult(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t69);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

//            document.add(table);
//            document.newPage();
            table2.setWidthPercentage(90);
            document.add(table2);

            PdfPTable table3 = new PdfPTable(13);
            PDFUtil.tableStyle(new PdfPTable(13), new int[13]);
            PdfPCell cell3;
            table3.setWidthPercentage(90);

            Paragraph t70 = new Paragraph("八、授课教师(课程团队)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell3 = new PdfPCell(t70);
            cell3.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(13);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t71 = new Paragraph("课程团队其他主要成员(总人数限4人之内)", new Font(PDFUtil.baseFont, 12, Font.BOLD));
            cell3 = new PdfPCell(t71);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(13);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t72 = new Paragraph("序号", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t72);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(1);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t73 = new Paragraph("姓名", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t73);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t74 = new Paragraph("出生年月", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t74);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t75 = new Paragraph("学历/学位", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t75);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t76 = new Paragraph("职务/职称", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t76);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t77 = new Paragraph("专业/专长", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t77);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t78 = new Paragraph("授课任务", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t78);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            for (int i = 1; i <= projectMembersDOS.size() - 1; i++) {

                Paragraph t79 = new Paragraph(i + "", new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t79);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(1);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t80 = new Paragraph(projectMembersDOS.get(i).getUserName(), new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t80);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t81 = new Paragraph(projectMembersDOS.get(i).getBirthDate(), new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t81);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t82 = new Paragraph(projectMembersDOS.get(i).getEducation(), new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t82);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t83 = new Paragraph(projectMembersDOS.get(i).getPosition(), new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t83);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t84 = new Paragraph(projectMembersDOS.get(i).getMajor(), new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t84);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t85 = new Paragraph(projectMembersDOS.get(i).getCourseTarget(), new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t85);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);
            }

            Paragraph t86 = new Paragraph("课程团队主要成员讲授参赛课程情况(最近一轮)", new Font(PDFUtil.baseFont, 13, Font.BOLD));
            cell3 = new PdfPCell(t86);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(13);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t87 = new Paragraph("序号", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t87);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(1);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t88 = new Paragraph("姓名", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t88);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t89 = new Paragraph("授课学期", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t89);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t90 = new Paragraph("起止日期", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t90);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t91 = new Paragraph("授课学时", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t91);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t92 = new Paragraph("授课年级", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t92);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t93 = new Paragraph("班级人数", new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t93);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(2);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            for (int i = 0; i <= projectMembersDOS.size() - 1; i++) {

                Paragraph t94 = new Paragraph(i + 1 + "", new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t94);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(1);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t95 = new Paragraph(projectMembersDOS.get(i).getUserName(), new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t95);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t96 = new Paragraph(projectMembersDOS.get(i).getSemester(), new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t96);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t97 = new Paragraph(projectMembersDOS.get(i).getStartDate() + "~" + projectMembersDOS.get(i).getEndDate(), new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t97);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t98 = new Paragraph(projectMembersDOS.get(i).getTeachHours() + "", new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t98);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t99 = new Paragraph(projectMembersDOS.get(i).getTeachGrade(), new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t99);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

                Paragraph t100 = new Paragraph(projectMembersDOS.get(i).getClassTotalNum() + "", new Font(PDFUtil.baseFont, 12));
                cell3 = new PdfPCell(t100);
                cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell3.setColspan(2);
                cell3.setPaddingTop(8);
                cell3.setPaddingBottom(8);
                table3.addCell(cell3);

            }

            Paragraph t101 = new Paragraph("整体课程团队教学情况(400字以内)", new Font(PDFUtil.baseFont, 13, Font.BOLD));
            cell3 = new PdfPCell(t101);
            cell3.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(13);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            Paragraph t102 = new Paragraph(projectDO1.getCourseTeam(), new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t102);
            cell3.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell3.setVerticalAlignment(Element.ALIGN_TOP);
            cell3.setColspan(13);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            table3.setWidthPercentage(90);

//            document.add(table3);
//            document.newPage();

//            PdfPTable table4 = new PdfPTable(13);

            Paragraph t103 = new Paragraph("九、教材及教辅材料(400字以内)", new Font(baseFont, 16, Font.BOLD));
            cell3 = new PdfPCell(t103);
            cell3.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell3.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell3.setColspan(13);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);


            Paragraph t118 = new Paragraph(projectDO1.getCourseTeam(), new Font(PDFUtil.baseFont, 12));
            cell3 = new PdfPCell(t118);
            cell3.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell3.setVerticalAlignment(Element.ALIGN_TOP);
//            cell3.setMinimumHeight(160);
            cell3.setColspan(13);
            cell3.setPaddingTop(8);
            cell3.setPaddingBottom(8);
            table3.addCell(cell3);

            document.add(table3);
            document.newPage();

            Paragraph t104 = new Paragraph("十、学校推荐意见", new Font(baseFont, 16, Font.BOLD));
            document.add(t104);
            document.add(new Paragraph(" \n"));
            document.add(new Paragraph(" \n"));
            PdfPTable table10 = new PdfPTable(13);

            table10.setWidthPercentage(90);

            Paragraph t105 = new Paragraph("学校就业\n部门意见", new Font(PDFUtil.baseFont, 12, Font.BOLD));
            cell = new PdfPCell(t105);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

            Paragraph t106 = new Paragraph("\n\n\n\n\n\n\n(盖章)                   \n年        月       日", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t106);
            cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

            Paragraph t107 = new Paragraph("学校教务\n部门意见", new Font(PDFUtil.baseFont, 12, Font.BOLD));
            cell = new PdfPCell(t107);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

            Paragraph t108 = new Paragraph("\n\n\n\n\n\n\n(盖章)                   \n年        月       日", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t108);
            cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

            Paragraph t109 = new Paragraph("学校政治\n审查意见", new Font(PDFUtil.baseFont, 12, Font.BOLD));
            cell = new PdfPCell(t109);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

            Paragraph t110 = new Paragraph("        参赛教师遵纪守法,无违法违纪行为,不存在师德师风问题、学术不端等问题,五年内未出现过重大教学事故。相关课程内容及上传的申报材料无危害国家安全、涉密及其他不适宜公开传播的内容,对于我国政治制度以及党的理论、路线、方针、政策等理解和表述准确无误,价值取向正确,不存在思想性问题。\n\n                                                                                                                              (盖章)\n                                        " +
                    "                                                                      年         月       日", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t110);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);


            Paragraph t111 = new Paragraph("申报学校\n承诺意见", new Font(PDFUtil.baseFont, 12, Font.BOLD));
            cell = new PdfPCell(t111);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

            Paragraph t112 = new Paragraph("        学校对课程有关信息及课程负责人填报的内容进行了核实,保证真实性。经对该课程评审评价,择优申报推荐。\n" +
                    "        如果该教师获奖,自获奖结果公布开始,相关课程相关材料将通有关网站平台公开发布,不少于5年,接受监督和管理。\n" +
                    "\n                                                                       主管校领导签字:\n                                          " +
                    "                                                                    年       月       日", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t112);
//            cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);


            Paragraph t113 = new Paragraph("学校意见", new Font(PDFUtil.baseFont, 12, Font.BOLD));
            cell = new PdfPCell(t113);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);


            Paragraph t114 = new Paragraph("\n\n\n\n\n\n\n学校(盖章)\n年        月       日", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t114);
            cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

            document.add(table10);

            document.add(new Paragraph(" \n"));
            document.add(new Paragraph(" \n"));


            Paragraph t115 = new Paragraph("说明:", new Font(baseFont, 12, Font.BOLD));
            t115.setAlignment(Element.ALIGN_LEFT);
            document.add(t115);

            Paragraph t116 = new Paragraph("1.参赛课程不包含创业类课程;", new Font(baseFont, 10));
            t116.setAlignment(Element.ALIGN_LEFT);
            document.add(t116);

            Paragraph t117 = new Paragraph("2.推荐表盖章后需扫描成PDF格式提交。", new Font(baseFont, 10));
            t117.setAlignment(Element.ALIGN_LEFT);
            document.add(t117);

            document.close();
            bao.close();
            renderPdf(bao.toByteArray(), String.valueOf(System.currentTimeMillis()), "pdf");
        } catch (Exception e) {
//            log.error("---PDF创建异常: " + e);
            e.printStackTrace();
            throw new HttpException(10010);
        }
    }

    public static void createCourse(ProjectDO projectDO1, MatchDictDO matchDictDO, TeacherDO teacherDO, List<ProjectMembersDO> projectMembersDOS, CollegesDictDO collegesDictDO) {
        try {
            ByteArrayOutputStream bao = new ByteArrayOutputStream();
            Document document = new Document(PageSize.A4, 20, 20, 20, 20);
            PdfWriter.getInstance(document, bao);
            document.open();

            document.add(new Paragraph(" \n"));
            document.add(new Paragraph(" \n"));

            Paragraph p1 = new Paragraph(matchDictDO.getMatchName()+"报名表(课程赛道)", new Font(baseFont, 20, Font.BOLD));
            p1.setAlignment(Element.ALIGN_CENTER);
            document.add(p1);
            document.add(new Paragraph(" \n"));
//            document.add(new Paragraph(" \n"));

            PdfPTable table = new PdfPTable(13);
            PDFUtil.tableStyle(new PdfPTable(13), new int[13]);
            PdfPCell cell;

            table.setWidthPercentage(90);

            Paragraph t1 = new Paragraph("一、课程基本信息", new Font(baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t1);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);
            document.add(new Paragraph(" \n"));
            document.add(new Paragraph(" \n"));


            Paragraph t3 = new Paragraph("学校名称", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t3);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t4 = new Paragraph(collegesDictDO.getName(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t4);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(4);
            cell.setPadding(5);
            table.addCell(cell);

            Paragraph t5 = new Paragraph("参赛组别", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t5);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t6 = new Paragraph(projectDO1.getProjectGroup(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t6);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(5);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t7 = new Paragraph("课程名称", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t7);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t8 = new Paragraph(projectDO1.getCourseName(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t8);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t9 = new Paragraph("英文名称", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t9);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t10 = new Paragraph(projectDO1.getCourseNameEn(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t10);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t11 = new Paragraph("课程编码", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t11);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t12 = new Paragraph(projectDO1.getCourseCode(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t12);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t13 = new Paragraph("课程性质", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t13);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t14 = new Paragraph(projectDO1.getCourseType(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t14);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t44 = new Paragraph("开课年级", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t44);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t45 = new Paragraph(projectDO1.getGrade(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t45);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t46 = new Paragraph("开课对象", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t46);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            StringBuilder stringBuilder = new StringBuilder();
            if (0 == projectDO1.getCourseObject()) {
                stringBuilder.append("专业不限");
            } else {
                stringBuilder.append("限制专业,请填写专业名称  " + projectDO1.getCourseObjectMajor());
            }

            Paragraph t47 = new Paragraph(stringBuilder.toString(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t47);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t48 = new Paragraph("学时学分", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t48);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t49 = new Paragraph("学时:" + projectDO1.getCourseHour() + ",学分:" + projectDO1.getScore(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t49);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(4);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t50 = new Paragraph("其中实验/实践学时", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t50);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(4);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t51 = new Paragraph(projectDO1.getPractiseHour() + "", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t51);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(3);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t52 = new Paragraph("开课单位", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t52);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t53 = new Paragraph(projectDO1.getCompanyName(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t53);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(4);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t54 = new Paragraph("课程网址", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t54);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(4);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t55 = new Paragraph(projectDO1.getCourseUrl(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t55);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(3);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t56 = new Paragraph("最近2轮开课时间", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t56);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setRowspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t57 = new Paragraph(projectDO1.getStartDate1() + "--" + projectDO1.getEndDate1() + ",学生人数:" + projectDO1.getStudentTotalNum1() + "人", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t57);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t58 = new Paragraph(projectDO1.getStartDate2() + "--" + projectDO1.getEndDate2() + ",学生人数:" + projectDO1.getStudentTotalNum2() + "人", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t58);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(11);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t128 = new Paragraph("课程负责人信息(应为决赛汇报人)", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t128);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t2 = new Paragraph("姓名", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t2);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t120 = new Paragraph(teacherDO.getUserName(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t120);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t121 = new Paragraph("性别", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t121);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t122 = new Paragraph(idCard2Gender(teacherDO.getIdCard()), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t122);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t123 = new Paragraph("出生年月", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t123);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t124 = new Paragraph(idCard2BirthDate(teacherDO.getIdCard()), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t124);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(3);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t125 = new Paragraph("民族", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t125);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t126 = new Paragraph(teacherDO.getNationality(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t126);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t15 = new Paragraph("职务", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t15);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t16 = new Paragraph(teacherDO.getPosition(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t16);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t17 = new Paragraph("工作年限", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t17);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t18 = new Paragraph(teacherDO.getYears() + "", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t18);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(3);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t19 = new Paragraph("最高学历", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t19);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t20 = new Paragraph(teacherDO.getEducation(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t20);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t21 = new Paragraph("职称", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t21);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t22 = new Paragraph(teacherDO.getTitle(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t22);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t23 = new Paragraph("研究方向", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t23);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t24 = new Paragraph(teacherDO.getMajor(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t24);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(3);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t25 = new Paragraph("身份证号", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t25);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t26 = new Paragraph(teacherDO.getIdCard(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t26);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t27 = new Paragraph("手机号", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t27);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t28 = new Paragraph(teacherDO.getTelephone(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t28);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(6);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t29 = new Paragraph("电子邮箱", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t29);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            Paragraph t30 = new Paragraph(teacherDO.getEmail(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t30);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(3);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table.addCell(cell);

            document.add(table);
            document.newPage();

            PdfPTable table2 = new PdfPTable(13);

            Paragraph t59 = new Paragraph("二、课程概述(400字以内)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t59);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            table2.setWidthPercentage(90);

            Paragraph t60 = new Paragraph(projectDO1.getCourseDesc(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t60);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
//            cell.setMinimumHeight(160);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t61 = new Paragraph("三、课程目标(300字以内)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t61);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t62 = new Paragraph(projectDO1.getCourseMission(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t62);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
//            cell.setMinimumHeight(125);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t63 = new Paragraph("四、课程内容与教学安排(500字以内)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t63);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t64 = new Paragraph(projectDO1.getCourseContent(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t64);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
//            cell.setMinimumHeight(195);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t65 = new Paragraph("五、课程特色与创新点(400字以内)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t65);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t67 = new Paragraph(projectDO1.getCourseFeature(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t67);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
//            cell.setMinimumHeight(160);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

//            document.newPage();

            PdfPTable table3 = new PdfPTable(13);

            table3.setWidthPercentage(90);

            Paragraph t68 = new Paragraph("六、教研成果及教学改革(500字以内)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t68);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);

            Paragraph t69 = new Paragraph(projectDO1.getTeachResult(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t69);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_TOP);
//            cell.setMinimumHeight(195);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table2.addCell(cell);


            document.add(table2);
//            document.newPage();

            PdfPTable table4 = new PdfPTable(13);
            table4.setWidthPercentage(90);

            Paragraph t70 = new Paragraph("七、授课教师(课程团队)", new Font(PDFUtil.baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t70);
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);

            Paragraph t71 = new Paragraph("课程团队其他主要成员(总人数限4人之内)", new Font(PDFUtil.baseFont, 12, Font.BOLD));
            cell = new PdfPCell(t71);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);

            Paragraph t72 = new Paragraph("序号", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t72);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(1);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);

            Paragraph t73 = new Paragraph("姓名", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t73);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);

            Paragraph t74 = new Paragraph("出生年月", new Font(PDFUtil.baseFont, 12));
            t47.setAlignment(Element.ALIGN_CENTER);
            cell = new PdfPCell(t74);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);

            Paragraph t75 = new Paragraph("学历/学位", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t75);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);

            Paragraph t76 = new Paragraph("职务/职称", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t76);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);

            Paragraph t77 = new Paragraph("专业/专长", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t77);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);

            Paragraph t78 = new Paragraph("授课任务", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t78);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);

            for (int i = 1; i <= projectMembersDOS.size() - 1; i++) {

                Paragraph t79 = new Paragraph(i + "", new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t79);
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
涂亚平 committed
1878 1879 1880 1881
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(1);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
涂亚平 committed
1882
                table4.addCell(cell);
涂亚平 committed
1883

涂亚平 committed
1884 1885
                Paragraph t80 = new Paragraph(projectMembersDOS.get(i).getUserName(), new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t80);
涂亚平 committed
1886 1887 1888 1889 1890
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
涂亚平 committed
1891
                table4.addCell(cell);
涂亚平 committed
1892

涂亚平 committed
1893 1894
                Paragraph t81 = new Paragraph(projectMembersDOS.get(i).getBirthDate(), new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t81);
涂亚平 committed
1895 1896 1897 1898 1899
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
涂亚平 committed
1900
                table4.addCell(cell);
涂亚平 committed
1901

涂亚平 committed
1902 1903
                Paragraph t82 = new Paragraph(projectMembersDOS.get(i).getEducation(), new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t82);
涂亚平 committed
1904 1905 1906 1907 1908
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
涂亚平 committed
1909
                table4.addCell(cell);
涂亚平 committed
1910

涂亚平 committed
1911 1912
                Paragraph t83 = new Paragraph(projectMembersDOS.get(i).getPosition(), new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t83);
涂亚平 committed
1913 1914 1915 1916 1917
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
涂亚平 committed
1918
                table4.addCell(cell);
涂亚平 committed
1919

涂亚平 committed
1920 1921
                Paragraph t84 = new Paragraph(projectMembersDOS.get(i).getMajor(), new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t84);
涂亚平 committed
1922 1923 1924 1925 1926
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
涂亚平 committed
1927
                table4.addCell(cell);
涂亚平 committed
1928

涂亚平 committed
1929 1930
                Paragraph t85 = new Paragraph(projectMembersDOS.get(i).getCourseTarget(), new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t85);
涂亚平 committed
1931 1932 1933 1934 1935
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
涂亚平 committed
1936
                table4.addCell(cell);
涂亚平 committed
1937 1938
            }

涂亚平 committed
1939 1940
            Paragraph t86 = new Paragraph("课程团队主要成员讲授参赛课程情况(最近一轮)", new Font(PDFUtil.baseFont, 13, Font.BOLD));
            cell = new PdfPCell(t86);
涂亚平 committed
1941 1942 1943 1944 1945
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
1946
            table4.addCell(cell);
涂亚平 committed
1947

涂亚平 committed
1948 1949 1950
            Paragraph t87 = new Paragraph("序号", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t87);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
涂亚平 committed
1951
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
1952
            cell.setColspan(1);
涂亚平 committed
1953 1954
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
1955
            table4.addCell(cell);
涂亚平 committed
1956

涂亚平 committed
1957 1958 1959 1960 1961 1962 1963 1964
            Paragraph t88 = new Paragraph("姓名", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t88);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);
涂亚平 committed
1965

涂亚平 committed
1966 1967 1968 1969 1970 1971 1972 1973
            Paragraph t89 = new Paragraph("授课学期", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t89);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);
涂亚平 committed
1974

涂亚平 committed
1975 1976 1977
            Paragraph t90 = new Paragraph("起止日期", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t90);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
涂亚平 committed
1978
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
1979
            cell.setColspan(2);
涂亚平 committed
1980 1981 1982 1983
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);

涂亚平 committed
1984 1985 1986 1987 1988 1989 1990 1991
            Paragraph t91 = new Paragraph("授课学时", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t91);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);
涂亚平 committed
1992

涂亚平 committed
1993 1994 1995
            Paragraph t92 = new Paragraph("授课年级", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t92);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
涂亚平 committed
1996
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
1997
            cell.setColspan(2);
涂亚平 committed
1998 1999
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
2000
            table4.addCell(cell);
涂亚平 committed
2001

涂亚平 committed
2002 2003 2004 2005 2006 2007 2008 2009
            Paragraph t93 = new Paragraph("班级人数", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t93);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(2);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table4.addCell(cell);
涂亚平 committed
2010

涂亚平 committed
2011
            for (int i = 0; i <= projectMembersDOS.size() - 1; i++) {
涂亚平 committed
2012

涂亚平 committed
2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080
                Paragraph t94 = new Paragraph(i + 1 + "", new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t94);
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(1);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
                table4.addCell(cell);

                Paragraph t95 = new Paragraph(projectMembersDOS.get(i).getUserName(), new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t95);
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
                table4.addCell(cell);

                Paragraph t96 = new Paragraph(projectMembersDOS.get(i).getSemester(), new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t96);
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
                table4.addCell(cell);

                Paragraph t97 = new Paragraph(projectMembersDOS.get(i).getStartDate() + "~" + projectMembersDOS.get(i).getEndDate(), new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t97);
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
                table4.addCell(cell);

                Paragraph t98 = new Paragraph(projectMembersDOS.get(i).getTeachHours() + "", new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t98);
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
                table4.addCell(cell);

                Paragraph t99 = new Paragraph(projectMembersDOS.get(i).getTeachGrade(), new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t99);
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
                table4.addCell(cell);

                Paragraph t100 = new Paragraph(projectMembersDOS.get(i).getClassTotalNum() + "", new Font(PDFUtil.baseFont, 12));
                cell = new PdfPCell(t100);
                cell.setHorizontalAlignment(Element.ALIGN_CENTER);
                cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
                cell.setColspan(2);
                cell.setPaddingTop(8);
                cell.setPaddingBottom(8);
                table4.addCell(cell);

            }

            Paragraph t101 = new Paragraph("整体课程团队教学情况(400字以内)", new Font(PDFUtil.baseFont, 13, Font.BOLD));
            cell = new PdfPCell(t101);
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
涂亚平 committed
2081 2082 2083 2084
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
2085
            table4.addCell(cell);
涂亚平 committed
2086

涂亚平 committed
2087 2088
            Paragraph t102 = new Paragraph(projectDO1.getCourseTeam(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t102);
涂亚平 committed
2089 2090 2091 2092 2093
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
2094 2095 2096
            table4.addCell(cell);

            document.add(table4);
涂亚平 committed
2097

涂亚平 committed
2098 2099
            Paragraph t103 = new Paragraph("八、教材及教辅材料(400字以内)", new Font(baseFont, 16, Font.BOLD));
            cell = new PdfPCell(t103);
涂亚平 committed
2100 2101 2102 2103 2104
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
2105
            table3.addCell(cell);
涂亚平 committed
2106

涂亚平 committed
2107 2108
            Paragraph t118 = new Paragraph(projectDO1.getCourseTeam(), new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t118);
涂亚平 committed
2109
            cell.setHorizontalAlignment(Element.ALIGN_LEFT);
涂亚平 committed
2110 2111
            cell.setVerticalAlignment(Element.ALIGN_TOP);
//            cell.setMinimumHeight(160);
涂亚平 committed
2112 2113 2114
            cell.setColspan(13);
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
涂亚平 committed
2115
            table3.addCell(cell);
涂亚平 committed
2116

涂亚平 committed
2117
            document.add(table3);
涂亚平 committed
2118 2119
            document.newPage();

涂亚平 committed
2120 2121
            Paragraph t104 = new Paragraph("九、学校推荐意见", new Font(baseFont, 16, Font.BOLD));
            document.add(t104);
涂亚平 committed
2122 2123 2124
            document.add(new Paragraph(" \n"));
            document.add(new Paragraph(" \n"));
            PdfPTable table10 = new PdfPTable(13);
涂亚平 committed
2125
            table10.setWidthPercentage(90);
涂亚平 committed
2126

涂亚平 committed
2127 2128
            Paragraph t105 = new Paragraph("学校就业\n部门意见", new Font(PDFUtil.baseFont, 12,Font.BOLD));
            cell = new PdfPCell(t105);
涂亚平 committed
2129 2130
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
2131
            cell.setColspan(2);
涂亚平 committed
2132 2133 2134 2135
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

涂亚平 committed
2136 2137
            Paragraph t106 = new Paragraph("\n\n\n\n\n\n\n(盖章)                   \n年        月       日", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t106);
涂亚平 committed
2138 2139
            cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
2140
            cell.setColspan(11);
涂亚平 committed
2141 2142 2143 2144
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

涂亚平 committed
2145 2146
            Paragraph t107 = new Paragraph("学校教务\n部门意见", new Font(PDFUtil.baseFont, 12,Font.BOLD));
            cell = new PdfPCell(t107);
涂亚平 committed
2147 2148
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
2149
            cell.setColspan(2);
涂亚平 committed
2150 2151 2152 2153
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

涂亚平 committed
2154 2155
            Paragraph t108 = new Paragraph("\n\n\n\n\n\n\n(盖章)                   \n年        月       日", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t108);
涂亚平 committed
2156 2157
            cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
2158
            cell.setColspan(11);
涂亚平 committed
2159 2160 2161 2162
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

涂亚平 committed
2163 2164
            Paragraph t109 = new Paragraph("学校政治\n审查意见", new Font(PDFUtil.baseFont, 12,Font.BOLD));
            cell = new PdfPCell(t109);
涂亚平 committed
2165 2166
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
2167
            cell.setColspan(2);
涂亚平 committed
2168 2169 2170 2171
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

涂亚平 committed
2172 2173 2174 2175
            Paragraph t110 = new Paragraph("        该课程内容及上传的申报材料无危害国家安全、涉密及其他不适宜公开传播的内容,对于我国政治制度以及党的理论、路线、方针、政策等理解和表述准确无误,价值取向正确,不存在思想性问题。该课程团队参赛教师及成员遵纪守法,无违法违纪行为,不存在师德师风问题、学术不端等问题,五年内未出现过重大教学事故。\n\n                                                                      " +
                    "                                                       (盖章)\n                                        " +
                    "                                                                   年         月       日", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t110);
涂亚平 committed
2176
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
2177
            cell.setColspan(11);
涂亚平 committed
2178 2179 2180 2181
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

涂亚平 committed
2182 2183 2184

            Paragraph t111 = new Paragraph("申报学校\n承诺意见", new Font(PDFUtil.baseFont, 12,Font.BOLD));
            cell = new PdfPCell(t111);
涂亚平 committed
2185 2186
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
2187
            cell.setColspan(2);
涂亚平 committed
2188 2189 2190 2191
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

涂亚平 committed
2192 2193 2194 2195 2196
            Paragraph t112 = new Paragraph("        学校对课程有关信息及课程负责人填报的内容进行了核实,保证真实性。经对该课程评审评价,择优申报推荐。\n" +
                    "        如果该教师获奖,自获奖结果公布开始,相关课程相关材料将通有关网站平台公开发布,不少于5年,接受监督和管理。\n" +
                    "\n                                                                                      主管校领导签字:\n                                          " +
                    "                                                                     年       月       日", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t112);
涂亚平 committed
2197
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
2198
            cell.setColspan(11);
涂亚平 committed
2199 2200 2201 2202
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

涂亚平 committed
2203 2204 2205

            Paragraph t113 = new Paragraph("学校意见", new Font(PDFUtil.baseFont, 12,Font.BOLD));
            cell = new PdfPCell(t113);
涂亚平 committed
2206 2207
            cell.setHorizontalAlignment(Element.ALIGN_CENTER);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
2208
            cell.setColspan(2);
涂亚平 committed
2209 2210 2211 2212
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

涂亚平 committed
2213 2214 2215

            Paragraph t114 = new Paragraph("\n\n\n\n\n\n\n学校(盖章)\n年        月       日", new Font(PDFUtil.baseFont, 12));
            cell = new PdfPCell(t114);
涂亚平 committed
2216 2217
            cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
            cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
涂亚平 committed
2218
            cell.setColspan(11);
涂亚平 committed
2219 2220 2221 2222
            cell.setPaddingTop(8);
            cell.setPaddingBottom(8);
            table10.addCell(cell);

涂亚平 committed
2223
            document.add(table10);
涂亚平 committed
2224 2225 2226
            document.add(new Paragraph(" \n"));
            document.add(new Paragraph(" \n"));

涂亚平 committed
2227 2228 2229
            Paragraph t115 = new Paragraph("说明:", new Font(baseFont, 12, Font.BOLD));
            t115.setAlignment(Element.ALIGN_LEFT);
            document.add(t115);
涂亚平 committed
2230

涂亚平 committed
2231 2232 2233
            Paragraph t116 = new Paragraph("1.参赛课程不包含创业类课程;", new Font(baseFont, 10));
            t116.setAlignment(Element.ALIGN_LEFT);
            document.add(t116);
涂亚平 committed
2234

涂亚平 committed
2235 2236 2237
            Paragraph t117 = new Paragraph("2.推荐表盖章后需扫描成PDF格式提交。", new Font(baseFont, 10));
            t117.setAlignment(Element.ALIGN_LEFT);
            document.add(t117);
涂亚平 committed
2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349

            document.close();
            bao.close();
            renderPdf(bao.toByteArray(), String.valueOf(System.currentTimeMillis()), "pdf");
        } catch (Exception e) {
//            log.error("---PDF创建异常: " + e);
            e.printStackTrace();
            throw new HttpException(10010);
        }
    }

    public static void tableStyle(PdfPTable table, int[] cellsWidth) throws DocumentException {
        table.setWidths(cellsWidth);
        table.setWidthPercentage(100);
        table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
        table.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);
        table.getDefaultCell().setFixedHeight(30);
        table.getDefaultCell().setBackgroundColor(BaseColor.BLUE);
        table.getDefaultCell().setPadding(0);
        table.getDefaultCell().setBorderWidth(0);
    }

    /**
     * 流化下载
     *
     * @param bytes
     * @param filename
     */
    public static void renderPdf(final byte[] bytes, final String filename, String type) {
        ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        HttpServletResponse response = servletRequestAttributes.getResponse();
        initResponseHeader(response, "application/" + type);
        setFileDownloadHeader(response, filename, "." + type);
        if (null != bytes) {
            try {
                response.getOutputStream().write(bytes);
                response.getOutputStream().flush();
            } catch (IOException e) {
                throw new IllegalArgumentException(e);
            }
        }
    }

    /**
     * 分析并设置contentType与headers.
     */
    private static HttpServletResponse initResponseHeader(HttpServletResponse response, final String contentType, final String... headers) {
        // 分析headers参数
        String encoding = "utf-8";
        boolean noCache = true;
        for (String header : headers) {
            String headerName = StringUtils.substringBefore(header, ":");
            String headerValue = StringUtils.substringAfter(header, ":");
            if (StringUtils.equalsIgnoreCase(headerName, "utf-8")) {
                encoding = headerValue;
            } else if (StringUtils.equalsIgnoreCase(headerName, "no-cache")) {
                noCache = Boolean.parseBoolean(headerValue);
            } else {
                throw new IllegalArgumentException(headerName + "不是一个合法的header类型");
            }
        }
        // 设置headers参数
        String fullContentType = contentType + ";charset=" + encoding;
        response.setContentType(fullContentType);
        if (noCache) {
            // Http 1.0 header
            response.setDateHeader("Expires", 0);
            response.addHeader("Pragma", "no-cache");
            // Http 1.1 header
            response.setHeader("Cache-Control", "no-cache");
        }
        return response;
    }

    /**
     * 设置让浏览器弹出下载对话框的Header.
     *
     * @param
     */
    public static void setFileDownloadHeader(HttpServletResponse response, String fileName, String fileType) {
        try {
            // 中文文件名支持
            String encodedfileName = new String(fileName.getBytes(StandardCharsets.UTF_8), "ISO8859-1");
            response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedfileName + fileType + "\"");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
    }

    public static String idCard2Gender(String idCard) {
        int genderDigit = Integer.parseInt(idCard.substring(16, 17));
        return (genderDigit % 2 == 0) ? "女" : "男";
    }

    public static String idCard2BirthDate(String idCard) {
        if (idCard == null || idCard.length() != 18) {
            throw new IllegalArgumentException("身份证号码不合法");
        }

        String birthDateStr = idCard.substring(6, 14);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        try {
            Date birthDate = sdf.parse(birthDateStr);
            SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy/MM/dd");
            return outputFormat.format(birthDate);
        } catch (Exception e) {
            throw new IllegalArgumentException("身份证号码中的出生日期不合法");
        }
    }


}