Nothing prevents you to create a layer 2 appearance with whatever you want 
inside.

Paulo

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <itext-questions@lists.sourceforge.net>
Sent: Friday, December 01, 2006 11:50 AM
Subject: [iText-questions] Pile up the character string of the date on 
theimage of the signature.


> Dear all,
>
> Please can anyone help me with this issue?
> It can speak English a little.
>
> There is a task.
> I want to pile up the character string of the date on the image of the
> signature beautifully.
>
> I want to display the character string of the date at the position of the
> center of the signature image.
> The display position is adjusted by putting the line feed code(\n)
> in the character string.
>
> The PdfSignatureAppearance class of the source code has the MARGIN
> variable with private static final.
>
> A setMargin() method of the PdfSignatureAppearance class will be
> able to be added.
>
> Do not other solutions exist?
>
> //It is a part of the source code that I coded.
> /////begin
> PdfSignatureAppearance sap = pdfStamper.getSignatureAppearance();
> Font font = new Font(BaseFont.createFont("HeiseiKakuGo-W5",
>                     "UniJIS-UCS2-H", BaseFont.NOT_EMBEDDED));
> font.setColor(new Color(255, 0, 0));
> font.setSize(6);
> sap.setLayer2Font(font);
>
> Image signImg = Image.getInstance("stamp.gif");
> //1, image Layer
> sap.setImage(signImg);
>
> StringBuffer detail = new StringBuffer();
> Date dat = new Date();
> SimpleDateFormat sdf = new SimpleDateFormat();
> sdf.applyPattern("MMM");
> String month = sdf.format(dat);
> detail.append(month);
> detail.append(".");
> sdf.applyPattern("dd");
> detail.append(sdf.format(dat));
> detail.append(".'");
> sdf.applyPattern("yy");
> detail.append(sdf.format(dat));
>
> //2, n2 Layer
> sap.setLayer2Text("\n     "+detail.toString());
> Rectangle rec = new Rectangle(315, 40, 365, 90);
> //3, pile up image
> sap.setVisibleSignature(rec, 1, null);
>
> ////end
>
>
> //Example
> 1,image Layer
> stamp.gif (50pX50p)
> #################
> ####-PIZZA-######
> #####-shop-######
> ##             ##<< Layer2Text is displayed here.
> ##             ##<< Layer2Text is displayed here.
> ###-signature-###
> #####-stamp-#####
> #################
>
> 2,n2 Layer String
> "\n Dec.01.06"
>
> 3,pile up image
> #################
> ####-PIZZAA-#####
> #####-shop-######
> ##             ##<<I want to display Layer2Text at the center here.
> ##  Dec.01.06  ##<<
> ###-signature-###
> #####-stamp-#####
> #################
>
> Regards,
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share 
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/ 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to