Download the project from here or here
Project structure
Download the required jar files as shown in project structure.
GeneratePDF.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 | package pdf; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStream; import java.util.Date; import com.itextpdf.text.BaseColor; import com.itextpdf.text.Chunk; import com.itextpdf.text.Document; import com.itextpdf.text.Element; import com.itextpdf.text.Font; import com.itextpdf.text.Image; import com.itextpdf.text.Paragraph; import com.itextpdf.text.Phrase; import com.itextpdf.text.Rectangle; import com.itextpdf.text.pdf.PdfPCell; import com.itextpdf.text.pdf.PdfPTable; import com.itextpdf.text.pdf.PdfWriter; public class GeneratePDF { public static void main(String[] args) { try { OutputStream file = new FileOutputStream(new File("D:/Workspace_Juno/Java_iText_PDF_Password/pdf/Test.pdf")); Document document = new Document(); PdfWriter writer = PdfWriter.getInstance(document, file); // 2 passwords: 1) hello 2) pass@123. Only one pwd can also can be set /*writer.setEncryption("hello".getBytes(), "pass@123".getBytes(), PdfWriter.ALLOW_PRINTING, PdfWriter.ENCRYPTION_AES_128);*/ document.open(); //Set attributes here document.addAuthor("Rahul Ram Iyengar"); document.addCreationDate(); document.addCreator("Rahul"); document.addTitle("Passionate Codes"); document.addSubject("Java iText Pdf "); //defining style Font bold = new Font(Font.FontFamily.TIMES_ROMAN, 9,Font.BOLD); Font color = new Font(Font.FontFamily.TIMES_ROMAN, 9,Font.NORMAL, BaseColor.BLACK); Font color_blue = new Font(Font.FontFamily.TIMES_ROMAN, 9,Font.BOLD, BaseColor.BLUE); // /defining style //----------------------logo----------------------- String imageUrl = "D:/Workspace_Juno/Java_iText_PDF_Password/image/logo.jpg"; Image image = Image.getInstance(imageUrl); image.setAbsolutePosition(365f, 800f); image.scaleAbsoluteWidth(200f); image.scaleAbsoluteHeight(50f); document.add(image); //----------------------/logo----------------------- // document.add(new Paragraph(new Date().toString())); //date Paragraph pdf_heading = new Paragraph(); pdf_heading.setAlignment(Element.ALIGN_CENTER); // creating object of chunk to underline pdf_heading Chunk underline_pdf_heading = new Chunk("Client Detail Sheet",bold); underline_pdf_heading.setUnderline(0.1f, -2f); pdf_heading.add(underline_pdf_heading); document.add(pdf_heading); Paragraph salutation = new Paragraph("Dear Rahul",bold); document.add(salutation); Paragraph blank_line = new Paragraph(" "); document.add(blank_line); //-------------------------------"Your Account Information--------- /*Paragraph account_information = new Paragraph("Your Account Information",bold); document.add(account_information);*/ PdfPTable table_your_information = new PdfPTable(12); // 12 columns. table_your_information.setWidthPercentage(95); //Width 100% table_your_information.setHorizontalAlignment(Element.ALIGN_LEFT); //table_your_information.setSpacingBefore(10f); //Space before table // table_your_information.setSpacingAfter(5f); //Space after table PdfPCell account_information = new PdfPCell(new Phrase("Your Account Information",bold)); account_information.setBorder(Rectangle.NO_BORDER); account_information.setRowspan(2); account_information.setColspan(4); PdfPCell BSE_CM = new PdfPCell(new Phrase("BSE-CM",bold)); PdfPCell BSE_FO = new PdfPCell(new Phrase("BSE-FO",bold)); PdfPCell NSE_CM = new PdfPCell(new Phrase("NSE-CM",bold)); PdfPCell NSE_FO = new PdfPCell(new Phrase("NSE-FO",bold)); PdfPCell MCX = new PdfPCell(new Phrase("MCX",bold)); PdfPCell NCDEX = new PdfPCell(new Phrase("NCDEX",bold)); PdfPCell MCD_CUR = new PdfPCell(new Phrase("MCD-CUR",bold)); PdfPCell NSX_CUR = new PdfPCell(new Phrase("NSX-CUR",bold)); PdfPCell value1 = new PdfPCell(new Phrase("Y",color)); PdfPCell value2 = new PdfPCell(new Phrase("N",color)); PdfPCell value3 = new PdfPCell(new Phrase("Y",color)); PdfPCell value4 = new PdfPCell(new Phrase("Y",color)); PdfPCell value5 = new PdfPCell(new Phrase("N",color)); PdfPCell value6 = new PdfPCell(new Phrase("N",color)); PdfPCell value7 = new PdfPCell(new Phrase("Y",color)); PdfPCell value8 = new PdfPCell(new Phrase("Y",color)); table_your_information.addCell(account_information); table_your_information.addCell(BSE_CM); table_your_information.addCell(BSE_FO); table_your_information.addCell(NSE_CM); table_your_information.addCell(NSE_FO); table_your_information.addCell(MCX); table_your_information.addCell(NCDEX); table_your_information.addCell(MCD_CUR); table_your_information.addCell(NSX_CUR); table_your_information.addCell(value1); table_your_information.addCell(value2); table_your_information.addCell(value3); table_your_information.addCell(value4); table_your_information.addCell(value5); table_your_information.addCell(value6); table_your_information.addCell(value7); table_your_information.addCell(value8); document.add(table_your_information); document.add(blank_line); //----------------------------Registered For------------------------------ /*Paragraph registered_for = new Paragraph("Registered For",bold); document.add(registered_for);*/ PdfPTable registered_for_table = new PdfPTable(7); // 3 columns. registered_for_table.setWidthPercentage(55); //Width 100% registered_for_table.setHorizontalAlignment(Element.ALIGN_LEFT); // registered_for_table.setSpacingBefore(10f); //Space before table // registered_for_table.setSpacingAfter(5f); //Space after table PdfPCell registered_for = new PdfPCell(new Phrase("Registered For",bold)); registered_for.setBorder(Rectangle.NO_BORDER); registered_for.setRowspan(2); registered_for.setColspan(4); PdfPCell RTGS = new PdfPCell(new Paragraph("RTGS",bold)); PdfPCell POA = new PdfPCell(new Paragraph("POA",bold)); PdfPCell ECN = new PdfPCell(new Paragraph("ECN",bold)); PdfPCell value9 = new PdfPCell(new Paragraph("YES",color)); PdfPCell value10 = new PdfPCell(new Paragraph("YES",color)); PdfPCell value11= new PdfPCell(new Paragraph("YES",color)); registered_for_table.addCell(registered_for); registered_for_table.addCell(RTGS); registered_for_table.addCell(POA); registered_for_table.addCell(ECN); registered_for_table.addCell(value9); registered_for_table.addCell(value10); registered_for_table.addCell(value11); document.add(registered_for_table); //----------------------------- table----------------------------------- PdfPTable table = new PdfPTable(4); // 4 columns. table.setWidthPercentage(100); //Width 100% table.setSpacingBefore(10f); //Space before table table.setSpacingAfter(5f); //Space after table //Set Column widths float[] columnWidths = {1f, 1f, 1f,1f}; table.setWidths(columnWidths); PdfPCell cell1 = new PdfPCell(new Paragraph("Name of Client :",bold)); //cell1.setBorderColor(BaseColor.BLUE); //cell1.setPaddingLeft(3); PdfPCell cell2 = new PdfPCell(new Paragraph("Rahul",color)); PdfPCell cell3 = new PdfPCell(new Paragraph("Client Code :",bold)); PdfPCell cell4 = new PdfPCell(new Paragraph("A88391",color)); PdfPCell cell5 = new PdfPCell(new Phrase("Address :",bold)); cell5.setRowspan(4); PdfPCell cell6 = new PdfPCell(new Phrase("------------",color)); cell6.setColspan(3); cell6.setRowspan(4); PdfPCell cell7 = new PdfPCell(new Paragraph("City",bold)); PdfPCell cell8 = new PdfPCell(new Paragraph("Mumbai",color)); PdfPCell cell9 = new PdfPCell(new Paragraph("Pin",bold)); PdfPCell cell10 = new PdfPCell(new Paragraph("401202",color)); PdfPCell cell11 = new PdfPCell(new Paragraph("State :",bold)); PdfPCell cell12 = new PdfPCell(new Paragraph("Maharashtra",color)); PdfPCell cell13 = new PdfPCell(new Paragraph("Email",bold)); PdfPCell cell14 = new PdfPCell(new Paragraph("rahul@gmail.com",color)); PdfPCell cell15 = new PdfPCell(new Paragraph("Phone (R)",bold)); PdfPCell cell16 = new PdfPCell(new Paragraph("",color)); PdfPCell cell17 = new PdfPCell(new Paragraph("Phone (O)",bold)); PdfPCell cell18 = new PdfPCell(new Paragraph("",color)); PdfPCell cell19 = new PdfPCell(new Paragraph("Mobile No.",bold)); PdfPCell cell20 = new PdfPCell(new Paragraph("",color)); PdfPCell cell21 = new PdfPCell(new Paragraph("Fax",bold)); PdfPCell cell22 = new PdfPCell(new Paragraph("",color)); PdfPCell cell23 = new PdfPCell(new Paragraph("Pan No ",bold)); PdfPCell cell24 = new PdfPCell(new Paragraph("AHJPY8009P",color)); PdfPCell cell25 = new PdfPCell(new Paragraph("Branch",bold)); PdfPCell cell26 = new PdfPCell(new Paragraph("CHIRA BAZAAR BRANCH",color)); PdfPCell cell27 = new PdfPCell(new Paragraph("Country ",bold)); PdfPCell cell28 = new PdfPCell(new Paragraph("India",color)); PdfPCell cell29 = new PdfPCell(new Paragraph("Sub Broker",bold)); PdfPCell cell30 = new PdfPCell(new Paragraph("CRBG",color)); table.addCell(cell1); table.addCell(cell2); table.addCell(cell3); table.addCell(cell4); table.addCell(cell5); table.addCell(cell6); table.addCell(cell7); table.addCell(cell8); table.addCell(cell9); table.addCell(cell10); table.addCell(cell11); table.addCell(cell12); table.addCell(cell13); table.addCell(cell14); table.addCell(cell15); table.addCell(cell16); table.addCell(cell17); table.addCell(cell18); table.addCell(cell19); table.addCell(cell20); table.addCell(cell21); table.addCell(cell22); table.addCell(cell23); table.addCell(cell24); table.addCell(cell25); table.addCell(cell26); table.addCell(cell27); table.addCell(cell28); table.addCell(cell29); table.addCell(cell30); document.add(table); //------------------------------------------- table2------------------------------------------ PdfPTable table2 = new PdfPTable(4); // 4 columns. table2.setWidthPercentage(100); //Width 100% table2.setSpacingBefore(5f); //Space before table table2.setSpacingAfter(5f); //Space after table PdfPCell cell31 = new PdfPCell(new Paragraph("Bank Account Details:",bold)); PdfPCell cell32 = new PdfPCell(new Paragraph("",color)); PdfPCell cell33 = new PdfPCell(new Paragraph("DP Account Details:",bold)); PdfPCell cell34 = new PdfPCell(new Paragraph("",color)); PdfPCell cell35 = new PdfPCell(new Paragraph("Bank Name:",bold)); PdfPCell cell36 = new PdfPCell(new Paragraph("DCB BANK",color)); PdfPCell cell37 = new PdfPCell(new Paragraph("Depository",bold)); PdfPCell cell38 = new PdfPCell(new Paragraph("CDSL",color)); PdfPCell cell39 = new PdfPCell(new Paragraph("Bank Branch: ",bold)); PdfPCell cell40 = new PdfPCell(new Paragraph("HASANABAD BR",color)); PdfPCell cell41 = new PdfPCell(new Paragraph("DP Name:",bold)); PdfPCell cell42 = new PdfPCell(new Paragraph("Passionate Codes",color)); PdfPCell cell43 = new PdfPCell(new Paragraph("Account Type: ",bold)); PdfPCell cell44 = new PdfPCell(new Paragraph("Saving",color)); PdfPCell cell45 = new PdfPCell(new Paragraph("DP ID:",bold)); PdfPCell cell46 = new PdfPCell(new Paragraph("12033200",color)); PdfPCell cell47 = new PdfPCell(new Paragraph("Account No.: ",bold)); PdfPCell cell48 = new PdfPCell(new Paragraph("00912430101993",color)); PdfPCell cell49 = new PdfPCell(new Paragraph("Client ID:",bold)); PdfPCell cell50 = new PdfPCell(new Paragraph("1203320009004441",color)); table2.addCell(cell31); table2.addCell(cell32); table2.addCell(cell33); table2.addCell(cell34); table2.addCell(cell35); table2.addCell(cell36); table2.addCell(cell37); table2.addCell(cell38); table2.addCell(cell39); table2.addCell(cell40); table2.addCell(cell41); table2.addCell(cell42); table2.addCell(cell43); table2.addCell(cell44); table2.addCell(cell45); table2.addCell(cell46); table2.addCell(cell47); table2.addCell(cell48); table2.addCell(cell49); table2.addCell(cell50); document.add(table2); //--------------------------------------------------- table3------------------------------------ Paragraph pdf_heading3 = new Paragraph(); pdf_heading3.setAlignment(Element.ALIGN_LEFT); // creating object of chunk to underline pdf_heading3 Chunk underline_pdf_heading3 = new Chunk("Your Brokerage Details:",bold); underline_pdf_heading3.setUnderline(0.1f, -2f); document.add(underline_pdf_heading3); PdfPTable table3 = new PdfPTable(16); // 16 columns. table3.setWidthPercentage(100); //Width 100% table3.setSpacingBefore(5f); //Space before table table3.setSpacingAfter(5f); //Space after table PdfPCell cell51 = new PdfPCell(new Paragraph(" ")); cell51.setColspan(2); PdfPCell cell52 = new PdfPCell(new Paragraph("Cash Segment",bold)); cell52.setColspan(2); cell52.setHorizontalAlignment(Element.ALIGN_CENTER); cell52.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell53 = new PdfPCell(new Paragraph("F&O Future",bold)); cell53.setColspan(2); cell53.setHorizontalAlignment(Element.ALIGN_CENTER); cell53.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell54 = new PdfPCell(new Paragraph("Currency Future",bold)); cell54.setColspan(2); cell54.setHorizontalAlignment(Element.ALIGN_CENTER); cell54.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell55 = new PdfPCell(new Paragraph("Commodities Segment",bold)); cell55.setColspan(2); cell55.setHorizontalAlignment(Element.ALIGN_CENTER); cell55.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell56 = new PdfPCell(new Paragraph("F&O Option",bold)); cell56.setColspan(3); cell56.setHorizontalAlignment(Element.ALIGN_CENTER); cell56.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell57 = new PdfPCell(new Paragraph("Currency Option",bold)); cell57.setColspan(3); cell57.setHorizontalAlignment(Element.ALIGN_CENTER); cell57.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell58 = new PdfPCell(new Paragraph(" ")); cell58.setColspan(2); PdfPCell cell59 = new PdfPCell(new Paragraph("Min (Paise)- A",bold)); cell59.setHorizontalAlignment(Element.ALIGN_CENTER); cell59.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell60 = new PdfPCell(new Paragraph("Max (%) - B",bold)); cell60.setHorizontalAlignment(Element.ALIGN_CENTER); cell60.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell61 = new PdfPCell(new Paragraph("Min (Paise)",bold)); cell61.setHorizontalAlignment(Element.ALIGN_CENTER); cell61.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell62 = new PdfPCell(new Paragraph("Max (%)",bold)); cell62.setHorizontalAlignment(Element.ALIGN_CENTER); cell62.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell63 = new PdfPCell(new Paragraph("Min (Paise)",bold)); cell63.setHorizontalAlignment(Element.ALIGN_CENTER); cell63.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell64 = new PdfPCell(new Paragraph("Max (%)",bold)); cell64.setHorizontalAlignment(Element.ALIGN_CENTER); cell64.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell65 = new PdfPCell(new Paragraph("Min (Paise)",bold)); cell65.setHorizontalAlignment(Element.ALIGN_CENTER); cell65.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell66 = new PdfPCell(new Paragraph("Max (%)",bold)); cell66.setHorizontalAlignment(Element.ALIGN_CENTER); cell66.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell67 = new PdfPCell(new Paragraph("% on Premium",bold)); cell67.setHorizontalAlignment(Element.ALIGN_CENTER); cell67.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell68 = new PdfPCell(new Paragraph("Min Per Lot (Rs.)",bold)); cell68.setHorizontalAlignment(Element.ALIGN_CENTER); cell68.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell69 = new PdfPCell(new Paragraph("Max Per Lot (Rs.)",bold)); cell69.setHorizontalAlignment(Element.ALIGN_CENTER); cell69.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell70 = new PdfPCell(new Paragraph("% on Premium",bold)); cell70.setHorizontalAlignment(Element.ALIGN_CENTER); cell70.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell71 = new PdfPCell(new Paragraph("Min Per Lot (Rs.)",bold)); cell71.setHorizontalAlignment(Element.ALIGN_CENTER); cell71.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell72 = new PdfPCell(new Paragraph("Max Per Lot (Rs.)",bold)); cell72.setHorizontalAlignment(Element.ALIGN_CENTER); cell72.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell73 = new PdfPCell(new Paragraph("Trading 1st Leg ",bold)); cell73.setColspan(2); PdfPCell cell74 = new PdfPCell(new Paragraph("1.0000",color)); cell74.setHorizontalAlignment(Element.ALIGN_CENTER); cell74.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell75 = new PdfPCell(new Paragraph("0.0100",color)); cell75.setHorizontalAlignment(Element.ALIGN_CENTER); cell75.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell76 = new PdfPCell(new Paragraph("1.0000",color)); cell76.setHorizontalAlignment(Element.ALIGN_CENTER); cell76.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell77 = new PdfPCell(new Paragraph("0.0100",color)); cell77.setHorizontalAlignment(Element.ALIGN_CENTER); cell77.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell78 = new PdfPCell(new Paragraph(" ")); cell78.setHorizontalAlignment(Element.ALIGN_CENTER); cell78.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell79 = new PdfPCell(new Paragraph("0.0100",color)); cell79.setHorizontalAlignment(Element.ALIGN_CENTER); cell79.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell80 = new PdfPCell(new Paragraph("")); cell80.setHorizontalAlignment(Element.ALIGN_CENTER); cell80.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell81 = new PdfPCell(new Paragraph(" ")); cell81.setHorizontalAlignment(Element.ALIGN_CENTER); cell81.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell82 = new PdfPCell(new Paragraph("0.5000",color)); cell82.setHorizontalAlignment(Element.ALIGN_CENTER); cell82.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell83 = new PdfPCell(new Paragraph("100",color)); cell83.setHorizontalAlignment(Element.ALIGN_CENTER); cell83.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell84 = new PdfPCell(new Paragraph("500",color)); cell84.setHorizontalAlignment(Element.ALIGN_CENTER); cell84.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell85 = new PdfPCell(new Paragraph("0.5000",color)); cell85.setHorizontalAlignment(Element.ALIGN_CENTER); cell85.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell86 = new PdfPCell(new Paragraph("15",color)); cell86.setHorizontalAlignment(Element.ALIGN_CENTER); cell86.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell87 = new PdfPCell(new Paragraph("500",color)); cell87.setHorizontalAlignment(Element.ALIGN_CENTER); cell87.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell88 = new PdfPCell(new Paragraph("Trading 2nd Leg ",bold)); cell88.setColspan(2); PdfPCell cell89 = new PdfPCell(new Paragraph("1.0000",color)); cell89.setHorizontalAlignment(Element.ALIGN_CENTER); cell89.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell90 = new PdfPCell(new Paragraph("0.0100",color)); cell90.setHorizontalAlignment(Element.ALIGN_CENTER); cell90.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell91 = new PdfPCell(new Paragraph("1.0000",color)); cell91.setHorizontalAlignment(Element.ALIGN_CENTER); cell91.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell92 = new PdfPCell(new Paragraph("0.0100",color)); cell92.setHorizontalAlignment(Element.ALIGN_CENTER); cell92.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell93 = new PdfPCell(new Paragraph(" ")); cell93.setHorizontalAlignment(Element.ALIGN_CENTER); cell93.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell94 = new PdfPCell(new Paragraph("0.0100",color)); cell94.setHorizontalAlignment(Element.ALIGN_CENTER); cell94.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell95 = new PdfPCell(new Paragraph("")); cell95.setHorizontalAlignment(Element.ALIGN_CENTER); cell95.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell96 = new PdfPCell(new Paragraph(" ")); cell96.setHorizontalAlignment(Element.ALIGN_CENTER); cell96.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell97 = new PdfPCell(new Paragraph("")); cell97.setHorizontalAlignment(Element.ALIGN_CENTER); cell97.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell98 = new PdfPCell(new Paragraph("")); cell98.setHorizontalAlignment(Element.ALIGN_CENTER); cell98.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell99 = new PdfPCell(new Paragraph("")); cell99.setHorizontalAlignment(Element.ALIGN_CENTER); cell99.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell100 = new PdfPCell(new Paragraph("")); cell100.setHorizontalAlignment(Element.ALIGN_CENTER); cell100.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell101 = new PdfPCell(new Paragraph("")); cell101.setHorizontalAlignment(Element.ALIGN_CENTER); cell101.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell102 = new PdfPCell(new Paragraph("")); cell102.setHorizontalAlignment(Element.ALIGN_CENTER); cell102.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell103 = new PdfPCell(new Paragraph("Delivery Brokerage",bold)); cell103.setColspan(2); PdfPCell cell104 = new PdfPCell(new Paragraph("5.0000",color)); cell104.setHorizontalAlignment(Element.ALIGN_CENTER); cell104.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell105 = new PdfPCell(new Paragraph("0.1000",color)); cell105.setHorizontalAlignment(Element.ALIGN_CENTER); cell105.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell106 = new PdfPCell(new Paragraph("")); cell106.setHorizontalAlignment(Element.ALIGN_CENTER); cell106.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell107 = new PdfPCell(new Paragraph("")); cell107.setHorizontalAlignment(Element.ALIGN_CENTER); cell107.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell108 = new PdfPCell(new Paragraph(" ")); cell108.setHorizontalAlignment(Element.ALIGN_CENTER); cell108.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell109 = new PdfPCell(new Paragraph("")); cell109.setHorizontalAlignment(Element.ALIGN_CENTER); cell109.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell110 = new PdfPCell(new Paragraph("")); cell110.setHorizontalAlignment(Element.ALIGN_CENTER); cell110.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell111 = new PdfPCell(new Paragraph(" ")); cell111.setHorizontalAlignment(Element.ALIGN_CENTER); cell111.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell112 = new PdfPCell(new Paragraph("")); cell112.setHorizontalAlignment(Element.ALIGN_CENTER); cell112.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell113 = new PdfPCell(new Paragraph("")); cell113.setHorizontalAlignment(Element.ALIGN_CENTER); cell113.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell114 = new PdfPCell(new Paragraph("")); cell114.setHorizontalAlignment(Element.ALIGN_CENTER); cell114.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell115 = new PdfPCell(new Paragraph("")); cell115.setHorizontalAlignment(Element.ALIGN_CENTER); cell115.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell116 = new PdfPCell(new Paragraph("")); cell116.setHorizontalAlignment(Element.ALIGN_CENTER); cell116.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell117 = new PdfPCell(new Paragraph("")); cell117.setHorizontalAlignment(Element.ALIGN_CENTER); cell117.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell118 = new PdfPCell(new Paragraph("NIFTY 1st Leg",bold)); cell118.setColspan(2); PdfPCell cell119 = new PdfPCell(new Paragraph(" ")); cell119.setHorizontalAlignment(Element.ALIGN_CENTER); cell119.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell120 = new PdfPCell(new Paragraph(" ")); cell120.setHorizontalAlignment(Element.ALIGN_CENTER); cell120.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell121 = new PdfPCell(new Paragraph("")); cell121.setHorizontalAlignment(Element.ALIGN_CENTER); cell121.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell122 = new PdfPCell(new Paragraph("")); cell122.setHorizontalAlignment(Element.ALIGN_CENTER); cell122.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell123 = new PdfPCell(new Paragraph(" ")); cell123.setHorizontalAlignment(Element.ALIGN_CENTER); cell123.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell124 = new PdfPCell(new Paragraph("")); cell124.setHorizontalAlignment(Element.ALIGN_CENTER); cell124.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell125 = new PdfPCell(new Paragraph("")); cell125.setHorizontalAlignment(Element.ALIGN_CENTER); cell125.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell126 = new PdfPCell(new Paragraph(" ")); cell126.setHorizontalAlignment(Element.ALIGN_CENTER); cell126.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell127 = new PdfPCell(new Paragraph("0.5000",color)); cell127.setHorizontalAlignment(Element.ALIGN_CENTER); cell127.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell128 = new PdfPCell(new Paragraph("50",color)); cell128.setHorizontalAlignment(Element.ALIGN_CENTER); cell128.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell129 = new PdfPCell(new Paragraph("500",color)); cell129.setHorizontalAlignment(Element.ALIGN_CENTER); cell129.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell130 = new PdfPCell(new Paragraph("")); cell130.setHorizontalAlignment(Element.ALIGN_CENTER); cell130.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell131 = new PdfPCell(new Paragraph("")); cell131.setHorizontalAlignment(Element.ALIGN_CENTER); cell131.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell132 = new PdfPCell(new Paragraph("")); cell132.setHorizontalAlignment(Element.ALIGN_CENTER); cell132.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell133 = new PdfPCell(new Paragraph("NIFTY 2nd Leg",bold)); cell133.setColspan(2); PdfPCell cell134 = new PdfPCell(new Paragraph(" ")); cell134.setHorizontalAlignment(Element.ALIGN_CENTER); cell134.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell135 = new PdfPCell(new Paragraph(" ")); cell135.setHorizontalAlignment(Element.ALIGN_CENTER); cell135.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell136 = new PdfPCell(new Paragraph("")); cell136.setHorizontalAlignment(Element.ALIGN_CENTER); cell136.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell137 = new PdfPCell(new Paragraph("")); cell137.setHorizontalAlignment(Element.ALIGN_CENTER); cell137.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell138 = new PdfPCell(new Paragraph(" ")); cell138.setHorizontalAlignment(Element.ALIGN_CENTER); cell138.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell139 = new PdfPCell(new Paragraph("")); cell139.setHorizontalAlignment(Element.ALIGN_CENTER); cell139.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell140 = new PdfPCell(new Paragraph("")); cell140.setHorizontalAlignment(Element.ALIGN_CENTER); cell140.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell141 = new PdfPCell(new Paragraph(" ")); cell141.setHorizontalAlignment(Element.ALIGN_CENTER); cell141.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell142 = new PdfPCell(new Paragraph(" ")); cell142.setHorizontalAlignment(Element.ALIGN_CENTER); cell142.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell143 = new PdfPCell(new Paragraph(" ")); cell143.setHorizontalAlignment(Element.ALIGN_CENTER); cell143.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell144 = new PdfPCell(new Paragraph(" ")); cell144.setHorizontalAlignment(Element.ALIGN_CENTER); cell144.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell145 = new PdfPCell(new Paragraph("")); cell145.setHorizontalAlignment(Element.ALIGN_CENTER); cell145.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell146 = new PdfPCell(new Paragraph("")); cell146.setHorizontalAlignment(Element.ALIGN_CENTER); cell146.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell147 = new PdfPCell(new Paragraph("")); cell147.setHorizontalAlignment(Element.ALIGN_CENTER); cell147.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell148 = new PdfPCell(new Paragraph("MINIFTY 1st Leg",bold)); cell148.setColspan(2); PdfPCell cell149 = new PdfPCell(new Paragraph(" ")); cell149.setHorizontalAlignment(Element.ALIGN_CENTER); cell149.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell150 = new PdfPCell(new Paragraph(" ")); cell150.setHorizontalAlignment(Element.ALIGN_CENTER); cell150.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell151 = new PdfPCell(new Paragraph("")); cell151.setHorizontalAlignment(Element.ALIGN_CENTER); cell151.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell152 = new PdfPCell(new Paragraph("")); cell152.setHorizontalAlignment(Element.ALIGN_CENTER); cell152.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell153 = new PdfPCell(new Paragraph(" ")); cell153.setHorizontalAlignment(Element.ALIGN_CENTER); cell153.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell154 = new PdfPCell(new Paragraph("")); cell154.setHorizontalAlignment(Element.ALIGN_CENTER); cell154.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell155 = new PdfPCell(new Paragraph("")); cell155.setHorizontalAlignment(Element.ALIGN_CENTER); cell155.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell156 = new PdfPCell(new Paragraph(" ")); cell156.setHorizontalAlignment(Element.ALIGN_CENTER); cell156.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell157 = new PdfPCell(new Paragraph("0.5000",color)); cell157.setHorizontalAlignment(Element.ALIGN_CENTER); cell157.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell158 = new PdfPCell(new Paragraph("50",color)); cell158.setHorizontalAlignment(Element.ALIGN_CENTER); cell158.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell159 = new PdfPCell(new Paragraph("500",color)); cell159.setHorizontalAlignment(Element.ALIGN_CENTER); cell9.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell160 = new PdfPCell(new Paragraph("")); cell160.setHorizontalAlignment(Element.ALIGN_CENTER); cell160.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell161 = new PdfPCell(new Paragraph("")); cell161.setHorizontalAlignment(Element.ALIGN_CENTER); cell161.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell cell162 = new PdfPCell(new Paragraph("")); cell162.setHorizontalAlignment(Element.ALIGN_CENTER); cell162.setVerticalAlignment(Element.ALIGN_MIDDLE); table3.addCell(cell51); table3.addCell(cell52); table3.addCell(cell53); table3.addCell(cell54); table3.addCell(cell55); table3.addCell(cell56); table3.addCell(cell57); table3.addCell(cell58); table3.addCell(cell59); table3.addCell(cell60); table3.addCell(cell61); table3.addCell(cell62); table3.addCell(cell63); table3.addCell(cell64); table3.addCell(cell65); table3.addCell(cell66); table3.addCell(cell67); table3.addCell(cell68); table3.addCell(cell69); table3.addCell(cell70); table3.addCell(cell71); table3.addCell(cell72); table3.addCell(cell73); table3.addCell(cell74); table3.addCell(cell75); table3.addCell(cell76); table3.addCell(cell77); table3.addCell(cell78); table3.addCell(cell79); table3.addCell(cell80); table3.addCell(cell81); table3.addCell(cell82); table3.addCell(cell83); table3.addCell(cell84); table3.addCell(cell85); table3.addCell(cell86); table3.addCell(cell87); table3.addCell(cell88); table3.addCell(cell89); table3.addCell(cell90); table3.addCell(cell91); table3.addCell(cell92); table3.addCell(cell93); table3.addCell(cell94); table3.addCell(cell95); table3.addCell(cell96); table3.addCell(cell97); table3.addCell(cell98); table3.addCell(cell99); table3.addCell(cell100); table3.addCell(cell101); table3.addCell(cell102); table3.addCell(cell103); table3.addCell(cell104); table3.addCell(cell105); table3.addCell(cell106); table3.addCell(cell107); table3.addCell(cell108); table3.addCell(cell109); table3.addCell(cell110); table3.addCell(cell111); table3.addCell(cell112); table3.addCell(cell113); table3.addCell(cell114); table3.addCell(cell115); table3.addCell(cell116); table3.addCell(cell117); table3.addCell(cell118); table3.addCell(cell119); table3.addCell(cell120); table3.addCell(cell121); table3.addCell(cell122); table3.addCell(cell123); table3.addCell(cell124); table3.addCell(cell125); table3.addCell(cell126); table3.addCell(cell127); table3.addCell(cell128); table3.addCell(cell129); table3.addCell(cell130); table3.addCell(cell131); table3.addCell(cell132); table3.addCell(cell133); table3.addCell(cell134); table3.addCell(cell135); table3.addCell(cell136); table3.addCell(cell137); table3.addCell(cell138); table3.addCell(cell139); table3.addCell(cell140); table3.addCell(cell141); table3.addCell(cell142); table3.addCell(cell143); table3.addCell(cell144); table3.addCell(cell145); table3.addCell(cell146); table3.addCell(cell147); table3.addCell(cell148); table3.addCell(cell149); table3.addCell(cell150); table3.addCell(cell151); table3.addCell(cell152); table3.addCell(cell153); table3.addCell(cell154); table3.addCell(cell155); table3.addCell(cell156); table3.addCell(cell157); table3.addCell(cell158); table3.addCell(cell159); table3.addCell(cell160); table3.addCell(cell161); table3.addCell(cell162); document.add(table3); //new page //document.newPage(); /*Paragraph blank_space= new Paragraph(" "); document.add(blank_space);*/ Paragraph note= new Paragraph(); note.add(new Paragraph("Note:",bold)); Paragraph note1= new Paragraph(); note1.add(new Paragraph("1. Please note that the brokerage levied to your trading account shall be the higher of brokerage value as per the existing rates or Rs.30 per settlement/segment, subject to the maximum rates prescribed by the regulator(s) from time to time. \n 2. Brokerage is normally levied on % basis of transaction value as above. However, where the rate of scrip / futures contract is below specified rate where specified rate is calculated as A / B, then Minimum Brokerage in paise would be levied on Quantity instead of % rate i.e. If value based Brokerage is 0.25% with 5 paise as Minimum brokerage then specified rate would be (5 / 0.25) which is Rs.20/-. Hence 5 paise would be levied as brokerage on per share basis where share price is less than Rs. 20/- \n 3. In case of intra day transaction in Equity segment/ Stock Futures/Index futures / Currency futures first leg rates as above shall be charged on the buy value or sell value depending upon whichever is higher and second leg rates shall be charged vice versa. \n 4. In case of option transaction (F&O Segment) a percentage of premium value as indicated above would be levied as brokerage if such value falls within the min and max value as specified above. If the percentage of premium value is below the Min amount or beyond the Max amount as specified above then the Min amount or Max amount respectively would be levied as brokerage. ",color)); Chunk note1_chunk1=new Chunk("5. Your ",color); Chunk note1_chunk2=new Chunk("Login ",bold); Chunk note1_chunk3=new Chunk("ID is same as your ",color); Chunk note1_chunk4=new Chunk("Client code ",bold); Chunk note1_chunk5=new Chunk("and password will be communicated to you on your registered E-mail address and Mobile number.Please visit http://passionatecodes.blogspot.in/ to login to Passionate codes. ",color); Chunk note1_chunk6=new Chunk("Passionate codes ",bold); Chunk note1_chunk7=new Chunk("is a one stop solution to access your ",color); Chunk note1_chunk8=new Chunk(" KYC scan image",bold); Chunk note1_chunk9=new Chunk(", BackOffice, Manage your Portfolio, Trade Online, view passionate codes blog, Receive Latest News and Alerts and much more. \n",color); Paragraph note_2= new Paragraph(); note_2.add(new Paragraph("6. Other charges : \n \t \t \t \t \t \t a. Securities Transaction tax, SEBI Turnover fees, Transaction charges shall be levied as per the prevailing rates *. \n \t \t \t \t \t \t b. Statutory levies including but not limited to Service Tax, Stamp duty, Education Cess shall be levied as per the prevailing rates. \n \t \t \t \t \t \t c. Passionate codes reserves the right to levy additional charges including but not limited to the following:-",color)); document.add(note); document.add(note1); document.add(note1_chunk1); document.add(note1_chunk2); document.add(note1_chunk3); document.add(note1_chunk4); document.add(note1_chunk5); document.add(note1_chunk6); document.add(note1_chunk7); document.add(note1_chunk8); document.add(note1_chunk9); //---------------------table for note----------------------- PdfPTable table_note = new PdfPTable(2); // 8 columns. table_note.setWidthPercentage(100); //Width 100% table_note.setHorizontalAlignment(Element.ALIGN_CENTER); table_note.setSpacingBefore(20f); //Space before table // table_your_information.setSpacingAfter(5f); //Space after table PdfPCell c1 = new PdfPCell(new Paragraph("Particulars",bold)); c1.setHorizontalAlignment(Element.ALIGN_CENTER); c1.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell c2 = new PdfPCell(new Paragraph("Amount",bold)); c2.setHorizontalAlignment(Element.ALIGN_CENTER); c2.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell c3 = new PdfPCell(new Paragraph("Franking charges for agreements executed",color)); c1.setHorizontalAlignment(Element.ALIGN_CENTER); c1.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell c4 = new PdfPCell(new Paragraph("Rs.20/- per agreement**",color)); c2.setHorizontalAlignment(Element.ALIGN_CENTER); c2.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell c5 = new PdfPCell(new Paragraph("Duplicate Contract Notes (CN) issued",color)); c1.setHorizontalAlignment(Element.ALIGN_CENTER); c1.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell c6 = new PdfPCell(new Paragraph("Rs.10/- per CN**",color)); c2.setHorizontalAlignment(Element.ALIGN_CENTER); c2.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell c7 = new PdfPCell(new Paragraph("Duplicate Sauda Summary issued",color)); c1.setHorizontalAlignment(Element.ALIGN_CENTER); c1.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell c8 = new PdfPCell(new Paragraph("Rs. 25/- for 1 month period** \nRs 50/- for 2 month period** \nRs.100/- for 3 months and above**",color)); c2.setHorizontalAlignment(Element.ALIGN_CENTER); c2.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell c9 = new PdfPCell(new Paragraph("Bounced Cheque/Stop Payment of cheque",color)); c2.setHorizontalAlignment(Element.ALIGN_CENTER); c2.setVerticalAlignment(Element.ALIGN_MIDDLE); PdfPCell c10 = new PdfPCell(new Paragraph("Rs. 50/- per instance/instrument**",color)); c1.setHorizontalAlignment(Element.ALIGN_CENTER); c1.setVerticalAlignment(Element.ALIGN_MIDDLE); table_note.addCell(c1); table_note.addCell(c2); table_note.addCell(c3); table_note.addCell(c4); table_note.addCell(c5); table_note.addCell(c6); table_note.addCell(c7); table_note.addCell(c8); table_note.addCell(c9); table_note.addCell(c10); document.add(table_note); Paragraph note2= new Paragraph(); note2.add(new Paragraph(" * For prevailing rates please refer Back office interface. \n ** These charges are subject to revision at the sole discretion of Passionate Codes and shall be informed by ordinary post/email/quarterly \n \t \t \t \t \t \t account statements/SMS/notification on the Back office interface \nd. In case physical option is chosen for receiving contract notes and related statements Passionate Codes shall levy charges of Rs.10/- per document dispatched.\n \n",color)); Chunk note2_chunk1=new Chunk("For any discrepancy in above information please write to your below branch address or call ",color); Chunk note2_chunk2=new Chunk("Quality Assurance Cell ",bold); Chunk note2_chunk3=new Chunk("at ",color); Chunk note2_chunk4=new Chunk("33551111 (local charges apply)",bold); Chunk note2_chunk5=new Chunk(" or email to ",color); Chunk note2_chunk6=new Chunk("Passionate Codes",color_blue); Chunk note2_chunk7=new Chunk("\nBranch Address:",bold); Chunk note2_chunk8=new Chunk("Mumbai Maharashtra 401202",color); document.add(note2); document.add(note2_chunk1); document.add(note2_chunk2); document.add(note2_chunk3); document.add(note2_chunk4); document.add(note2_chunk5); document.add(note2_chunk6); document.add(note2_chunk7); document.add(note2_chunk8); //---------------------/table for note----------------------- //To avoid having the cell border and the content overlap, if you are having thick cell borders // cell1.setUseBorderPadding(true); // cell2.setUseBorderPadding(true); // cell3.setUseBorderPadding(true); document.close(); file.close(); } catch (Exception e) { e.printStackTrace(); } } } |
Note: Output will be generated in D:\Workspace_Juno\Java_iText_PDF_Password\pdf according to the current project structure.
No comments:
Post a Comment