Skip to content

Commit b6aaaed

Browse files
committed
v1.0
1 parent ae3d2d1 commit b6aaaed

File tree

4 files changed

+39
-38
lines changed

4 files changed

+39
-38
lines changed

PrintDemo/.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<classpath>
33
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
44
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
5-
<classpathentry kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
5+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
66
<classpathentry kind="src" path="src"/>
77
<classpathentry kind="src" path="gen"/>
88
<classpathentry kind="output" path="bin/classes"/>

PrintDemo/.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>jpsycn-print-201306131633</name>
3+
<name>PrintDemo</name>
44
<comment></comment>
55
<projects>
66
</projects>

PrintDemo/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
1212

1313
# Project target.
14-
target=android-17
14+
target=android-18
1515
android.library=true

PrintDemo/src/com/jpsycn/print/util/PDFUtils.java

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -401,21 +401,12 @@ public static boolean createReSamplePdf(Context mContext, File file,
401401
table1.addCell(ItextUtil.getCell(simfang12, "商标", p + q + r));
402402
table1.addCell(ItextUtil.getCell(bf, map.get("product_brand"), s));
403403

404-
table1.addCell(ItextUtil.getCell(simfang12, "抽样数量", n + o1));
405-
table1.addCell(ItextUtil.getCell(bf, map.get("sampling_number"), o2
406-
+ o3));
407-
408-
table1.addCell(ItextUtil.getCell(simfang12, "产品等级", p + q + r));
409-
table1.addCell(ItextUtil.getCell(bf, map.get("product_level"), s));
410-
411-
table1.addCell(ItextUtil.getCell(simfang12, "抽样基数/批量", n + o1));
412-
table1.addCell(ItextUtil.getCell(bf,
413-
map.get("sampling_total_number"), o2 + o3));
414-
415-
table1.addCell(ItextUtil.getCell(simfang12, "标注执行标准/技术文件", p + q
416-
+ r));
417-
table1.addCell(ItextUtil.getCell(bf, map.get("product_standard"), s));
404+
405+
//
406+
gg(map, simfang12, bf, table1);
407+
418408

409+
//
419410
table1.addCell(ItextUtil.getCell(simfang12, "抽样日期", n + o1));
420411
table1.addCell(ItextUtil.getCell(bf, map.get("samplint_date"), o2
421412
+ o3));
@@ -558,6 +549,7 @@ public static boolean createSpaqPdf(Context mContext, File file,
558549
*/
559550

560551
Font simfang12 = FontUtil.getFont(mContext, 12, "simfang.ttf");
552+
561553
Font bf = FontUtil.getFont(mContext, 12, "simfang.ttf", Font.BOLD,
562554
null);
563555

@@ -685,17 +677,21 @@ public static boolean createSpaqPdf(Context mContext, File file,
685677
ItextUtil.checked("中外合作", companyType), s));
686678

687679
table1.addCell(ItextUtil.getCell(20f, simfang12, "企业规模", n, 2));
680+
688681
StringBuilder sb3 = new StringBuilder();
689-
sb3.append("产值:");
682+
sb3.append("人数:");
690683
sb3.append(map.get("company_person_number") == null ? " " : map
691684
.get("company_person_number"));
692-
sb3.append("产量:");
685+
sb3.append(" 产值:");
693686
sb3.append(map.get("company_output_value") == null ? " " : map
694687
.get("company_output_value"));
695-
sb3.append("人数:");
688+
sb3.append(" 产量:");
696689
sb3.append(map.get("company_production") == null ? " " : map
697690
.get("company_production"));
698-
table1.addCell(ItextUtil.getCell(20f, simfang12, sb3.toString(), o1
691+
//sb3.append("人数:10000 产值:5000万 产量:1000吨");
692+
693+
Font simfang10 = FontUtil.getFont(mContext, 9, "simfang.ttf");
694+
table1.addCell(ItextUtil.getCell(20f, simfang10, sb3.toString(), o1
699695
+ o2 + o3));
700696

701697
table1.addCell(ItextUtil.getCell(20f, simfang12,
@@ -738,23 +734,9 @@ public static boolean createSpaqPdf(Context mContext, File file,
738734
table1.addCell(ItextUtil.getCell(20f, bf, map.get("product_brand"),
739735
s));
740736

741-
table1.addCell(ItextUtil.getCell(20f, simfang12, "抽样数量", n + o1));
742-
table1.addCell(ItextUtil.getCell(20f, bf,
743-
map.get("sampling_number"), o2 + o3));
744-
745-
table1.addCell(ItextUtil.getCell(20f, simfang12, "产品等级", p + q + r));
746-
table1.addCell(ItextUtil.getCell(20f, bf, map.get("product_level"),
747-
s));
748-
749-
table1.addCell(ItextUtil.getCell(20f, simfang12, "抽样基数/批量", n + o1));
750-
table1.addCell(ItextUtil.getCell(20f, bf,
751-
map.get("sampling_total_number"), o2 + o3));
752-
753-
table1.addCell(ItextUtil.getCell(20f, simfang12, "标注执行标准/技术文件", p
754-
+ q + r));
755-
table1.addCell(ItextUtil.getCell(20f, bf,
756-
map.get("product_standard"), s));
757-
737+
//
738+
gg(map, simfang12, bf, table1);
739+
//
758740
table1.addCell(ItextUtil.getCell(20f, simfang12, "抽样日期", n + o1));
759741
table1.addCell(ItextUtil.getCell(20f, bf, map.get("samplint_date"),
760742
o2 + o3));
@@ -881,4 +863,23 @@ public static boolean createSpaqPdf(Context mContext, File file,
881863
}
882864
}
883865

866+
private static void gg(Map<String, String> map, Font simfang12, Font bf,
867+
PdfPTable table1) {
868+
table1.addCell(ItextUtil.getCell(simfang12, "抽样数量", 23));
869+
table1.addCell(ItextUtil.getCell(bf, map.get("sampling_number"), 11
870+
));
871+
872+
table1.addCell(ItextUtil.getCell(simfang12, "产品等级", 11));
873+
table1.addCell(ItextUtil.getCell(bf, map.get("product_level"), 10));
874+
875+
table1.addCell(ItextUtil.getCell(simfang12, "抽样基数/批量", 20));
876+
table1.addCell(ItextUtil.getCell(bf,
877+
map.get("sampling_total_number"), 20));
878+
879+
table1.addCell(ItextUtil.getCell(simfang12, "标注执行标准/技术文件", 23+11
880+
));
881+
table1.addCell(ItextUtil.getCell(bf, map.get("product_standard"), 61));
882+
883+
}
884+
884885
}

0 commit comments

Comments
 (0)