Thread: Labels,Pdf,fpdf

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    19
    Rep Power
    0

    Labels,Pdf,fpdf


    Labels with PHP,fpdf Issue
    Expand Post
    Hello

    I have almost completed the code for pdf_labels. However, I am stuck on the fronts. First, the format is not exactly as it should be. Please follow the following URL to see what I am talking about.This is the Label Site As you can see, it starts with label 5 instead of 1, then labels 1 -4 are "doubled up" on labels 21 - 24. Below is the code that the labels currently uses



    PHP Code:
     function PDF_Label($format$unit='mm'$posX=1$posY=1) {
             if (
    is_array($format)) {
             
    // Custom format
             
    $Tformat $format;
             } else {
             
    // Built-in format
             
    if (!isset($this->_Avery_Labels[$format]))
             
    $this->Error('Unknown label format: '.$format);
             
    $Tformat $this->_Avery_Labels[$format];
            }
           
      
          
    parent::FPDF('L'$unit$Tformat['paper-size']);
          
    $this->_Metric_Doc $unit;
          
    $this->_Set_Format($Tformat);
          
    $this->SetFont('Arial');
          
    $this->SetMargins(0,0);
          
    $this->SetAutoPageBreak(false);
         
    $this->_COUNTX $posX-2;
         
    $this->_COUNTY $posY-1;
         } 
    Please help
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    170
    Rep Power
    54
    Change this:
    Originally Posted by aadebayo
    PHP Code:
    function PDF_Label($format$unit='mm'$posX=1$posY=1) {
             if (
    is_array($format)) {
             
    // Custom format
             
    $Tformat $format;
             } else {
             
    // Built-in format
             
    if (!isset($this->_Avery_Labels[$format]))
             
    $this->Error('Unknown label format: '.$format);
             
    $Tformat $this->_Avery_Labels[$format];
            } 
    To this:
    PHP Code:
    function PDF_Label($format$unit='mm'$posX=1$posY=1) {
             if (
    is_array($format)) {
             
    // Custom format
             
    $Tformat $format;
             } else {
             
    // Built-in format
                      
    if (!isset($this->_Avery_Labels[$format])){
                               
    $this->Error('Unknown label format: '.$format);
                               
    $Tformat $this->_Avery_Labels[$format];
                      }
            } 
    Or, better yet, change the if inside an if to simply an elseif.

    I'm assuming you have a custom format rather than a built in format. If that is true, your $Tformat variable is getting reset to "$this->_Avery_Labels[$format];" every time your code is run because the if statement is only applying to the first line of code after the statement when you omit the braces.

    That may not solve your problem, but it's a start.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    19
    Rep Power
    0
    Thanks SecurityDavid. I have realised that I posted the wrong code . The code that generates the Label Site is below

    PHP Code:
    function Add_Label($text) {
            
    $this->_COUNTY++;
            if (
    $this->_COUNTY == $this->_Y_Number) {
                
    // Row full, we start a new one
                
    $this->_COUNTY=0;
                
    $this->_COUNTY++;
                if ((
    $this->_COUNTX ==0) and ($this->_COUNTY==0)) {
                    
    // End of page reached, we start a new one
                    
    $this->_COUNTX=0;
                    
    $this->AddPage();
                }
            }
            
            
    $_PosY $this->_Margin_Top $this->_COUNTY*($this->_Height+$this->_Y_Space) + $this->_Padding;
            
    $_PosX $this->_Margin_Left $this->_COUNTX*($this->_Width+$this->_X_Space) + $this->_Padding;
            
    $this->SetXY($_PosX$_PosY);
            
    $this->MultiCell($this->_Width $this->_Padding$this->_Line_Height$text0'L');
        } 
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    170
    Rep Power
    54
    You may have to also post the code that calls this function. The part of this that I think is causing you problems is the COUNTX and COUNTY variables that you have here. As far as I can tell from the fpdf manual, those are not standard functions for fpdf. When I have needed to find and alter the X and Y positions in the past, I typically use the built-in GetX and GetY functions.

    Another suggest that may help (I don't really know without seeing the rest) is that when i looked at the label site yesterday, page 2 started correctly because it was generated inside the function. In the function, you have your COUNTX and COUNTY variables set to "0" prior to adding a new page. You should make sure that even though it's a fresh document your new fpdf also has this set.
    PHP Code:
    $pdf = new FPDF();
    $pdf->_COUNTX=0;
    $pdf->_COUNTY=0;
    $pdf->AddPage(); 
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    19
    Rep Power
    0
    Originally Posted by SecurityDavid
    You may have to also post the code that calls this function. The part of this that I think is causing you problems is the COUNTX and COUNTY variables that you have here. As far as I can tell from the fpdf manual, those are not standard functions for fpdf. When I have needed to find and alter the X and Y positions in the past, I typically use the built-in GetX and GetY functions.

    Another suggest that may help (I don't really know without seeing the rest) is that when i looked at the label site yesterday, page 2 started correctly because it was generated inside the function. In the function, you have your COUNTX and COUNTY variables set to "0" prior to adding a new page. You should make sure that even though it's a fresh document your new fpdf also has this set.
    PHP Code:
    $pdf = new FPDF();
    $pdf->_COUNTX=0;
    $pdf->_COUNTY=0;
    $pdf->AddPage(); 

    Thanks SecurityDavid. I have tried your suggestion, but no difference so far.
    The code that calls the LabelTest.php script is below

    PHP Code:


    require('PDF_Label.php');
    $pdf = new PDF_Label('3422');

    $pdf->AddPage('L');

    // Print labels
    for($i=1;$i<=40;$i++) {
        
    $text sprintf("%s\n%s\n%s\n%s %s, %s""Laurent $i"'Immeuble Toto''av. Fragonard''06000''NICE''FRANCE');
        
    $pdf->Add_PDF_Label($text);
    }

    $pdf->Output(); 

    The one calling the Add_PDF_Label with your suggestion is

    PHP Code:

    $this
    ->_COUNTY++;
            if (
    $this->_COUNTY == $this->_Y_Number) {
                
    // Row full, we start a new one
                
    $this->_COUNTY=0;
                
    $this->_COUNTX++;
                if (
    $this->_COUNTX == $this->_X_Number) {
                    
    // End of page reached, we start a new one
                    //$this->_COUNTX=0;
                    //$this->AddPage();
                     
    $pdf = new FPDF();
                     
    $this->_COUNTX=0;
                     
    $this->_COUNTY=0;
                     
    $this->AddPage();  
                }
            }
            
            
    $_PosY $this->_Margin_Top $this->_COUNTY*($this->_Height+$this->_Y_Space) + $this->_Padding;
            
    $_PosX $this->_Margin_Left $this->_COUNTX*($this->_Width+$this->_X_Space) + $this->_Padding;
            
    $this->SetXY($_PosX$_PosY);
            
    $this->MultiCell($this->_Width $this->_Padding$this->_Line_Height$text0'L'); 
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    170
    Rep Power
    54
    Try it this way:
    PHP Code:
    require('PDF_Label.php');
    $pdf = new PDF_Label('3422');
    //Add the COUNTX and COUNTY resets here, not in the label function.
    $pdf->_COUNTX=0;
    $pdf->_COUNTY=0;
    $pdf->AddPage('L');

    // Print labels
    for($i=1;$i<=40;$i++) {
        
    $text sprintf("%s\n%s\n%s\n%s %s, %s""Laurent $i"'Immeuble Toto''av. Fragonard''06000''NICE''FRANCE');
        
    $pdf->Add_PDF_Label($text);
    }

    $pdf->Output(); 
    PHP Code:

    $this
    ->_COUNTY++;
            if (
    $this->_COUNTY == $this->_Y_Number) {
                
    // Row full, we start a new one
                
    $this->_COUNTY=0;
                
    $this->_COUNTX++;
                if (
    $this->_COUNTX == $this->_X_Number) {
                    
    // End of page reached, we start a new one
                    
    $this->_COUNTX=0;
                    
    $this->AddPage();
                     
    //This is not correct here. Leave this how you had it before. I intended this to go in the script above that calls the function.
                     //$pdf = new FPDF();
                     //$this->_COUNTX=0;
                     //$this->_COUNTY=0;
                     //$this->AddPage();  
                
    }
            }
            
            
    $_PosY $this->_Margin_Top $this->_COUNTY*($this->_Height+$this->_Y_Space) + $this->_Padding;
            
    $_PosX $this->_Margin_Left $this->_COUNTX*($this->_Width+$this->_X_Space) + $this->_Padding;
            
    $this->SetXY($_PosX$_PosY);
            
    $this->MultiCell($this->_Width $this->_Padding$this->_Line_Height$text0'L'); 

    Comments on this post

    • aadebayo agrees : Thanks for this post
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    19
    Rep Power
    0
    [PHP]
    Originally Posted by SecurityDavid
    Try it this way:
    PHP Code:
    require('PDF_Label.php');
    $pdf = new PDF_Label('3422');
    //Add the COUNTX and COUNTY resets here, not in the label function.
    $pdf->_COUNTX=0;
    $pdf->_COUNTY=0;
    $pdf->AddPage('L');

    // Print labels
    for($i=1;$i<=40;$i++) {
        
    $text sprintf("%s\n%s\n%s\n%s %s, %s""Laurent $i"'Immeuble Toto''av. Fragonard''06000''NICE''FRANCE');
        
    $pdf->Add_PDF_Label($text);
    }

    $pdf->Output(); 
    PHP Code:

    $this
    ->_COUNTY++;
            if (
    $this->_COUNTY == $this->_Y_Number) {
                
    // Row full, we start a new one
                
    $this->_COUNTY=0;
                
    $this->_COUNTX++;
                if (
    $this->_COUNTX == $this->_X_Number) {
                    
    // End of page reached, we start a new one
                    
    $this->_COUNTX=0;
                    
    $this->AddPage();
                     
    //This is not correct here. Leave this how you had it before. I intended this to go in the script above that calls the function.
                     //$pdf = new FPDF();
                     //$this->_COUNTX=0;
                     //$this->_COUNTY=0;
                     //$this->AddPage();  
                
    }
            }
            
            
    $_PosY $this->_Margin_Top $this->_COUNTY*($this->_Height+$this->_Y_Space) + $this->_Padding;
            
    $_PosX $this->_Margin_Left $this->_COUNTX*($this->_Width+$this->_X_Space) + $this->_Padding;
            
    $this->SetXY($_PosX$_PosY);
            
    $this->MultiCell($this->_Width $this->_Padding$this->_Line_Height$text0'L'); 
    SecurityDavid

    Thanks a million times for your help, all I had to do is make a minor change and it worked perfectly. I am exceptionally grateful. Below is the new code just in case anyone else needs it. I have applied it to my database record (again I changed it slightly) and it works. Below is the pdf_label code



    PHP Code:
    function Add_Label($texte) {
            
    // We are in a new page, then we must add a page
             
    $this->_COUNTY++;
            if (
    $this->_COUNTY == $this->_Y_Number) {
                
    // Row full, we start a new one
                
    $this->_COUNTY=0;
                
    $this->_COUNTX++;
                if (
    $this->_COUNTX == $this->_X_Number) {
                    
    // End of page reached, we start a new one
                    //$pdf = new FPDF();
                    
    $this->_COUNTX=0;
                    
    $this->AddPage();
                     
    //This is not correct here. Leave this how you had it before. I intended this to go in the script above that calls the function.
                     //$pdf = new FPDF();
                     //$this->_COUNTX=0;
                     //$this->_COUNTY=0;
                     //$this->AddPage();  
                
    }
            }
            
            
    $_PosY $this->_Margin_Top $this->_COUNTY*($this->_Height+$this->_Y_Space) + $this->_Padding;
            
    $_PosX $this->_Margin_Left $this->_COUNTX*($this->_Width+$this->_X_Space) + $this->_Padding;
            
    $this->SetXY($_PosX$_PosY);
            
    $this->MultiCell($this->_Width $this->_Padding$this->_Line_Height$texte0'L');  
        } 

    and below is the code that I applied to the labelTest



    PHP Code:
    require('PDF_Label.php');
    $pdf = new PDF_Label('3422');
    //Add the COUNTX and COUNTY resets here, not in the label function.
    $pdf->_COUNTX=0;
    $pdf->_COUNTY=-1;
    $pdf->AddPage('L');

    // Print labels
    for($i=1;$i<=40;$i++) {
        
    $text sprintf("%s\n%s\n%s\n%s %s, %s""Laurent $i"'Immeuble Toto''av. Fragonard''06000''NICE''FRANCE');
        
    $pdf->Add_Label($text);
    }

    $pdf->Output(); 


    and below is the one that I use for the database values

    PHP Code:
    require('PDF_Label.php');
    // connect to the database
    db_connect($mysql['username'], $mysql['password'], $mysql['database'],$mysql['host']);


    //// if StartPeriod and EndPeriod set displays all records relevant records//////////////////////////////
    $query        "select `members_HouseGroup`.`description` AS `description`,`members_HouseGroup`.`id` AS `housegroupID`,`members_users`.`id` AS `id`,`members_users`.`memberTypeID` AS `memberTypeID`,`members_users`.`firstname` AS `firstname`,`members_users`.`lastname` AS `lastname`,`members_users`.`marital_status` AS `marital_status`,`members_users`.`email` AS `email`,`members_users`.`homephone` AS `homephone`,`members_users`.`businessphone` AS `businessphone`,`members_users`.`mobilephone` AS `mobilephone`,`members_users`.`address1` AS `address1`,`members_users`.`address2` AS `address2`,`members_users`.`towns` AS `towns`,`members_users`.`postCode` AS `postCode`,`members_users`.`relationship` AS `relationship`,`members_users`.`username` AS `username`,`members_users`.`status` AS `status`,`members_users`.`marital_status` AS `marital`, members_memberType.description as MemberType from ((`members_users` left join`members_memberType` on((`members_memberType`.`id` = `members_users`.`memberTypeID`))) left join `members_HouseGroup` on((`members_HouseGroup`.`id` = `members_users`.`housegroupID`)) ) where (`members_users`.`firstname` = '') or ((`members_users`.`memberTypeID` in (select id from members_memberType where housegroupind = 1)) ) and `members_users`.`memberTypeID` > 1 and username not in (select username from members_spouseLink) order by members_users.lastname";
    $queryMember mysql_query("select `members_HouseGroup`.`description` AS `description`,`members_HouseGroup`.`id` AS `housegroupID`,`members_users`.`id` AS `id`,`members_users`.`memberTypeID` AS `memberTypeID`,`members_users`.`firstname` AS `firstname`,`members_users`.`lastname` AS `lastname`,`members_users`.`marital_status` AS `marital_status`,`members_users`.`email` AS `email`,`members_users`.`homephone` AS `homephone`,`members_users`.`businessphone` AS `businessphone`,`members_users`.`mobilephone` AS `mobilephone`,`members_users`.`address1` AS `address1`,`members_users`.`address2` AS `address2`,`members_users`.`towns` AS `towns`,`members_users`.`postCode` AS `postCode`,`members_users`.`relationship` AS `relationship`,`members_users`.`username` AS `username`,`members_users`.`status` AS `status`,`members_users`.`marital_status` AS `marital`, members_memberType.description as MemberType from ((`members_users` left join`members_memberType` on((`members_memberType`.`id` = `members_users`.`memberTypeID`))) left join `members_HouseGroup` on((`members_HouseGroup`.`id` = `members_users`.`housegroupID`)) ) where (`members_users`.`firstname` = '') or ((`members_users`.`memberTypeID` in (select id from members_memberType where housegroupind = 1)) ) and `members_users`.`memberTypeID` > 1 and username not in (select username from members_spouseLink) order by members_users.lastname");
    $result        = @mysql_query($query);
    $row    mysql_fetch_array($result);
    $numberMembers=mysql_num_rows($queryMember);



    // Standard format
    $pdf = new PDF_Label('3422');
    $pdf->_COUNTX=0;
    $pdf->_COUNTY=-1;
    $pdf->AddPage('L');
    //$pdf->AddPage();


    // Print labels

    do {
    //for($i=1;$i<=$numberMembers;$i++) {
        
    $firstname $row['firstname'];
        
    $description $row['description'];
        
    $houseGroup $row['description'];
        if (
    $houseGroup == "NO Housegroup"){
            
    $houseGroup "";
        }
        else
        {
            
    $houseGroup $row['description'];
        }
        
        if ((
    $row['memberTypeID'] > 4) && (!empty($houseGroup)))
        {
        
    $space " ";
        
    $leftBrac "(";
        
    $rightBrac ")";
        
    $HouseGroupType "Leaders";
        
    $houseGroup $houseGroup.$space.$leftBrac.$HouseGroupType.$rightBrac;
        }
        elseif ((
    $row['memberTypeID'] == 4) && (!empty($houseGroup)))
        {
        
    $space " ";
        
    $leftBrac "(";
        
    $rightBrac ")";
        
    $HouseGroupType "Assistant leaders";
        
    $houseGroup $houseGroup.$space.$leftBrac.$HouseGroupType.$rightBrac;
        }
        elseif ((
    $row['memberTypeID'] == 3) && (!empty($houseGroup)))
        {
        
    $space " ";
        
    $leftBrac "(";
        
    $rightBrac ")";
        
    $HouseGroupType "Co leaders";
        
    $houseGroup $houseGroup.$space.$leftBrac.$HouseGroupType.$rightBrac;
        }
        elseif (!empty(
    $houseGroup))
        {
        
    $houseGroup $houseGroup;
        }
        if ((
    $row['memberTypeID'] < 6) || ($row['memberTypeID'] > 8))
        {
            
    $memberTypeDesc "";
        }
        else
        {
        
    $memberTypeDesc $row['MemberType'];
        }
        
        if (
    $housegroupID == 1)
        {
                
    $houseGroup "";
        }
        
        
    $membersSpouse mysql_query("SELECT firstname,email,mobilephone FROM members_users where username in (select username from members_spouseLink where spouseUserID='" $row['username'] . "' and spouseUserID != '' and spouseUserID is not null)");
        while ((
    $rowMemberSpouse mysql_fetch_array($membersSpouse)) != false) {
        
    $spfirstname $rowMemberSpouse['firstname'];

        if (!empty(
    $spfirstname))
        {
        
    $amp " & ";
        
    $firstname $firstname.$amp.$spfirstname;
        
    $spemail $rowMemberSpouse['email'];
        
    $spmobile $rowMemberSpouse['mobilephone'];
        }
        }
        
    $data $firstname ." ";
        
    $data .=  $row['lastname'] ."\n";
        
        
        
    $countChild 0;
        
    $memberChildRecord mysql_query("select `members_users`.`id` AS `id`,`members_users`.`memberTypeID` AS `memberTypeID`,`members_users`.`firstname` AS `firstname`,`members_users`.`lastname` AS `lastname`,`members_users`.`marital_status` AS `marital_status`,`members_users`.`email` AS `email`,`members_users`.`homephone` AS `homephone`,`members_users`.`businessphone` AS `businessphone`,`members_users`.`mobilephone` AS `mobilephone`,`members_users`.`address1` AS `address1`,`members_users`.`address2` AS `address2`,`members_users`.`towns` AS `towns`,`members_users`.`postCode` AS `postCode`,`members_users`.`relationship` AS `relationship`,`members_users`.`username` AS `username`,`members_users`.`status` AS `status`,`members_users`.`marital_status` AS `marital`, group_concat(members_child.cfirstname  ORDER BY members_child.dateOfBirth SEPARATOR ' , ') as child from ((`members_users`  inner join members_child  on (members_child.username=members_users.username) ) ) where  (members_child.username = '" $row['username'] . "'  or (members_child.username1 = '" $row['username'] . "' and members_child.username1 != ''))  and ((`members_users`.`memberTypeID` in (select id from members_memberType where housegroupind = 1)) )  or members_users.firstname is null  group by members_child.username");
        
    $DueSweepDate strftime('%d / %m / %Y',$row ['NextSweepDate']);
        

        


            
        
    //get the spouse firstname
        
        
        //get the children records
         
    while (($rowChild mysql_fetch_array($memberChildRecord)) != false) {
        
    $numberChild=mysql_num_rows($memberChildRecord);
        
    $leftBrac "(";
        
    $rightBrac ")";
        
    $child $rowChild['child'];
        
    $child $leftBrac.$child.$rightBrac;
        if (
    $rowChild['child'])$data .= $child "\n";
        }
        
    $email "email: ";
        
    $phone "phone: ";
        
    $mobile "mobile: ";
        if (
    $row['address1'])$data .= $row['address1'] ."\n";
        if (
    $row['address2'])$data .= $row['address2'] ."\n";
        if (
    $row['towns'])$data .= $row['towns'] ."\n";
        if (
    $row['postCode'])$data .= $row['postCode'] ."\n";
        if (
    $row['homephone'])$data .= $phone.$row['homephone'] ."\n";
        if (
    $row['mobilephone'])$data .= $mobile.$row['mobilephone'] ."\n";
        if (
    $spmobile)$data .= $mobile.$spmobile ."\n";
        
    $spmobile "";
        if (
    $row['email'])$data .= $email.$row['email'] ."\n";
        if (
    $spemail)$data .= $email.$spemail ."\n";
        
    $spemail "";
        if (
    $houseGroup)$data .= $houseGroup ."\n";
        if (
    $row['memberTypeDesc'])$data .= $row['memberTypeDesc'] ."\n";
        
    $spemail "";
        
    $query = ($data);
        
        
    $text sprintf($query);    
        
        
    $pdf->Add_Label($text);
        
    } while (
    $row mysql_fetch_array($result));

    $pdf->Output(); 
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    3
    Rep Power
    0

    reviving this thread


    I know this thread is almost a month old, but I found it while searching for a way to do exactly what it appears this thread is covering.

    My basic question before I invest alot of time in trying to make this work for me is this...

    Is this designed to be able to be used for multiple situations with different avery forms, or is all of the code geared only for a specific application and only for a single form, the 3422 pdf label defined...?

    I need to be able to extract mailing information from a mysql DB of product purchases and deliver them to the product fulfillment center in a format that they can simply print them to the avery 5160 label sheet 3 across and 10 up.

    I've determined the best, most accurate output would be by creating a pdf and sending it to them to print.

    Is this a possible outcome of these scripts, or should I keep looking...

    Thanks in advance for your response.

    Douglas
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2011
    Posts
    19
    Rep Power
    0
    Originally Posted by Showman13
    I know this thread is almost a month old, but I found it while searching for a way to do exactly what it appears this thread is covering.

    My basic question before I invest alot of time in trying to make this work for me is this...

    Is this designed to be able to be used for multiple situations with different avery forms, or is all of the code geared only for a specific application and only for a single form, the 3422 pdf label defined...?

    I need to be able to extract mailing information from a mysql DB of product purchases and deliver them to the product fulfillment center in a format that they can simply print them to the avery 5160 label sheet 3 across and 10 up.

    I've determined the best, most accurate output would be by creating a pdf and sending it to them to print.

    Is this a possible outcome of these scripts, or should I keep looking...

    Thanks in advance for your response.

    Douglas
    Douglas

    You can customise the file to suit what you need. All you have to do is use the 5160 in place of the 3422 that I used. I do not know if I have answered your question?
  18. #10
  19. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by aadebayo
    Douglas

    You can customise the file to suit what you need. All you have to do is use the 5160 in place of the 3422 that I used. I do not know if I have answered your question?
    Yes, that was basically my question, and the answer I was hoping for.. Now I will take the time to see how I can implement it in my program.

    Thanks
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    3
    Rep Power
    0

    Clearly, it is unclear to me


    Originally Posted by Showman13
    Yes, that was basically my question, and the answer I was hoping for.. Now I will take the time to see how I can implement it in my program.

    Thanks

    OK, after uploading and testing the pdf_label.php and the labelTest.php, I find that I don't really know what I'm looking at, or doing...

    My thought was that I could upload those two files and then go to the labelTest.php and it would display on the screen the test page of labels, but that didn't happen..

    All I get is a blank page...

    I know I'm missing something and it will most likely be very simple, Just not seeing what it is at this point.

    In looking over this code in pdf_label, I don't see where some of the variable assignments come from

    PHP Code:
    $_PosY $this->_Margin_Top $this->_COUNTY*($this->_Height+$this->_Y_Space) + $this->_Padding;
    $_PosX $this->_Margin_Left $this->_COUNTX*($this->_Width+$this->_X_Space) + $this->_Padding;
    $this->SetXY($_PosX$_PosY);
    $this->MultiCell($this->_Width $this->_Padding$this->_Line_Height$texte0'L'); 
    Part of the problem is trying to understand something that I have never worked with before, using the ($this->) has never been a part of my programming experience.

    Any help or direction that you could provide would be greatly appreciated.

    Thanks
    Douglas
  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    170
    Rep Power
    54
    Originally Posted by Showman13
    OK, after uploading and testing the pdf_label.php and the labelTest.php, I find that I don't really know what I'm looking at, or doing...
    Just so there is not any misunderstanding of what we're doing here, the script above is based on FPDF from here with an add-on from here . This is a customization, not a stand alone script. Please review the documentation on each of these links. Then if you run into problems implementing it, please post your specific issue in a new thread.
  24. #13
  25. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    1
    Rep Power
    0
    Did you ever find a solution to producing 5160 pdf labels?
    I too am looking to do this


    Originally Posted by Showman13
    OK, after uploading and testing the pdf_label.php and the labelTest.php, I find that I don't really know what I'm looking at, or doing...

    My thought was that I could upload those two files and then go to the labelTest.php and it would display on the screen the test page of labels, but that didn't happen..

    All I get is a blank page...

    I know I'm missing something and it will most likely be very simple, Just not seeing what it is at this point.

    In looking over this code in pdf_label, I don't see where some of the variable assignments come from

    PHP Code:
    $_PosY $this->_Margin_Top $this->_COUNTY*($this->_Height+$this->_Y_Space) + $this->_Padding;
    $_PosX $this->_Margin_Left $this->_COUNTX*($this->_Width+$this->_X_Space) + $this->_Padding;
    $this->SetXY($_PosX$_PosY);
    $this->MultiCell($this->_Width $this->_Padding$this->_Line_Height$texte0'L'); 
    Part of the problem is trying to understand something that I have never worked with before, using the ($this->) has never been a part of my programming experience.

    Any help or direction that you could provide would be greatly appreciated.

    Thanks
    Douglas

IMN logo majestic logo threadwatch logo seochat tools logo