Creating PDF file using Itextsharp. RRS feed

  • Question

  • User-1934105638 posted

    Hello Friends,

    In my project  I have to create pdf files. My requirement is I have to print first three lines in 3 paragraphs with full length and below  these 3 parageraph   I have to write text column by column.

    Please guys help me,

    Thanks in Advance.

    Thursday, January 29, 2015 5:09 AM

All replies

  • User-1934105638 posted

    Thanks Mike but I tried all of this  but not getting desired result.

    My Requirement is.

         My First vParagraph
         My Second vParagraph
         My Third Paragraph
         COl1   COl2   COl3
         COl1   COl2   COl3
         COl1   COl2   COl3
         COl1   COl2   COl3

    while I am creating pdf columns are write on paragraph. Either I am able to create column by column pdf or by paragraph.

    Waiting for your reply

    Thursday, January 29, 2015 7:21 AM
  • User-809753952 posted

    Refer to this sample code:

     Dim para3 As New Paragraph()
            Dim p3 As New Phrase("Para1", FontFactory.GetFont("Arial", 10.0F, Font.NORMAL, BaseColor.BLACK))
            para3.FirstLineIndent = 40
            para3.SpacingAfter = 10
            para3.SpacingBefore = 20
            Dim table7 As New PdfPTable(2)
            Dim r7 As Rectangle = New Rectangle(100, 10)
            table7.TotalWidth = page.Width
            table7.SetWidthPercentage(New Single(1) {30, 60}, r7)
            Dim cell7_11 As New PdfPCell(New Phrase("Some text", FontFactory.GetFont("Arial", 10.0F, Font.NORMAL, BaseColor.BLACK)))
            Dim cell7_12 As New PdfPCell(New Phrase("      ", FontFactory.GetFont("Arial", 10.0F, Font.NORMAL, BaseColor.BLACK)))
            cell7_11.Padding = 3
            cell7_12.Padding = 3

    Wednesday, February 4, 2015 5:02 AM