PaperBasicInfo
parent
7d0a559a84
commit
868cc95e3f
|
|
@ -389,7 +389,7 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, PaperDO> implemen
|
|||
Document document = new Document(PageSize.A4, 50, 50, 50, 50);
|
||||
PdfWriter.getInstance(document, out);
|
||||
document.open();
|
||||
// STSong-Light 为阅读器内置中文字体(cmaps已内置于openpdf jar),无需嵌入字体文件
|
||||
// STSong-Light:openpdf内置中文字体,由阅读器渲染,无需嵌入字体文件
|
||||
BaseFont baseFont = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
|
||||
addPaperPdfHeader(document, baseFont, examInfo.getPaperBasicInfoVO());
|
||||
if (!CollectionUtils.isEmpty(examInfo.getQuestionVOList())) {
|
||||
|
|
@ -439,8 +439,11 @@ public class PaperServiceImpl extends ServiceImpl<PaperMapper, PaperDO> implemen
|
|||
QuestionTypeEnum typeEnum = QuestionTypeEnum.fromCode(question.getQuestionType());
|
||||
String typeLabel = typeEnum == null ? question.getQuestionType() : typeEnum.getDesc() + "题";
|
||||
String score = question.getScore() == null ? "0" : question.getScore().toPlainString();
|
||||
Paragraph questionLine = new Paragraph("(" + typeLabel + ")" + questionNum + "." + question.getTitle()
|
||||
+ "(题目分值:" + score + ")", new Font(baseFont, 10, Font.NORMAL));
|
||||
StringBuilder questionText = new StringBuilder();
|
||||
questionText.append("(").append(typeLabel).append(")")
|
||||
.append(questionNum).append(". ").append(question.getTitle())
|
||||
.append("(题目分值:").append(score).append(")");
|
||||
Paragraph questionLine = new Paragraph(questionText.toString(), new Font(baseFont, 10, Font.NORMAL));
|
||||
questionLine.setSpacingBefore(8f);
|
||||
document.add(questionLine);
|
||||
if (CollectionUtils.isEmpty(question.getQuestionOptionVOList())) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue