jiapeng 7 anos atrás
pai
commit
2df25129f1

+ 6 - 5
src/main/java/com/ekexiu/portal/util/ProfessorPdfServlet.java

@ -55,11 +55,12 @@ import com.itextpdf.layout.element.Text;
55 55
public class ProfessorPdfServlet extends HttpServlet {
56 56
	private static final long serialVersionUID = 1L;
57 57
	public static final Color RGB3 = new DeviceRgb(0x33, 0x33, 0x33);
58
	public static final Color RGB9 = new DeviceRgb(0x99, 0x99, 0x99);
58
	public static final Color RGB9 = new DeviceRgb(0x77, 0x77, 0x77);
59
	public static final Color RGBC = new DeviceRgb(0xf2, 0xf2, 0xf2);
59 60

60 61
	public static final float TITLE_FONT_SIZE = 12f;
61 62
	public static final float TEXT_FONT_SIZE = 10f;
62
	public static final float LINE_INTERVAL_L = 2.5f;
63
	public static final float LINE_INTERVAL_L = 2.15f;
63 64
	public static final float LINE_INTERVAL_M = 2.15f;
64 65

65 66
	private DataSource dataSource;
@ -189,7 +190,7 @@ public class ProfessorPdfServlet extends HttpServlet {
189 190
		}
190 191
		pg.setFontColor(RGB3);
191 192
		pg.setMargin(0f);
192
		pg.setMultipliedLeading(LINE_INTERVAL_L);
193
		pg.setMultipliedLeading(1.5f);
193 194
		doc.add(pg);
194 195
	}
195 196

@ -203,7 +204,7 @@ public class ProfessorPdfServlet extends HttpServlet {
203 204
			sb.append(" · ").append(office);
204 205
		}
205 206
		Paragraph pg = new Paragraph();
206
		pg.setFontSize(TEXT_FONT_SIZE);
207
		pg.setFontSize(TITLE_FONT_SIZE);
207 208
		pg.setFontColor(RGB3);
208 209
		pg.setMargin(0f);
209 210
		pg.setMultipliedLeading(LINE_INTERVAL_L);
@ -242,7 +243,7 @@ public class ProfessorPdfServlet extends HttpServlet {
242 243
	private void addTitle(Document doc, String title, PdfFont cnFont, PdfFont enFont) {
243 244
		Div div = new Div();
244 245
		div.setWidthPercent(100f);
245
		div.setBorderTop(new SolidBorder(RGB9, 1f));
246
		div.setBorderTop(new SolidBorder(RGBC, 1f));
246 247
		div.setHeight(1f);
247 248
		div.setMargins(10f, 0f, 10f, 0f);
248 249
		doc.add(div);