SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 39 of 39
  1. #26
    SitePoint Enthusiast
    Join Date
    Jun 2013
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Both are in same location

  2. #27
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,214
    Mentioned
    153 Post(s)
    Tagged
    0 Thread(s)
    Oh, I see. I mis-spelled the file name. change it to dompdf_config.inc.php (right now it has dompddf_config.inc.php -- an extra 'd' in there)

  3. #28
    SitePoint Enthusiast
    Join Date
    Jun 2013
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank u so much..

    If u don't mind, I have few more questions regarding database and all.

    how can I get a one value from one column from one row from sql database and display it on the table using dompdf itself.

  4. #29
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,214
    Mentioned
    153 Post(s)
    Tagged
    0 Thread(s)
    Can you give me more detail to your question? I'm not 100% certain I follow it.

  5. #30
    SitePoint Enthusiast
    Join Date
    Jun 2013
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a table in my DB in which I have many columns, from there I need to get only a single column value which is to be shown on the table.

  6. #31
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,214
    Mentioned
    153 Post(s)
    Tagged
    0 Thread(s)
    Well dompdf is designed to work with HTML output specifically. So I'd start with generating an HTML page that looks like what you want your PDF page to look like, and then you send that HTML into dompdf to generate your PDF.

    Does that answer your question?

  7. #32
    SitePoint Enthusiast
    Join Date
    Jun 2013
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in the previous code I used while loop to get all the data from the database. In the same way I need to display only a single value

  8. #33
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,214
    Mentioned
    153 Post(s)
    Tagged
    0 Thread(s)
    Ah, now I'm on the same page (just omit the while loop, but use the same condition):

    PHP Code:
    $query "Select my_column from tb_php_sql";
    $result mysql_query($query);
    $rowmysql_fetch_array($result);
    $html .= "<p>" $row['my_column'] . "</p>"

  9. #34
    SitePoint Enthusiast
    Join Date
    Jun 2013
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can I have styles to that table??

    I need to adjust the table 30px from top;

  10. #35
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,214
    Mentioned
    153 Post(s)
    Tagged
    0 Thread(s)
    dompdf states it does support CSS 2.1 so you should be able to add style="margin-top:30px;" to the table

  11. #36
    SitePoint Enthusiast
    Join Date
    Jun 2013
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when I append style="margin-top:30px;" to the table, there is no change in my output pdf

  12. #37
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,214
    Mentioned
    153 Post(s)
    Tagged
    0 Thread(s)
    maybe try margin: 30px 0 0 0 on the table? I'm trying to google a solution, but I haven't found anything yet.

  13. #38
    SitePoint Enthusiast
    Join Date
    Jun 2013
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have tried this also.. unfortunately there is no change in the table..

  14. #39
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,214
    Mentioned
    153 Post(s)
    Tagged
    0 Thread(s)
    Can you just put a <br /> or empty <p></p> tags above the table to get the effect you want?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •