Subversion Repositories SmartDukaan

Rev

Rev 35024 | Rev 35027 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35024 Rev 35025
Line 339... Line 339...
339
                autoGenerateParagraph.setAlignment(Element.ALIGN_CENTER);
339
                autoGenerateParagraph.setAlignment(Element.ALIGN_CENTER);
340
                document.add(autoGenerateParagraph);
340
                document.add(autoGenerateParagraph);
341
 
341
 
342
                if(pdfModel.getCreditTerms()!=null) {
342
                if(pdfModel.getCreditTerms()!=null) {
343
                    // Use monospaced Courier font to preserve spaces/indentation
343
                    // Use monospaced Courier font to preserve spaces/indentation
344
                    Font font = FontFactory.getFont(FontFactory.COURIER, 10, Font.NORMAL);
-
 
345
 
344
 
346
                    // Title
345
                    // Title
347
                    Font boldFont = new Font(FontFactory.getFont(FontFactory.COURIER, 12, Font.BOLD));
-
 
348
                    Paragraph title = new Paragraph("Credit terms :-\n", boldFont);
346
                    Paragraph title = new Paragraph("Credit terms :-\n", FONT_BOLD);
349
                    title.setIndentationLeft(25);
347
                    title.setIndentationLeft(25);
350
                    title.setIndentationRight(25);
348
                    title.setIndentationRight(25);
351
                    document.add(title);
349
                    document.add(title);
352
 
350
 
353
                    // Exact text block (with spaces preserved)
351
                    // Exact text block (with spaces preserved)
Line 357... Line 355...
357
                        count++;
355
                        count++;
358
                        termsBuffer.append(count).append(". ").append(creditTerm).append(".\n");
356
                        termsBuffer.append(count).append(". ").append(creditTerm).append(".\n");
359
                    }
357
                    }
360
 
358
 
361
 
359
 
362
                    Paragraph body = new Paragraph(termsBuffer.toString(), font);
360
                    Paragraph body = new Paragraph(termsBuffer.toString(), FONT_NORMAL);
363
                    body.setIndentationLeft(25);
361
                    body.setIndentationLeft(25);
364
                    body.setIndentationRight(25);
362
                    body.setIndentationRight(25);
365
                    document.add(body);
363
                    document.add(body);
366
 
364
 
367
                }
365
                }