Menu

Text wrapping in a table cell?

Help
nokturnal
2007-08-27
2019-09-10
  • nokturnal

    nokturnal - 2007-08-27

    Can text wrapping in a table cell be done?

    Cheers

     
    • Crowknee

      Crowknee - 2007-08-27

      yep, sure can.  Just add a paragraph to your cell object.  Like :

      sharpPDF.Tables.pdfTableRow row = tbl.createRow(); // tbl is a pdfTable with columns
      int iLineHeight = 12; // Height of line for wrapping
      row[0].addParagraph("Your long string goes here and will wrap.", iLineHeight, sharpPDF.Enumerators.predefinedAlignment.csLeft);

      addParagraph has 5 overloads, so check them out if you need some more options.

      Steele.

       
    • nokturnal

      nokturnal - 2007-08-30

      Fantastic... I will give it a try!

      Thanks :)

       
  • devvvy

    devvvy - 2010-12-06

    Yes, but addParagraph is new stuff only available with new beta version sharpPDF_2_0_Beta1_dll.zip or above. However, with new version, you cannot set column name? This is addColumn signature in latest beta version 2.0
          contentTab.tableHeader.addColumn(Width, predefinedAlignment.csLeft, predefinedVerticalAlignment.csTop);

    With sharpPDF_1_3_1_dll.zip, columns name can be specified and width as well.
          contentTab.tableHeader.addColumn(new pdfTableColumn(c.ColumnName, sharpPDF.Enumerators.predefinedAlignment.csLeft, 25));

     
  • madhur

    madhur - 2019-09-10

    Hello All, i am using the Sharp pdf with Unity3d but me facing some issues can anyone help me out, here are the questions :-

    1. How to dynamically increase the column height according to the text size at runtime.
    2. How do i insert an image without using the co-routine function.
    3. How to dynamically write the data on the new page if current page is filled and data is still pending. For example, there are 50 rows in my table at runtime and one first page 30rows occupy the space, then how do i dynamically write the remaining 20 rows on second page.
    4. Instead of storing the file in root folder, in assets folder , how can i store the pdf at different location by selecting the folder from the system.
    5. How do i add font to text nd paragraph with latest download.
      Can anyone please help me out, it would be great help....Thank you in advance.
     

Log in to post a comment.

MongoDB Logo MongoDB