aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-pdfbox/src/main/java/at/gv
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-24 15:06:23 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-24 15:06:23 +0200
commit022f1cace8a815721af4c0da9fc7bdf66a08413c (patch)
treef2b0e47a74ef98c6141d424352c6ea58339f0206 /pdf-as-pdfbox/src/main/java/at/gv
parent7e13c51fb1c225b61c05239d4d44824622bce275 (diff)
downloadpdf-as-4-022f1cace8a815721af4c0da9fc7bdf66a08413c.tar.gz
pdf-as-4-022f1cace8a815721af4c0da9fc7bdf66a08413c.tar.bz2
pdf-as-4-022f1cace8a815721af4c0da9fc7bdf66a08413c.zip
Font vertical adjustment fixed
Diffstat (limited to 'pdf-as-pdfbox/src/main/java/at/gv')
-rw-r--r--pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java
index 3572ad54..5156d846 100644
--- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java
+++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/TableDrawUtils.java
@@ -215,7 +215,7 @@ public class TableDrawUtils {
ascent = ascent / 1000.0f * fontSize;
descent = descent / 1000.0f * fontSize;
- ty = ty + (descent * (-1));
+ //ty = ty + (descent * (-1));
logger.debug("Text tx {} ty {} maxWidth {} textHeight {}", tx, ty,
maxWidth, textHeight);
@@ -236,9 +236,9 @@ public class TableDrawUtils {
contentStream.setFont(textFont, fontSize);
}
- logger.debug("Writing: " + tx + " : " + (ty - fontSize) + " as "
+ logger.debug("Writing: " + tx + " : " + (ty - fontSize + (descent * (-1))) + " as "
+ cell.getType());
- contentStream.moveTextPositionByAmount(tx, (ty - fontSize));
+ contentStream.moveTextPositionByAmount(tx, (ty - fontSize + (descent * (-1))));
contentStream.appendRawCommands(fontSize + " TL\n");
for (int k = 0; k < tlines.length; k++) {