aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java
index f27a0e81..a0c0bd1c 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PlaceholderGeneratorServlet.java
@@ -96,8 +96,8 @@ public class PlaceholderGeneratorServlet extends HttpServlet implements Placehol
//if(id != null || profile != null) {
// We need to generate the image
// default values set for pdf-as wai on buergerkarte.at
- int height = 85;
- int width = 250;
+ int height = 60;
+ int width = 300;
int border = 2;
if(req.getParameter(PARAM_HEIGHT) != null) {
@@ -155,7 +155,7 @@ public class PlaceholderGeneratorServlet extends HttpServlet implements Placehol
BufferedImage.TYPE_INT_ARGB);
Graphics g = off_Image.getGraphics();
- g.setColor(Color.BLUE);
+ g.setColor(new Color(255,255,255,1));
g.fillRect(0, 0, width, height);
g.setColor(Color.WHITE);
g.fillRect(border, border, width - (2 * border), height - (2 * border));
@@ -163,7 +163,7 @@ public class PlaceholderGeneratorServlet extends HttpServlet implements Placehol
g.drawImage(qr, border, border, qrSize + border, qrSize + border, 0, 0, qr.getWidth(), qr.getHeight(), null);
//g.(x, y, width, height);
- Font writeFont = new Font(Font.SANS_SERIF, Font.BOLD, 14);
+ Font writeFont = new Font(Font.SANS_SERIF, Font.BOLD, 10);
g.setFont(writeFont);
g.setColor(Color.BLACK);
@@ -179,20 +179,18 @@ public class PlaceholderGeneratorServlet extends HttpServlet implements Placehol
if(profile != null && profile.endsWith("_EN")) {
- g.drawString("placeholder for", qrSize + ( 3 * border), start + lineSpace);
- g.drawString("the electronic", qrSize + ( 3 * border), start + (2 * lineSpace));
- g.drawString("signature", qrSize + ( 3 * border), start + (3 * lineSpace));
+ g.drawString("placeholder for the", qrSize + ( 3 * border), start + lineSpace);
+ g.drawString("electronic signature", qrSize + ( 3 * border), start + (2 * lineSpace));
} else {
- g.drawString("Platzhalter für", qrSize + ( 3 * border), start + lineSpace);
- g.drawString("die elektronische", qrSize + ( 3 * border), start + (2 * lineSpace));
- g.drawString("Signatur", qrSize + ( 3 * border), start + (3 * lineSpace));
+ g.drawString("Platzhalter für die", qrSize + ( 3 * border), start + lineSpace);
+ g.drawString("elektronische Signatur", qrSize + ( 3 * border), start + (2 * lineSpace));
}
if(id != null && !id.isEmpty()) {
- Font nrFont = new Font(Font.SANS_SERIF, Font.BOLD | Font.ITALIC, 14);
+ Font nrFont = new Font(Font.SANS_SERIF, Font.BOLD | Font.ITALIC, 10);
g.setFont(nrFont);
- g.drawString("NR: " + id, qrSize + ( 3 * border), start + (4 * lineSpace));
+ g.drawString("NR: " + id, qrSize + ( 3 * border), start + (3 * lineSpace));
}
logger.info("serving qr placeholder for '{}'", buildString);