going crazy - PHP to PDF?

Discussion in 'PHP' started by Phoenix CG, Apr 10, 2012.

  1. #1
    I'm trying to send some code to print as avery labels using PDF, it's proving to be a nightmare. could anyone give me a hand, i've tried everything, making it into a function and using fpdf to print the function, didn't work...i'm going mad, 48hours working on the same problem (i am new to php, just my first week).

    <div class="label" style="background-image:url(<?php echo $user_background;?>); background-size:100%;">
    <div>
    <header id="header">
      <div class="header-stuff">
    	<hgroup>
    	  <h1>
    		  <a href="<?php echo $home; ?>">
    			  <img width="150" border="0" alt="<?php echo $sitename; ?>" src="account/img/logo.png">
    		  </a>
    		  <span class="user-name" style="margin-left:50px; margin-top:-1px;"><?php echo  $user; ?></span>
      </h1>
    	</hgroup>
      </div>
    </header>
    <!-- qr code -->
    <div align="center" style="width:120px; height:120px; background-color:#fff; margin-left:10pt; margin-top:30pt;">
    <table height="100%"><tr><td valign="middle">
    <?php			echo '<img src="http://www.avatar.es/'.$user.'" alt="QR code" widhtHeight="100" />';
    
    		?></td></tr></table>
            </div>
    </div>
    <!-- footer -->
    <div style="width:100%; background-color:#0B0B0B; bottom:0; margin-top:31px;" align="right">
    		  <span class="user-name" style="font-size:30px; margin-right:10px;"><?php echo  $name; ?></span>
    </div>
    PHP:
    i'm going meeeeeeeental. please help.
     
    Phoenix CG, Apr 10, 2012 IP
  2. Phoenix CG

    Phoenix CG Member

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    ok so mpdf is now loading a pdf but it's not loading any of the php variables...
     
    Phoenix CG, Apr 10, 2012 IP
  3. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #3
    can you post the rest of php code so we can see where you are trying to load the variables etc?
     
    stephan2307, Apr 11, 2012 IP