|
|
@@ -234,11 +234,7 @@ public class PDFSelfUtil {
|
|
|
public static int generateEPDF(Document document, OrderSelfNote receivingNote, boolean flag) throws Exception {
|
|
|
// 段落
|
|
|
Paragraph paragraph;
|
|
|
- if (flag) {
|
|
|
- paragraph = new Paragraph("客 户 自 提 委 托 书", titlefont);
|
|
|
- } else {
|
|
|
- paragraph = new Paragraph("客 户 自 提 委 托 书", titlefont);
|
|
|
- }
|
|
|
+ paragraph = new Paragraph("客 户 自 提 委 托 书", titlefont);
|
|
|
paragraph.setAlignment(1); //设置文字居中 0靠左 1,居中 2,靠右
|
|
|
paragraph.setIndentationLeft(12); //设置左缩进
|
|
|
paragraph.setIndentationRight(12); //设置右缩进
|
|
|
@@ -258,15 +254,9 @@ public class PDFSelfUtil {
|
|
|
paragraph2.setSpacingAfter(5f); //设置段落下空白
|
|
|
document.add(paragraph2);*/
|
|
|
// 直线
|
|
|
- Paragraph p1 = new Paragraph();
|
|
|
+ /* Paragraph p1 = new Paragraph();
|
|
|
p1.add(new Chunk(new LineSeparator()));
|
|
|
- document.add(p1);
|
|
|
- PdfPTable table1 = createTable(new float[] { 240, 100});
|
|
|
- table1.addCell(createCell("委托人(名称): " +receivingNote.getEntrustName(), headfont, Element.ALIGN_LEFT, 1, false));
|
|
|
- table1.addCell(createCell("受托(提货)人:姓名: " +receivingNote.getBeentrustName(), headfont, Element.ALIGN_LEFT, 2, false));
|
|
|
- table1.addCell(createCell("身份证号码: " +receivingNote.getbId(), headfont, Element.ALIGN_RIGHT, 2, false));
|
|
|
- table1.addCell(createCell("车牌: " +receivingNote.getCarNumber(), headfont, Element.ALIGN_RIGHT, 3, false));
|
|
|
- document.add(table1);
|
|
|
+ document.add(p1);*/
|
|
|
// Paragraph paragraph1 = new Paragraph("客户名称: " +receivingNote.getCustomerName() +" " +
|
|
|
// " 运单号: " +receivingNote.getShipmentNumber(), namefont);
|
|
|
Paragraph paragraph1 = new Paragraph();
|
|
|
@@ -282,8 +272,8 @@ public class PDFSelfUtil {
|
|
|
|
|
|
//添加空行
|
|
|
Paragraph p3 = new Paragraph();
|
|
|
- p3.setSpacingBefore(2f); //设置段落上空白
|
|
|
- p3.setSpacingAfter(2f); //设置段落下空白
|
|
|
+ p3.setSpacingBefore(5f); //设置段落上空白
|
|
|
+ p3.setSpacingAfter(5f); //设置段落下空白
|
|
|
// 超链接
|
|
|
// Anchor anchor = new Anchor("baidu");
|
|
|
// anchor.setReference("www.baidu.com");
|
|
|
@@ -306,25 +296,24 @@ public class PDFSelfUtil {
|
|
|
calendar.setTime(date);
|
|
|
// 表格
|
|
|
PdfPTable table = createTable(new float[] { 160, 60, 60,60});
|
|
|
- table.addCell(createCell("委托人委托受托人于"+calendar.get(Calendar.YEAR), headfont, Element.ALIGN_LEFT, 4, false));
|
|
|
- table.addCell(createCell("年"+(calendar.get(Calendar.MONTH)+1), headfont, Element.ALIGN_RIGHT, 4, false));
|
|
|
- table.addCell(createCell("月"+calendar.get(Calendar.DATE), headfont, Element.ALIGN_RIGHT, 4, false));
|
|
|
- table.addCell(createCell("日来贵司提取交货单号为"+receivingNote.getDeliveryNumber(), headfont, Element.ALIGN_LEFT, 5, false));
|
|
|
- table.addCell(createCell("上所载明的货物。", headfont, Element.ALIGN_RIGHT, 5, false));
|
|
|
- table.addCell(createCell(" 特此委托!。", headfont, Element.ALIGN_LEFT, 6, false));
|
|
|
- document.add(paragraph1);
|
|
|
- table.addCell(createCell(" 委托人:"+receivingNote.getEntrustName(), headfont, Element.ALIGN_LEFT, 7, false));
|
|
|
- table.addCell(createCell(" 受托(提货)人:"+receivingNote.getBeentrustName(), headfont, Element.ALIGN_LEFT, 8, false));
|
|
|
- table.addCell(createCell(calendar.get(Calendar.YEAR)+"年"+calendar.get(Calendar.MONTH)+"月"+calendar.get(Calendar.DATE)+"日", headfont, Element.ALIGN_CENTER, 9, false));
|
|
|
- table.addCell(createCell("委托人盖章:", headfont, Element.ALIGN_RIGHT, 10, false));
|
|
|
+ table.addCell(createCell("委托人(名称): " +receivingNote.getEntrustName()+"\n\n"+
|
|
|
+ "受托(提货)人:姓名: " +receivingNote.getBeentrustName()+" 身份证号码: " +receivingNote.getbId()+" 车牌: " +receivingNote.getCarNumber()+"\n\n"+
|
|
|
+ " 委托人委托受托人于 "+calendar.get(Calendar.YEAR)+" 年 "+(calendar.get(Calendar.MONTH)+1)+"月"+calendar.get(Calendar.DATE)+" 日 "+" 来贵司提取交货单号为 "+receivingNote.getDeliveryNumber()+" 上所载明的货物。"+"\n\n"+
|
|
|
+ " 特此委托!。"+"\n\n\n\n"+
|
|
|
+ " 委托人: "+receivingNote.getEntrustName()+"\n\n"+
|
|
|
+ "受托(提货)人:"+receivingNote.getBeentrustName()+"\n\n", keyfont, Element.ALIGN_LEFT, 2, false));
|
|
|
+
|
|
|
+ // table.addCell(createCell(" 委托人:"+receivingNote.getEntrustName(), keyfont, Element.ALIGN_LEFT, 8, false));
|
|
|
+ // table.addCell(createCell(" 受托(提货)人:"+receivingNote.getBeentrustName(), keyfont, Element.ALIGN_LEFT, 9, false));
|
|
|
+ table.addCell(createCell(calendar.get(Calendar.YEAR)+"年"+(calendar.get(Calendar.MONTH)+1)+"月"+calendar.get(Calendar.DATE)+"日", keyfont, Element.ALIGN_RIGHT, 10, false));
|
|
|
+ table.addCell(createCell("委托人盖章:", keyfont, Element.ALIGN_RIGHT, 11, false));
|
|
|
document.add(paragraph1);
|
|
|
- table.addCell(createCell("委托人盖章:", headfont, Element.ALIGN_RIGHT, 10, false));
|
|
|
table.addCell(createCell("注意事项:\n" +
|
|
|
"1、受托(提货)人须携带身份证或驾驶证原件。\n" +
|
|
|
"2、本委托书必须注明立邦公司交货单号。\n" +
|
|
|
"3、本委托书必须盖有与销售合同中预留相一致的印章。\n" +
|
|
|
"4、仓库不接受传真的公章印鉴(外埠客户因特殊原因自提时,携带的传真件必须得到当地办事处相关人员确认后方为有效)。\n" +
|
|
|
- "5、本委托书自委托人确定的提货日期后的十日内有效。", headfont, Element.ALIGN_LEFT, 11, false));
|
|
|
+ "5、本委托书自委托人确定的提货日期后的十日内有效。", keyfont, Element.ALIGN_LEFT, 12, false));
|
|
|
|
|
|
|
|
|
document.add(table);
|