Create custom "labels" template

verzevoul

Member
http://88.198.83.58/~vip/labels/

i need to create a template to print labels (see attached .doc). This template should take only specific columns from the database(map___user_name, map___user_lastname, map___user_address, map___user_tk, map___user_town) and then print them as "labels" in a 3x11 array (see attached .doc). Each label should be like this:


?????? ?????????
???? ????????
70008????????

where->


?????? -> (map___user_name) ?????????->(map___user_lastname)
???? ????????-> (map___user_address)
70008->(map___user_tk)????????->(map___user_town)

i' ve updated "My Sites" with all the credentials you may need.
 

Attachments

  • labels-sample.pdf
    19.3 KB · Views: 450
Copy the list div template, change default_row.php to
Code:
<div id="<?php echo $this->_row->id;?>" class="fabrik_row  <?php echo $this->_row->class;?>" >
 
        <div class="<?php echo $this->cellClass['map___user_name']['class']?>">
            <?php echo $this->_row->data->map___user_name?>
        </div>
 
        <div class="<?php echo $this->cellClass['map___user_lastname']['class']?>">
            <?php echo $this->_row->data->map___user_lastname?>
        </div>
 
        <div class="<?php echo $this->cellClass['map___user_address']['class']?>">
            <?php echo $this->_row->data->map___user_address?>
        </div>
    ----all elements you want to use
 
</div>
Edit template_css.php and set the CSS classes, e.g.
.map___user_address {whatever}

If it's for a screen layout you may use "float", if you want to use this as PDF template you should use absolute positions because dompdf doesn't handle float correctly.
 
Its for a screen layout normally.
? if I print 8000 rows using that template (I ll try it later at night) will all pages have the same margins top bottom while printing next page? I had these problem using another crm asp code.
 
ok, i'm really close to what i want, but, i can't use absolute positioning because every label is getting on top of the others, like a stack. So i tried "display: inline-block; text-align: left;" but some labels are empty (use as PDF template). i suppose this is because of the DOMPDF... or something, please advise what to do. i want to display a 3x11 array (see attachment in the first post). The custom template i'm working right now is called : "div-webintel" and you can see what i get if you hit the PDF button. I'm ONLY interesting in printing PDF.

http://88.198.83.58/~vip/labels/
 
Is this live or test data? I'm reluctant to try this myself, as I don't know if it's live or not, but ... for one or more of the blank labels, can you try replacing the Greek text with English?

I'd like to see if this is an encoding issue.

-- hugh
 
it's not live, you can test as much as you want! the blank labels is not an encoding issue, it started since i used "display: inline-block; text-align: left;". if you use float: left, you'll see all labels displaying fine, but float doesn't work!
 
There is another problem, that forgot to mention... that's really bad... it ruins everything... There are 8000 records we need to print as labels but if you try to print let's say 576 records (or more) it CRASHES! So let me know if there is a possibility to print without first converting to PDF. I need to have a print button (not print through pdf), but just a simple print.
 
I can see that the template is getting better (the way it looks like), but still not seeing any print button. Is this possible anyway? can i get just a simple print button (that works)? Please, let me know if there is a possibility to print without first converting to PDF. But a csv export it's not good enough, because it's not the way i like labels to print. see attached file
 

Attachments

  • labels-sample.pdf
    19.3 KB · Views: 614
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top