hello everybody,
I am new to this forum. I am quite long using Itext. I am having problem
adding data in french local.
Let me explain my problem. we have to generate remuneration i.e salary pdf
for associates. when we genearete remuneration pdf using french locale the
data is crossing the table border.
Here by i am attching the out pdf file and java source. please can anybody
tell wether it is bug Itext framework are there is any work around not to
cross the border but still align the data.
Here is code snippet for converting data to french local.
Locale frenchocal=new Locale("fr","FRANCE");
DecimalFormat df = (DecimalFormat)NumberFormat.getInstance( aLocale );
df.applyPattern("#,##0");
String frenchlocal = df.format( new Double (614300000.00));
This gives for french local as 614 300 000
when i add this data to table with right alignment then it crosses the table
border.
PdfWriter.getInstance(document,new
FileOutputStream("c:\\gamhr\\PaddingLeading.pdf"));
document.open();
PdfPTable table = new PdfPTable(2);
Paragraph p = new Paragraph(localnumber);
cell = new PdfPCell(new Paragraph("Checking Right Alignment"));
cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
table.addCell(cell);
cell = new PdfPCell(p);
cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
cell.setPaddingTop(0f);
table.addCell(cell);
cell = new PdfPCell(new Paragraph("Checking right Alignment samll number"));
cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
table.addCell(cell);
cell = new PdfPCell(new Paragraph("600"));
cell.setHorizontalAlignment(Element.ALIGN_RIGHT);
cell.setPaddingTop(0f);
table.addCell(cell);
document.add(table);
Please let me know if you have any answers for this question
http://www.nabble.com/file/p11300392/PaddingLeading.pdf PaddingLeading.pdf
http://www.nabble.com/file/p11300392/Test.java Test.java
--
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/