I am converting my html template to Pdf in Angular. But there is no problem when it is a 7 page pdf. When it's more than 7 pages, the pdf is blank. Page count is output but data is not coming. I couldn't figure out what the problem was, nor am I getting an error. I'm checking my services, my queries are dropping successfully. A front screen opens where I see my html template, and data comes in there. But after a certain page the pdf is blank.`
Thank you, for your help.
I don't get an error either, but strangely 8 pages and then the pdf is blank.
My html template ;
<mat-dialog-content class="print-content" id="print-content">
<div id="print-section">
<table *ngIf="table" class="print-table" id="print-table">
<tr>
<span *ngFor="let row of table;let indexOfCard=index;" >
<span *ngIf="indexOfCard % 2 == 0 && indexOfCard>0"><tr></tr></span>
<td class="print-card">
<table style="border-collapse: separate; border-spacing: 1px 2px;">
<tr rowspan="2" [ngClass]="getHeaderFormat(row.gender,row.departmentID)">
<td colspan="1" > {{row.groupName}} - {{row.shippingCode.toString().padStart(5, "0")}}</td>
<td colspan="6" [ngClass]="getHeaderFormat(row.gender,row.departmentID)"> {{row.staffName}}</td>
</tr>
<tr >
<td colspan="3" [ngClass]="getHeaderFormat(row.gender,row.departmentID)">{{row.departmentName}} {{row.titleName}} {{row.genderName}}</td>
<td colspan="2" [ngClass]="getHeaderFormat(row.gender,row.departmentID)" align="right"> {{row.staffID}}</td>
</tr>
<tr>
<td colspan="2" [ngClass]="getHeaderFormat(row.gender,row.departmentID)">{{row.stationInfo}} {{row.stationName}}</td>
</tr>
<tr>
<td colspan="3">
<table class="report-cell">
<tr *ngFor="let detailList of row.detailList;let indexOfelement=index;">
<ng-container *ngIf="indexOfelement<8 && detailList.quantity>0">
<td [ngClass]="getCellFormat(row.gender,1,row.departmentID)"> {{detailList.generic}}</td>
<td [ngClass]="getCellFormat(row.gender,2,row.departmentID)"> {{detailList.size}}</td>
<td [ngClass]="getCellFormat(row.gender,3,row.departmentID)"> {{detailList.quantity}} Adet</td>
</ng-container>
<span *ngIf="indexOfelement<8 && detailList.quantity<1">
<td [ngClass]="getCellFormat(row.gender,1,row.departmentID)"> </td>
<td [ngClass]="getCellFormat(row.gender,2,row.departmentID)"> </td>
<td [ngClass]="getCellFormat(row.gender,3,row.departmentID)"> </td>
</span>
</tr>
</table>
</td>
<td style="border-left: 1px solid #ddd; padding-left: 10px; vertical-align: top;">
<table class="report-cell">
<ng-container *ngFor="let detailList of row.detailList;let indexOfelement=index;">
<tr *ngIf="indexOfelement>7 && detailList.quantity>0">
<td [ngClass]="getCellFormat(row.gender,1,row.departmentID)"> {{detailList.generic}}</td>
<td [ngClass]="getCellFormat(row.gender,2,row.departmentID)"> {{detailList.size}}</td>
<td [ngClass]="getCellFormat(row.gender,3,row.departmentID)"> {{detailList.quantity}} Adet</td>
</tr>
</ng-container>
</table>
</td>
</tr>
<tr>
<td style="background-color: rgb(252, 252, 252); vertical-align: bottom;"> <img src="./assets/img/thyLogo.jpg" width="50" height="50"/></td>
<td colspan="6">Toplam : {{getTotal(row.detailList)}} Adet</td>
</tr>
</table>
</td>
</span>
</tr>
</table>
---> Html to pdf converter function in Angular
pdfPrint() {
this.exportAsService.save({ type: 'pdf', elementId: 'print-table',options: { jsPDF: {orientation: 'landscape'} }}, this.filename).subscribe(() => {
});
}
Related
Please help me how to align this structure properly. I would like to decrease the size of td "Todays Special" to considerable height. This td grows based on my value say if new fruits added then the header td also grows.
Be kind to help me to resolve this
<table>
<tr>
<td class="title">Todays Special</td>
<td>
<div style="height: 120px; width:100%;overflow-y:auto;">
<table style="height: auto; width:100%;" valign="top">
<tbody>
<tr style="vertical-align: baseline;">
<td colspan="4" class="title">6</td>
<td colspan="4" class="title">mango</td>
</tr>
<tr style="vertical-align: baseline;">
<td colspan="4" class="title">23</td>
<td colspan="4" class="title">orange</td>
</tr>
<tr style="vertical-align: baseline;">
<td colspan="4" class="title">29</td>
<td colspan="4" class="title">banana</td>
</tr>
<tr style="vertical-align: baseline;">
<td colspan="4" class="title">47</td>
<td colspan="4" class="title">papaya</td>
</tr>
<tr style="vertical-align: baseline;">
<td colspan="4" class="title">11959</td>
<td colspan="4" class="title">kiwi</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</table>
If you edit the "Todays Special" td, you can set the desired width and font-size through the style property of the td tag. And also set the alignment you want.
As you are not making a Table header from a row, you have to set different styles to the main td and the rest of the table.
Hope I helped.
Assuming you just want to match the height of the column Todays's Special. You can do this by adding the rowspan according to the no. of items in the list
<td class="title" rowspan="5">Todays Special</td>
<div>
<table style="height: auto;" valign="middle">
<tbody>
<tr>
<td class="title" rowspan="5">Todays Special</td>
<td class="title">6</td>
<td class="title">mango</td>
</tr>
<tr>
<td class="title">23</td>
<td class="title">orange</td>
</tr>
<tr>
<td class="title">29</td>
<td class="title">banana</td>
</tr>
<tr>
<td class="title">47</td>
<td class="title">papaya</td>
</tr>
<tr>
<td class="title">11959</td>
<td >kiwi</td>
</tr>
</tbody>
</table>
</div>
I have created the page in HTML bind the data with angularjs and installed the EPSON TM-T88V receipt printer.
I want to use the default fonts from fonts list . I have tried to use another font like Verdana, sans-serif etc but my receipt is getting faded print
Is there any Idea please suggest me.? Thanks in advance.
<div id="section-to-print" style="width:350px;" class="container-fluid padding-2 inner">
<!--Printing Summary-->
<div *ngFor="let data of data; let ticketIndex = index">
<table width="100%" style="padding:0 8px 8px 8px;" id="section-to-print-{{ticketIndex}}">
<tr>
<td>
<table style="text-align: center; font-size: 16px; font-family:courier; text-transform: uppercase;" width="100%">
<tr>
<td width="100%">
<h1 style="text-transform: uppercase;" class="text-capitalize">{{storeDetail.name}}</h1>
</td>
</tr>
<tr>
<td width="100%">
<span>{{storeDetail.address}}</span>
</td>
</tr>
<tr>
<td width="100%">
<span>{{storeDetail.city}} , {{storeDetail.zipCode}}</span>
</td>
</tr>
<tr>
<td width="100%">
<b>
<span>{{storeDetail.phoneNumber}}</span>
</b>
</td>
</tr>
<tr>
<td width="100%">
<span class="text-capitalize" style="font-size: 40px; font-weight: bolder; background-color: black; color: white;">{{data.ticketId}}</span>
</td>
</tr>
<tr>
<td class="padding-0 text-capitalize margin-top-10" style="text-transform: uppercase;">
<b style="font-size:20px;">{{data?.customer?.firstName}} {{data?.customer?.lastName}}</b>
</td>
</tr>
<tr *ngIf="data?.customer?.address">
<td>
{{data?.customer?.address}}
</td>
</tr>
<tr *ngIf="data?.customer?.email">
<td>
{{data?.customer?.email}}
</td>
</tr>
<tr *ngIf="data?.customer?.mobileNo">
<td>
<b>{{data?.customer?.mobileNo}}</b>
</td>
</tr>
<tr style="text-align:right;">
<td>
Rack : __________
</td>
</tr>
<tr>
<td>
{{data.createdOn | date}}
</td>
</tr>
<tr>
<td>
<strong>Operator : {{data?.createdUser?.fullName}}</strong>
</td>
</tr>
</table>
<table style="border-top: 2px dashed black;border-bottom: 2px dashed black; font-size: 16px; font-family:courier;"
width="100%">
<thead style="border-top: 2px dashed black;">
<th style="text-align:left" width="50%">Item</th>
<th width="25%">Quantity</th>
<th style="text-align: right" width="25%">Price</th>
</thead>
<tbody style="border-top: 2px dashed black;" width="100%" *ngFor="let item of data?.list; let i = index" [ngClass]="!item.isDeleted ? '' : 'hide' ">
<tr>
<td style="text-align:left" width="50%">
<span class="bulk-item" *ngIf="item.extras?.isBulkItem">Bulk Items</span>
<!--strong style="text-transform:capitalize">{{item.catName}}</strong-->
<span style="text-transform:capitalize" *ngIf="item.catName !== null"></span>{{item.name}}
<span *ngIf="item.modifierType !== null"></span>
<strong>{{item.modifierType}}</strong>
</td>
<td width="25%">
<span *ngIf="item.cartQty >= 1">{{item.cartQty}}</span>
</td>
<td style="text-align: right" width="25%">
<strong *ngIf="!item.isFuturePrice">{{item.finalPrice | currency:'USD':true:'1.2-2'}}</strong>
<strong *ngIf="item.isFuturePrice">*****</strong>
</td>
</tr>
<tr *ngIf="(item.extras?.repairCharges?.length > 0 || item.extras?.upCharges?.length > 0) && item.cartQty > 1">
<td style="text-transform:capitalize">Base Price</td>
<td></td>
<td style="text-align: right">
<span *ngIf="!item.isFuturePrice">{{item.price | currency:'USD':true:'1.2-2'}}</span>
<span *ngIf="item.isFuturePrice">*****</span>
</td>
</tr>
<tr *ngFor="let repair of item.extras?.repairCharges; let index = index" [ngClass]="!repair.isDeleted ? '' : 'hide' ">
<td class="text-capitalize text-left">{{repair.name}}</td>
<td *ngIf="repair.type === 'AMOUNT'"> </td>
<td *ngIf="repair.type === 'AMOUNT'" style="text-align: right">{{repair.price | currency:'USD':true:'1.2-2'}}</td>
<td *ngIf="repair.type === 'PERCENTAGE'">{{repair.percentage}}%</td>
<td *ngIf="repair.type === 'PERCENTAGE'" style="text-align: right">{{((repair.percentage * item.price) / 100) | currency:'USD':true:'1.2-2'}}</td>
</tr>
<tr *ngFor="let upCharge of item?.extras?.upCharges; let index = index">
<td class="text-capitalize text-left">{{upCharge.name}}</td>
<td *ngIf="upCharge.type === 'AMOUNT'"> </td>
<td *ngIf="upCharge.type === 'AMOUNT'" style="text-align: right">{{upCharge.price | currency:'USD':true:'1.2-2'}}</td>
<td *ngIf="upCharge.type === 'PERCENTAGE'">{{upCharge.percentage}}%</td>
<td *ngIf="upCharge.type === 'PERCENTAGE'" style="text-align: right">{{((upCharge.percentage * item.price) / 100) | currency:'USD':true:'1.2-2'}}</td>
</tr>
<tr *ngIf="item.notes">
<td style="text-transform:capitalize">Notes</td>
<td colspan="2" class="padding-0">{{item.notes}}</td>
</tr>
<tr *ngFor="let coupon of item.extras?.coupons; let index = index">
<td style="text-transform:capitalize">
Coupon - {{coupon.name}}
</td>
<td *ngIf="coupon.type === 'AMOUNT'"> </td>
<td *ngIf="coupon.type === 'AMOUNT'" style="text-align: right">-{{coupon.price | currency:'USD':true:'1.2-2'}}</td>
<td *ngIf="coupon.type === 'PERCENTAGE'">{{coupon.percentage}}% ({{item.cartQty}} X {{((coupon.percentage * item.price) / 100) | currency:'USD':true:'1.2-2'}})</td>
<td *ngIf="coupon.type === 'PERCENTAGE'" style="text-align: right">-{{((coupon.percentage * item.price) / 100) | currency:'USD':true:'1.2-2'}}</td>
</tr>
</tbody>
</table>
<table style="border-bottom: 2px dashed black; font-size: 16px; font-family:courier;" width="100%">
<tr>
<td width="50%">Sub Total :</td>
<td width="50%" style="text-align:right;">{{ data.subTotal | currency:'USD':true:'1.2-2' }}</td>
</tr>
<tr>
<td>Items Total :</td>
<td style="text-align:right;">{{ data.itemsTotal }}</td>
</tr>
<tr>
<td>Taxes (included):</td>
<td style="text-align:right;">{{ data.tax | currency:'USD':true:'1.2-2'}}</td>
</tr>
<tr *ngFor="let extraCharge of data?.extraCharges" [ngClass]="!extraCharge.isDeleted ? '' : 'hide' ">
<td>{{extraCharge.name}}:</td>
<td style="text-align:right;">{{ extraCharge.charges | currency:'USD':true:'1.2-2' }}</td>
</tr>
<tr class="padding-0">
<td class="text-capitalize text-elipsis">
<strong>Discount</strong>
<span *ngIf="data?.discount?.name">- {{data.discount.name}}</span> :
</td>
<td style="text-align:right;" *ngIf="data?.discount?.type === 'AMOUNT'">-{{ data?.discount?.amount | currency:'USD':true:'1.2-2' }}</td>
<td *ngIf="data?.discount?.type === 'PERCENTAGE'"></td>
<td *ngIf="data?.discount?.type === 'PERCENTAGE'" style="text-align:right;">-{{((data?.discount?.percentage * data.subTotal)/100) | currency:'USD':true:'1.2-2'}}
</td>
<td style="text-align:right;" *ngIf="!data?.discount?.type || data?.discount?.type === null" style="text-align:right;">-{{ 0 | currency:'USD':true:'1.2-2' }}
</td>
</tr>
<tr class="padding-0">
<td>
<strong>Grand Total :</strong>
</td>
<td style="text-align:right;">
<strong *ngIf="data?.grandTotal > 0">{{ data.grandTotal | currency:'USD':true:'1.2-2' }}</strong>
<strong *ngIf="data?.grandTotal == 0">{{ 0 | currency:'USD':true:'1.2-2' }}</strong>
</td>
</tr>
<tr>
<td colspan="3" style="text-align: center; border-top: 2px dashed black;font-size: 21px">
<strong>Delivery Date:</strong>
</td>
</tr>
<tr>
<td colspan="3" style="text-align: center; border-bottom: 2px dashed black;font-size: 21px;">
<strong>{{data?.deliveryDate | date}}</strong>
</td>
</tr>
<tr style="border-top: 2px dashed black;">
<td colspan="3" width="100%">
<ngx-barcode *ngIf="data?.barcode != 0" [bc-value]="data?.barcode" [bc-display-value]="true" [bc-format]="CODE128"></ngx-barcode>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
use php print option. you can change font size and font family also..
here the sample php code...
<?php
header('Content-Type: text/plain; charset=UTF-8');
$printer = "\\\\BALA\\EPSON TM-T88IV Receipt";
$handle = printer_open($printer);
printer_start_doc($handle,"Testpage");
printer_start_page($handle);
$font = printer_create_font("Arial", 20, 10, 700, false, false, false, 0);
$pen = printer_create_pen(PRINTER_PEN_DOT, 1, "000000");
printer_select_pen($handle, $pen);
printer_select_font($handle, $font);
printer_draw_text($handle, "welcome", 10, 10);
printer_delete_font($font);
printer_delete_pen($pen);
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
?>
I am building a page which will be holding a bunch of "leaderboard" style lists. During the development process everything was going well until I got to this latest section.
For some reason, even though each section is pretty much identical (aside from the actual numbers on the lists) this particular part breaks the layout.
Here is a JSFiddle of how it looked up the point where it broke:
https://jsfiddle.net/b91s32w8/
And here is a JSFiddle of how it looks now after adding in the code that broke it:
https://jsfiddle.net/w6rbx080/
The odd part is - that never happened until the following piece of code was added:
<table class="toplist-data">
<tbody class="toplist-body">
<th class="toplist-left"> No. </th>
<th class="toplist-middle"> Chat Name </th>
<th class="toplist-right"> Profile Visits </th>
<tr class="toplist-row">
<td class="toplist-data-left"> 1. </td>
<td class="toplist-data-middle"> SomeRandomChatter </td>
<td class="toplist-data-right"> 300 </td>
</tr>
<tr class="toplist-row">
<td class="toplist-data-left"> 2. </td>
<td class="toplist-data-middle"> SomeRandomChatter </td>
<td class="toplist-data-right"> 250 </td>
</tr>
<tr class="toplist-row">
<td class="toplist-data-left"> 3. </td>
<td class="toplist-data-middle"> SomeRandomChatter </td>
<td class="toplist-data-right"> 200 </td>
</tr>
<tr class="toplist-row">
<td class="toplist-data-left"> 4. </td>
<td class="toplist-data-middle"> SomeRandomChatter </td>
<td class="toplist-data-right"> 170 </td>
</tr>
<tr class="toplist-row">
<td class="toplist-data-left"> 5. </td>
<td class="toplist-data-middle"> SomeRandomChatter </td>
<td class="toplist-data-right"> 150 </td>
</tr>
<tr class="toplist-row">
<td class="toplist-data-left"> 6. </td>
<td class="toplist-data-middle"> SomeRandomChatter </td>
<td class="toplist-data-right"> 120 </td>
</tr>
<tr class="toplist-row">
<td class="toplist-data-left"> 7. </td>
<td class="toplist-data-middle"> SomeRandomChatter </td>
<td class="toplist-data-right"> 110 </td>
</tr>
<tr class="toplist-row">
<td class="toplist-data-left"> 8. </td>
<td class="toplist-data-middle"> SomeRandomChatter </td>
<td class="toplist-data-right"> 90 </td>
</tr>
<tr class="toplist-row">
<td class="toplist-data-left"> 9. </td>
<td class="toplist-data-middle"> SomeRandomChatter </td>
<td class="toplist-data-right"> 50 </td>
</tr>
<tr class="toplist-row">
<td class="toplist-data-left"> 10. </td>
<td class="toplist-data-middle"> SomeRandomChatter </td>
<td class="toplist-data-right"> 25 </td>
</tr>
</tbody>
</table>
What I find strange about that is that piece of code uses the exact same CSS styling as the corresponding code from each of the other (working) sections. That CSS is as follows:
/* Individual TopList Tables */
table.toplist-data {
font-size: 14px;
width: 100%;
}
table.toplist-data th {
font-weight: bold;
padding-bottom: 5px;
margin-bottom: 5px;
}
.toplist-left, .toplist-data-left {
width: 5%;
text-align: left;
}
.toplist-middle, .toplist-data-middle {
width: 70%;
text-align: left;
padding-left: 20px;
}
.toplist-right, .toplist-data-right {
width: 20%;
text-align: right;
}
So if I can use that twice already without it breaking the layout, why is it breaking it on the third section? I can't see it being anything to do with the actual data within the table because it's pretty much identical.
Perhaps the answer is something so obvious I'm overlooking it, I don't know.
I think it's fixed when I removed display: table from .TLtabs
I actually fixed this myself shortly after posting by removing a "whitespace: nowrap" style that I had on a parent element.
As for the person who edited my question - Perhaps you'd like to explain what was wrong with me saying please and showing a bit of courtesy and politeness? And before you go correcting other people's grammar perhaps you should check your own! Read what you edited the title of my question to and come back to me when you spot your mistake!
I am generating a PDF document using DOMPDF.
The html that is being 'printed to PDF' renders as expected in a browser.
However when using DOMPDF the CSS layout is ignored. Note: When using inline CSS <td style="width:2cm;"> the document renders properly. The desired and resulting outputs are shown below. As is a snippet of the code that renders improperly.
Thanks,
Desired Output:
DOMPDF Output:
<style type="text/css">
td {
display: table-cell;
vertical-align: top;
}
.num {
width: 1cm;
}
.spc {
width: 2cm;
}
.quanda {
width: 8cm;
}
</style>
<div>
<h1>Demographics</h1>
</div>
<div>
<hr/>
</div>
<div>
<table>
<tbody>
<tr>
<td class="num">1)</td>
<td class="quanda">Study ID</td>
<td class="spc"> </td>
<td class="quanda">2349723</td>
</tr>
<tr>
<td class="num">2)</td>
<td class="quanda">Date subject signed consent</td>
<td class="spc"> </td>
<td class="quanda">12 March 2012</td>
</tr>
<tr>
<td class="num">3)</td>
<td class="quanda">Upload the patient's consent form</td>
<td class="spc"> </td>
<td class="quanda">Uploaded: URL: </td>
</tr>
<tr>
<td class="num">4)</td>
<td class="quanda">First Name</td>
<td class="spc"> </td>
<td class="quanda">Bob</td>
</tr>
<tr>
<td class="num">5)</td>
<td class="quanda">Last Name</td>
<td class="spc"> </td>
<td class="quanda">Dylan</td>
</tr>
</tbody>
</table>
</div>
I want to create a normal table. But I need to put two fields in one row.
So, I used rowspan and expected to have a two row table, but with a space of fourth.
But, it's showed in only one line.
I revised, and look for something wrong, but I dont unerstaing.
When I remove the rowspan, everything looks normal, but I need the rowspan.
Why is render in one row?
<table class="table table-bordered">
<tbody>
<tr class="warning" >
<td rowspan="2" >100</td>
<td rowspan="2">87</td>
<td rowspan="2">FERNANDO RODRIGUEZ</td>
<td rowspan="2"></td>
<td rowspan="2">MARIANO ORTEGA SANCHEZ</td>
<td rowspan="2" > </td>
<td rowspan="2" > </td>
<td rowspan="2">
<span class="label label-info">
Importacion
Sencillo
</span>
</td>
<td rowspan="2"> Monterrey </td>
<td rowspan="2" ></td>
<td rowspan="2" ></td>
<td rowspan="2" ></td>
<td rowspan="2">
<a href="/TimsaLzc/web/app_dev.php/main/fleteDetalle/100" >
<button class="btn btn-success">Detalles</button>
</a>
</td>
</tr>
<tr class="warning" >
<td rowspan="2" >101</td>
<td rowspan="2">82</td>
<td rowspan="2">IVAN CORTES</td>
<td rowspan="2"></td>
<td rowspan="2">MARIANO ORTEGA SANCHEZ</td>
<td rowspan="2" > </td>
<td rowspan="2" > </td>
<td rowspan="2">
<span class="label label-info">
Importacion
Sencillo
</span>
</td>
<td rowspan="2"> Nissan Mexico </td>
<td rowspan="2" ></td>
<td rowspan="2" ></td>
<td rowspan="2" ></td>
<td rowspan="2">
<a href="/TimsaLzc/web/app_dev.php/main/fleteDetalle/101" >
<button class="btn btn-success">Detalles</button>
</a>
</td>
</tr>
</tbody>
</table>
This is a picture of my app in action, and the reason of my question.
https://www.dropbox.com/s/1luaxgg4yesm8re/result.png
Replace the rowspans with colspans. For example:
<td colspan="2">
(...)
</td>
EDIT:
Still not 100% sure what you're trying to achieve but as far as I believe you might want to:
remove rowspan from all the td's that are meant to be two-rowed.
add and additional <tr></tr> after each tr and fill it with a number of tds equal to number of cells with rowspan.
I just had a similar problem, try adding an empty Row at the end of the missbehaving Row something like this:
<table class="table table-bordered">
<tbody>
<tr class="warning" >
<td rowspan="2" >100</td>
<td rowspan="2">87</td>
<td rowspan="2">FERNANDO RODRIGUEZ</td>
<td rowspan="2"></td>
<td rowspan="2">MARIANO ORTEGA SANCHEZ</td>
<td rowspan="2" > </td>
<td rowspan="2" > </td>
<td rowspan="2">
<span class="label label-info">
Importacion
Sencillo
</span>
</td>
<td rowspan="2"> Monterrey </td>
<td rowspan="2" ></td>
<td rowspan="2" ></td>
<td rowspan="2" ></td>
<td rowspan="2">
<a href="/TimsaLzc/web/app_dev.php/main/fleteDetalle/100" >
<button class="btn btn-success">Detalles</button>
</a>
</td>
</tr>
<tr /> <!--magic goes here-->
<tr class="warning" >
<td rowspan="2" >101</td>
<td rowspan="2">82</td>
<td rowspan="2">IVAN CORTES</td>
<td rowspan="2"></td>
<td rowspan="2">MARIANO ORTEGA SANCHEZ</td>
<td rowspan="2" > </td>
<td rowspan="2" > </td>
<td rowspan="2">
<span class="label label-info">
Importacion
Sencillo
</span>
</td>
<td rowspan="2"> Nissan Mexico </td>
<td rowspan="2" ></td>
<td rowspan="2" ></td>
<td rowspan="2" ></td>
<td rowspan="2">
<a href="/TimsaLzc/web/app_dev.php/main/fleteDetalle/101" >
<button class="btn btn-success">Detalles</button>
</a>
</td>
</tr>
<tr /> <!--magic goes here-->
</tbody>
</table>
It worked for me :)