barryvdh/dompdf not completely showing data in Laravel - dompdf

i'm working with DomPdf in Laravel. But it not showing all the data.
here's the image (I can't embeded the image because don't have enough reputation) :
IMG1
and this my pdf blade :
body{
background-color: white;
}
.h2pdf{
text-align: center;
}
.h5pdf{
margin-top: -15px;
text-align: center;
}
.devider{
width:100%;
height:10px;
background-color:yellow;
margin-bottom:20px;
margin-top:-10px;
}
.tr-head{
text-align: left;
text-decoration: underline;
text: bold;
font-size: 10px;
height: 1px;
}
.title{
background: #dddddd;
}
.tblpdf{
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
border: 1px solid black;
}
td{
border-left: 1px solid black;
}
.row-fill{
border-bottom: 1px solid black;
}
.page-break {
page-break-after: auto;
}
<body>
<h2 class="h2pdf">Technical Service Report</h2>
<h5 class="h5pdf">Address</h5>
<div class="devider"></div>
<h5 class="h5pdf">TSR No. : {{$head->no_tsr}}</h5>
<table class="tblpdf">
<tr class="title">
<td colspan="3">Customer & Mechanic Detail</td>
</tr>
<tr class="tr-head">
<td>Report By</td>
<td>Mechanic Arrival Date & Time</td>
<td>Technician</td>
</tr>
<tr class="row-fill">
<td>{{$head->report_creator}}</td>
<td>{{date('d-M-Y H:i',strtotime($head->mechanic_arrival_date))}}</td>
<td>{{$head->mechanic_name}}</td>
</tr>
<tr class="tr-head">
<td>Customer</td>
<td>PIC</td>
<td>Site/Province</td>
</tr>
<tr class="row-fill">
<td>{{$head->customer_name}}</td>
<td>{{$head->customer_pic}}</td>
<td>{{$head->customer_site}}</td>
</tr>
<tr class="title">
<td colspan="3">Unit & Failure Detail</td>
</tr>
<tr class="tr-head">
<td>Brand</td>
<td>Model</td>
<td>Category</td>
</tr>
<tr class="row-fill">
<td>{{$head->unit_brand}}</td>
<td>{{$head->unit_model}}</td>
<td>{{$head->unit_category}}</td>
</tr>
<tr class="tr-head">
<td>Serial Number</td>
<td>Hourmeter</td>
<td>Kilometer</td>
</tr>
<tr class="row-fill">
<td>{{$head->unit_sn}}</td>
<td>{{$head->unit_hm}}</td>
<td>{{$head->unit_km}}</td>
</tr>
<tr class="tr-head">
<td>Chasis SN</td>
<td>Engine SN</td>
<td>Machine Application</td>
</tr>
<tr class="row-fill">
<td>{{$head->unit_chasis_sn}}</td>
<td>{{$head->unit_engine_sn}}</td>
<td>{{$head->unit_application}}</td>
</tr>
<tr class="tr-head">
<td>Commisioning Date</td>
<td></td>
<td></td>
</tr>
<tr class="row-fill">
<td>
#if($head->unit_commissioning_date!=NULL)
{{date('d-m-Y',strtotime($head->unit_commissioning_date))}}
#elseif($head->unit_commissioning_date == NULL)
UNKNOWN
#endif
</td>
<td></td>
<td></td>
</tr>
<tr class="tr-head">
<td>Faulty Type</td>
<td>Date & Time of Servicing</td>
<td>Date & Time Completion</td>
</tr>
<tr class="row-fill">
<td>{{$head->faulty_type}}</td>
<td>{{date('d-M-Y H:i',strtotime($head->job_beginning_date))}}</td>
<td>
#if(date('Y-m-d',strtotime($head->job_complete_date))!= '1970-01-01')
{{date('d-m-Y H:i',strtotime($head->job_complete_date))}}
#elseif(date('Y-m-d',strtotime($head->job_complete_date)) == '1970-01-01')
UNFINISHED JOB
#endif
</td>
</tr>
<tr class="tr-head">
<td>Faulty Group</td>
<td>Job Type</td>
<td>Job Status</td>
</tr>
<tr class="row-fill">
<td>{{$head->faulty_group}}</td>
<td>{{$head->job_type}}</td>
<td>{{$head->job_status}}</td>
</tr>
<tr class="tr-head">
<td colspan="3" style="border-top:1px solid black;">Condition</td>
</tr>
<tr class="row-fill">
<td colspan="3">{{$head->unit_condition}}</td>
</tr>
<tr class="title" style="margin-top:5px;">
<td colspan="3">Failure (Complaints)</td>
</tr>
<tr>
<td colspan="3">{!!$head->job_complaint!!}</td>
</tr>
<tr class="title">
<td colspan="3">Failure (Analysis)</td>
</tr>
<tr>
<td colspan="3">{!!$head->job_analysis!!}</td>
</tr>
<tr class="title">
<td colspan="3">Failure (Correction)</td>
</tr>
<tr>
<td colspan="3">{!!$head->job_correction!!}</td>
</tr>
<tr class="title">
<td colspan="3">Failure (Parts)</td>
</tr>
<tr>
<td colspan="3">{!!$head->job_failure_parts!!}</td>
</tr>
</table>
<div class="page-break"></div>
<a>Photo(s)</a>
<table style="text-align:center;border: solid 1px;border-collapse: collapse;">
<tr class="row-fill">
<td colspan="2">
<img src="{{public_path().'/images/TSR/'.$head->url_photo_unit}}" width="350px" height="300px" alt="Unit"><br>Unit
</td>
</tr>
<tr>
<td>
<img src="{{public_path().'/images/TSR/'.$head->url_photo_sn}}" width="350px" height="300px" alt="SN"><br>Serial Number
</td>
<td>
<img src="{{public_path().'/images/TSR/'.$head->url_photo_hm}}" width="350px" height="300px" alt="Hm"><br>Hourmeter
</td>
</tr>
</table>
<div class="page-break"></div>
<table style="border: solid 0.5px;width:100%;text-align: center" >
<tr><td></td></tr>
<?php
$rcount = 0;
foreach($detail as $record){
if ($rcount % 2 == 0){
echo '<tr>';
}
?>
<td>
<img src="{{public_path().'/images/TSR/'.$record->url_photo}}" width="350px" height="300px" alt="image">
<label for="description">{{$record->description}}</label>
</td>
<?php if ($rcount % 2 == 2){
echo '</tr>';
}
$rcount++;
}
//here is a check condition in case you don't have more times multiple of 3 rows
if ($rcount % 2 != 0){
echo '</tr>';
}
?>
</table>
</body>
I already tried the page-break css with :
page-break-before : always
page-break-before : auto
page-break-after : always
page-break-after : auto
But nothing changed. I don't know what the problem is. Please help me, thanks in advance.

I found a way to solve this issue. The data shown completely when we use div instead of table. We just need to add some css on the div so the data will show like we're using table.
Hopefully other people can solve the problem with this method.

Related

Laravel Dompdf Takes too long for exporting image file

I am using the Laravel Dompdf for converting my view to pdf . Everything is works properly before I add the image to the view . After retrieving an image its shows an error of:
Maximum execution time of 60 seconds exceeded
Here is my code
public function GeneratePDF($code)
{
# Retrieve Record for the select Beneficiaries
$beneficiary = Beneficiary::where('code', $code)->firstOrFail();
$mytime = Carbon::now();
$beneficiaryimage = $beneficiary->profile_photo;
$orgimage = $beneficiary->charitableOrganization->profile_photo;
// $familymember = BeneficiaryFamilyInfo::where('beneficiary_id',$beneficiary->id)->get();
if($beneficiary->charitable_organization_id == Auth::user()->charitable_organization_id)
{
// return view('charity.main.beneficiaries.BackupPdf', compact('beneficiary','mytime'));
$pdf = PDF::loadView('charity.main.beneficiaries.BackupPdf', compact('beneficiary','mytime','beneficiaryimage','orgimage'));
return $pdf->download($beneficiary->charitableOrganization->name.'-'.$beneficiary->last_name . ', ' . $beneficiary->first_name . '.pdf');
}
else
{
$toastr = array(
'message' => 'Users can only access their own charity records.',
'alert-type' => 'error'
);
return redirect()->back()->with($toastr);
}
}
My view Page
<!DOCTYPE html>
<html>
<head>
<title>Backup Beneficiary Data as PDF</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<style>
.tableinformation {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 75%;
margin-left: auto;
margin-right: auto;
border-style: none;
}
.tableinformation td
{
border:none;
outline:none;
}
.tableinformation :nth-child(odd) {
width: 40%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
.organization {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 75%;
margin-left: auto;
margin-right: auto;
margin-top: 50px ;
margin-bottom: 50px;
}
.organization td
{
border:none;
outline:none;
}
.family
{
font-family: arial, sans-serif;
border-collapse: collapse;
width: 75%;
margin-left: auto;
margin-right: auto;
margin-top: 50px ;
margin-bottom: 50px;
}
.family th
{
text-align: center;
}
.family td
{
text-align: center;
}
.tableinformation2 {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 75%;
margin-left: auto;
margin-right: auto;
}
.tableinformation2 td ,th
{
border:none;
outline:none;
}
.prepareandnoted
{
font-family: arial, sans-serif;
border-collapse: collapse;
width: 75%;
margin-left: auto;
margin-right: auto;
margin-top: 50px ;
margin-bottom: 50px;
}
.prepareandnoted td
{
text-align: center ;
border:none;
outline:none;
}
.page-break {
page-break-after: always;
}
</style>
<body>
<table class="organization" >
<tr>
<td style="width:30%"><img src="{{ ($beneficiary->charitableOrganization->profile_photo)?url('upload/charitable_org/profile_photo/'.$beneficiary->charitableOrganization->profile_photo):url('upload/charitable_org/profile_photo/no_avatar.png') }}" alt="Charity Organization Profile Photo" width="100px" height="100px"></td>
<td style="text-align: center; font-size: 150%;">{{$beneficiary->charitableOrganization->name}}</td>
</tr>
</table>
<table class="organization">
<tr>
<td > Date: <span style="text-decoration:underline;">{{$mytime->isoFormat('MMMM d, YYYY')}}</span>
<br>
<span>Time: </span><span style="text-decoration:underline;">{{$mytime->format('g:i A');}}</span>
</td>
<td style="width:30%"><img src=" {{ ($beneficiary->profile_photo)?url('upload/charitable_org/beneficiary_photos/'. $beneficiary->profile_photo):url('upload/avatar_img/no_avatar.png') }}" alt="beneficiaries photo" width="150px" height="150px"></td>
</tr>
</table>
<table class="tableinformation">
<tr>
<th colspan="2">I. Identifying Information</th>
</tr>
<tr>
<td>Full name</td>
<td>{{$beneficiary->last_name. ', '.$beneficiary->first_name.' '. $beneficiary->middle_name}}</td>
</tr>
<tr>
<td>Nickname :</td>
<td>{{$beneficiary->nick_name}}</td>
</tr>
<tr>
<td>Date of Birth :</td>
<td>{{Carbon\Carbon::parse($beneficiary->brith_date)->isoFormat('MMMM d, YYYY')}}</td>
</tr>
<tr>
<td>Age During interview :</td>
<td>{{ Carbon\Carbon::parse($beneficiary->birth_date)->diff(Carbon\Carbon::parse($beneficiary->interviewed_at))->y }}
</td>
</tr>
<tr>
<td>Place of Birth :</td>
<td>{{$beneficiary->birth_place}}</td>
</tr>
<tr>
<td>Religion :</td>
<td>{{$beneficiary->religion}}</td>
</tr>
<tr>
<td>Present Address :</td>
<td>{{$beneficiary->presentAddress->region. ' '.$beneficiary->presentAddress->province
.' '.$beneficiary->presentAddress->city.' '.$beneficiary->presentAddress->barangay
.' '.$beneficiary->presentAddress->postal_code}}
</td>
</tr>
<tr>
<td>Permanent Address :</td>
<td>{{$beneficiary->permanentAddress->region. ' '.$beneficiary->permanentAddress->province
.' '.$beneficiary->permanentAddress->city.' '.$beneficiary->permanentAddress->barangay
.' '.$beneficiary->permanentAddress->postal_code}}
</td>
</tr>
<tr>
<td>Provincal Address :</td>
<td>{{$beneficiary->provincialAddress->region. ' '.$beneficiary->provincialAddress->province
.' '.$beneficiary->provincialAddress->city.' '.$beneficiary->provincialAddress->barangay
.' '.$beneficiary->provincialAddress->postal_code}}
</td>
</tr>
<tr>
<td>Educational Attainment :</td>
<td>{{$beneficiary->educational_attainment}}</td>
</tr>
<tr>
<td>Last School Attended :</td>
<td>{{$beneficiary->last_school_year_attended}}</td>
</tr>
<tr>
<td>Contact No. :</td>
<td>{{$beneficiary->contact_no}}</td>
</tr>
</table>
<table class="family">
<tr>
<th colspan="8" style="text-align: left;" >II. Family Composition</th>
</tr>
<tr>
<td>Name</td>
<td>Age</td>
<td>Relationship</td>
<td>Civil Status</td>
<td>Education</td>
<td>Occupation</td>
<td>Income</td>
<td>WhereAbout</td>
</tr>
#foreach ($beneficiary->families as $item)
<tr>
<td style="width: 20%">{{$item->last_name.', '.$item->first_name}}</td>
<td>{{Carbon\Carbon::parse($item->birth_date)->age;}}</td>
<td>{{$item->relationship}}</td>
<td>{{$item->civil_status}}</td>
<td>{{$item->education}}</td>
<td>{{$item->occupation}}</td>
<td>{{$item->income}}</td>
<td> {{ ($item->where_abouts)? $item->where_abouts:'---' }}</td>
</tr>
#endforeach
</table>
<table class="tableinformation2">
<tr>
<th >III. Presented Problem </th>
</tr>
<tr>
<td style=" padding-left: 10%;">
{{$beneficiary->bg_info->problem_presented}}
</td>
</tr>
<tr>
<th>IV. Background Information</th>
</tr>
<tr>
<th style=" padding-left: 8%;">
A. The Client
</th>
</tr>
<tr>
<td style=" padding-left: 10%;">
{{$beneficiary->bg_info->about_client}}
</td>
</tr style="margin-bottom:10px;">
<tr>
<th style=" padding-left: 8%;">
B. The Family
</th>
</tr>
<tr>
<td style=" padding-left: 10%;">
{{$beneficiary->bg_info->about_family}}
</td>
</tr>
<tr>
<th style=" padding-left: 8%;">
C. The Environment
</th>
</tr>
<tr>
<td style=" padding-left: 10%;">
{{$beneficiary->bg_info->about_community}}
</td>
</tr>
<tr>
<th>V. Assessment And Recommendation</th>
</tr>
<tr>
<td>
{{$beneficiary->bg_info->assessment}}
</td>
</tr>
</table>
<table class="prepareandnoted">
<tr >
<td>Prepared By</td>
<td>Noted By</td>
</tr>
<tr>
<td style="text-decoration: underline;">{{$beneficiary->prepared_by}}</td>
<td style="text-decoration: underline;">{{$beneficiary->noted_by}}</td>
</tr>
</table>
</body>
</html>
Ideally , I want to export the file within 5 seconds , is there a way to improve the speed? This is my first time to use something like this to convert pdf . Any answer are appreciated . Thankyou.

Change font weight also change font-family Laravel--dompdf

If I change font weight it also change the font-family of it. How can I stop it
body{
font-family: 'sans-serif';
}
<body>
<table style="width: 100%">
<tr style="font-weight: 500">
<td style="font-size: 11px;">Shipper Account #</td>
<td style="font-size: 12px;">9585558</td>
</tr>
<tr style="font-weight: 500">
<td style="font-size: 11px;">Shipper Account #</td>
<td style="font-size: 12px;">9585558</td>
</tr>
</table>
</body>

Spacing in Email

I have a web version that's displaying fine. When I send a test email, it shows unwanted spacing between the images. I tried changing the the padding and margin , but nothing's working. Why is it doing that?
https://jsfiddle.net/tantalizea/r49oqbjj/
CSS:
a,
body,
div,
img,
span,
table,
td,
tr {
margin: 0;
padding: 0;
border: 0;
}
a {
color: #231F20;
font-weight: bold;
text-decoration: none
}
a[href^="x-apple-data-detectors:"] {
color: inherit;
text-decoration: inherit;
}
area {
outline: none
}
body {
font: normal 100% Arial, Helvetica, sans-serif;
background: #FFF;
color: #231F20
}
img {
border: none;
width: 100%;
height: auto
}
.container {
width: 600px;
margin: 0 auto;
max-width: 600px
}
#preheader {
display: none !important;
visibility: hidden;
opacity: 0;
color: #FFFFFF;
color: transparent;
height: 0;
width: 0;
font-size: 0px
}
.desktop {
display: table !important;
margin: 0 auto !important;
}
tr.desktop {
display: table-row !important
}
td.desktop {
display: table-cell !important
}
img.desktop {
display: inline !important
}
.mobile {
display: none !important
}
.break {
display: inline !important
}
#media screen and (max-width: 600px) {
.container {
width: 97.5%
}
.desktop,
tr.desktop,
td.desktop,
img.desktop {
display: none !important
}
.mobile {
display: table !important
}
tr.mobile {
display: table-row !important
}
td.mobile2 {
display: table !important;
width: 100%;
text-align: center !important
}
td.mobile {
display: table-cell !important
}
.break {
display: none !important
}
.hidden {
display: none !important
}
.no-border {
border: none !important
}
.smaller {
font-size: 200% !important
}
.smaller2 {
font-size: 100% !important
}
.center {
text-align: center !important
}
.margin {
margin: 0 auto
}
.image {
width: 100px !important
}
.width-100 {
width: 100% !important
}
}
HTML:
<body style="background:#FFF; color:#858585">
<div id="preheader" style="display:none; visibility:hidden; opacity:0; color:#878787; color:transparent; height:0; width:0; font-size:0px;">Tuesday, March 7, 2017 | 9840 International Drive, Orlando, Florida | Booth #613</div>
<!-- /div#preheader -->
<div class="container" style="margin:0 auto; max-width:600px">
<table cellpadding="0" cellspacing="0" border="0" align="center" class="container" style="margin:0 auto; max-width:600px">
<tr class="bronto">
<td height="20"></td>
</tr>
<tr class="bronto">
<td align="center"><span style="font:normal 68.75% Helvetica, Arial, sans-serif; color:#858585">Is this email not displaying correctly? Try the web version.</span></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0" width="100%">
<tr>
<td height="20"></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0" width="100%">
<tr>
<td width="35" class="desktop"> </td>
<td align="center">
<table cellpadding="0" cellspacing="0" align="center" border="0" width="100%">
<tr>
<td align="left" valign="bottom" width="76%"><span style="font:normal 300% Times, 'Times New Roman', serif; color:#56565a; line-height:100%" class="smaller"><strong><em>You're Invited!</em></strong></span></td>
<td style="text-align:right" width="24%"><img src="http://www.kravetcontract.com/email_blasts/tipin.png" alt="KK" style="max-width:144px; width:100%" /></td>
</tr>
</table>
</td>
<td width="35" class="desktop"> </td>
</tr>
<!--<tr class="mobile">
<td class="mobile">
<table cellpadding="0" cellspacing="0" align="center" border="0" width="100%" class="mobile">
<tr class="mobile">
<td height="20" class="mobile"></td>
</tr>
<tr class="mobile">
<td align="center" class="mobile"><span style="font:normal 200% Times, 'Times New Roman', serif; color:#57565b;" class="mobile"><strong><em>You're Invited!</em></strong></span></td>
</tr>
</table>
</td>
</tr>-->
</table>
</td>
</tr>
<tr>
<td height="20"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="top"><img src="http://www.kravetcontract.com/email_blasts/newh-2017/top.jpg" alt="Top" style="max-width:600px" /></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" align="center" border="0" width="100%">
<tr>
<td align="left" valign="middle" class="desktop" width="78"><img src="http://www.kravetcontract.com/email_blasts/newh-2017/left.jpg" alt="Left" style="max-width:78px" /></td>
<td align="center" valign="middle" bgcolor="#FFFFFF">
<table cellpadding="0" cellspacing="20" align="center" border="0" width="100%">
<tr>
<td align="center"><span style="font:normal 100% Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#101011; letter-spacing:1px">PLEASE JOIN</span></td>
</tr>
<tr>
<td align="center"><img src="http://www.kravetcontract.com/email_blasts/BDNY2016/logo.png" alt="kravetcontract" style="max-width:280px" /></td>
</tr>
<tr>
<td align="center"><span style="font:normal 100% Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#101011; letter-spacing:1.5px">AT THIS YEAR'S</span></td>
</tr>
<tr>
<td align="center"><img src="http://www.kravetcontract.com/email_blasts/newh-2017/newh_logo_2.png" alt="NEWH" style="max-width:192px" /></td>
</tr>
<tr>
<td align="center" valign="middle"><span style="font:normal 100% Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#101011;letter-spacing:1.5px">MARCH 7, 2017 AT 12PM-6PM<br />
BOOTH #613</span></td>
</tr>
<tr>
<td align="center" valign="middle"><span style="font:normal 81.25% Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#101011; letter-spacing:1.5px">9840 International Drive<br />
Orlando, Florida</span></td>
</tr>
<tr>
<td align="center"><span style="font:normal 100% Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; color:#101011; line-height:21px; letter-spacing:1.5px">We look forward to seeing you.</span></td>
</tr>
</table>
</td>
<td align="right" valign="middle" class="desktop" width="78"><img src="http://www.kravetcontract.com/email_blasts/newh-2017/right.jpg" alt="Right" style="max-width:78px" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="top"><img src="http://www.kravetcontract.com/email_blasts/newh-2017/bottom.jpg" alt="Bottom" style="max-width:600px" /></td>
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#56565a">
<table cellpadding="0" cellspacing="5" align="center" border="0">
<tr>
<td bgcolor="#56565a">GET DIRECTIONS <strong style="font-family:Arial, sans-serif;">►</strong></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td><img src="http://www.kravet.com/style-spotlight/one-family.gif" alt="One Family. Ninety-Eight Years." border="0" style="border:none; width:100%" /></td>
</tr>
<tr>
<td height="10"></td>
</tr>
<tr>
<td align="center"><span style="font:normal 150% Helvetica, Arial, sans-serif; color:#858585"><span style="font:normal 87.5%/4mm Helvetica, Arial, sans-serif; color:#858585">#</span>kravetinc</span>
</td>
</tr>
<tr>
<td height="10"></td>
</tr>
<tr>
<td align="center">
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tr>
<td>
<img src="http://www.kravet.com/style-spotlight/instagram.gif" alt="Instagram" border="0" style="border:none; width:100%; max-width:50px" />
</td>
<td width="10"> </td>
<td>
<img src="http://www.kravet.com/style-spotlight/facebook.gif" alt="Facebook" border="0" style="border:none; width:100%; max-width:50px" />
</td>
<td width="10"> </td>
<td>
<img src="http://www.kravet.com/style-spotlight/pinterest.gif" alt="Pinterest" border="0" style="border:none; width:100%; max-width:50px" />
</td>
<td width="10"> </td>
<td>
<img src="http://www.kravet.com/style-spotlight/twitter.gif" alt="Twitter" border="0" style="border:none; width:100%; max-width:50px" />
</td>
<td width="10"> </td>
<td>
<img src="http://www.kravet.com/style-spotlight/houzz.gif" alt="Houzz" border="0" style="border:none; width:100%; max-width:50px" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="10"></td>
</tr>
<tr>
<td align="center">e-designtrade.com</td>
</tr>
<tr>
<td height="40"></td>
</tr>
<tr>
<td align="center"><span style="font:normal 75% Helvetica, Arial, sans-serif; color:#858585">KRAVET® INC | CONTACT US | PRIVACY POLICY</span></td>
</tr>
<tr>
<td align="center"><span style="font:bold 75% Helvetica, Arial, sans-serif; color:#858585">Exclusively Available Through Interior Designers</span></td>
</tr>
<tr>
<td height="40"></td>
</tr>
<tr class="bronto">
<td align="center"><span style="font: normal 68.75% Helvetica, Arial, sans-serif; color: #858585;" xml="lang">This email was sent to %%!contact_email%% by %%!account_organization%%</span></td>
</tr>
<tr class="bronto">
<td align="center"><span style="font: normal 68.75% Helvetica, Arial, sans-serif; color: #858585;" xml="lang">%%!account_address1%% | %%!account_city%%, %%!account_state%% %%!account_zip%%</span></td>
</tr>
<tr class="bronto">
<td align="center"><span style="font:normal 68.75% Helvetica, Arial, sans-serif; color:#858585">Forward to a friend | Manage Preferences | Unsubscribe</span></td>
</tr>
<tr>
<td height="40"></td>
</tr>
</table>
<!-- /table.container -->
</div>
<!-- /div.container -->
</body>
Try using display block on all images.
style="display:block;"
This is a must have on all images.
Cheers
To be quite honest, I actually love the way it looks haha.
But I believe your issue is the img. It's based on the width. The aspect ratio makes the height smaller then the size of the table row. This is probably not the best way to fix it, but after going through a bunch of css changes I couldn't get it to work any other way:
On the specific images. Set the img style to be moved 4 px down:
transform: translateY(4px);
Bottom image, 4 px up:
transform: translateY(-4px);
Ex:
Bottom:
<img src="http://www.kravetcontract.com/email_blasts/newh-2017/bottom.jpg" alt="Bottom" style="max-width:600px;transform: translateY(-4px);">
Should look like this:

Untitled Error comes from coldfusion-ajax

I am getting an error but there is no caption on it. There is a cfloop looping over the result set which comes from a Stored Procedure. Each row makes an AJAX request to another page and fetch some information. In that AJAX called page, CF prints an error. For example, there are 100 rows come from Stored Procedure. While looping through that data set, 2nd and 50th rows throw error but other 98 rows doesnt. Next time 4th, 7th and 15th rows throw error, other 97 doesnt. The message is shown in below.
I have checked my code there is no problem. Moreover there is no stability.
<title>Error Occurred While Processing Request</title>
<font style="COLOR: black; FONT: 16pt/18pt verdana">
The web site you are accessing has experienced an unexpected error.<br>
Please contact the website administrator.
</font>
<br><br>
<table border="1" cellpadding="3" bordercolor="#000808" bgcolor="#e7e7e7">
<tbody><tr>
<td bgcolor="#000066">
<font style="COLOR: white; FONT: 11pt/13pt verdana" color="white">
The following information is meant for the website developer for debugging purposes.
</font>
</td>
</tr><tr>
</tr><tr>
<td bgcolor="#4646EE">
<font style="COLOR: white; FONT: 11pt/13pt verdana" color="white">
Error Occurred While Processing Request
</font>
</td>
</tr>
<tr>
<td>
<font style="COLOR: black; FONT: 8pt/11pt verdana">
<table width="500" cellpadding="0" cellspacing="0" border="0">
<tbody><tr>
<td id="tableProps2" align="left" valign="middle" width="500">
<h1 id="textSection1" style="COLOR: black; FONT: 13pt/15pt verdana">
</h1>
</td>
</tr>
<tr>
<td id="tablePropsWidth" width="400" colspan="2">
<font style="COLOR: black; FONT: 8pt/11pt verdana">
</font>
</td>
</tr>
<tr>
<td height=""> </td>
</tr>
<tr>
<td colspan="2">
<font style="COLOR: black; FONT: 8pt/11pt verdana">
Resources:
<ul>
<li>Check the ColdFusion documentation to verify that you are using the correct syntax.</li>
<li>Search the Knowledge Base to find a solution to your problem.</li>
</ul>
<p>
</p></font></td>
</tr>
<tr>
<td colspan="2">
<table border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">Browser </font></td>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36</font></td>
</tr>
<tr>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">Remote Address </font></td>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">my_ip</font></td>
</tr>
<tr>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">Referrer </font></td>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">http://my_host_ip/path/file.cfm?CFID=1234&CFTOKEN=es785e1ff5b98f53-E3FC4F25-0917-2A90-2CA672635042EEDE</font></td>
</tr>
<tr>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">Date/Time </font></td>
<td><font style="COLOR: black; FONT: 8pt/11pt verdana">31-Jan-17 08:13 AM</font></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<table width="500" cellpadding="0" cellspacing="0">
<tbody><tr>
<td valign="top">
<font style="FONT: 8pt/11pt verdana;">
Stack Trace
</font></td>
</tr>
<tr>
<td id="cf_stacktrace">
<font style="COLOR: black; FONT: 8pt/11pt verdana">
<br>
<br>
<pre>java.util.ConcurrentModificationException
at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:762)
at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:801)
at java.util.WeakHashMap$EntryIterator.next(WeakHashMap.java:799)
at java.util.HashMap.putAll(HashMap.java:523)
at coldfusion.monitor.memory.MemoryTracker.__AW_getAllPrimitiveMap(MemoryTracker.java:92)
at coldfusion.monitor.memory.MemoryTracker.getAllPrimitiveMap(MemoryTracker.java)
at coldfusion.monitor.memory.MemoryTracker.getEstimatedMemory(MemoryTracker.java:117)
at coldfusion.monitor.memory.SessionMemoryMonitor$TopMemoryUsedSessions.compareThreshold(SessionMemoryMonitor.java:166)
at coldfusion.monitor.util.MonitorList.add(MonitorList.java:102)
at coldfusion.monitor.memory.SessionMemoryMonitor.record(SessionMemoryMonitor.java:49)
at coldfusion.monitor.memory.SessionMemoryMonitor.record(SessionMemoryMonitor.java:37)
at coldfusion.monitor.memory.MemoryMonitor.record(MemoryMonitor.java:261)
at coldfusion.monitor.memory.MemoryRequestEventHandler.onRequestComplete(MemoryRequestEventHandler.java:23)
at coldfusion.monitor.event.RequestMonitorEventProcessor.onRequestComplete(RequestMonitorEventProcessor.java:247)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:46)
at coldfusion.filter.PathFilter.__AW_invoke(PathFilter.java:87)
at coldfusion.filter.PathFilter.invoke(PathFilter.java)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
at coldfusion.CfmServlet.__AW_service(CfmServlet.java:200)
at coldfusion.CfmServlet.service(CfmServlet.java)
at coldfusion.bootstrap.BootstrapServlet.__AW_service(BootstrapServlet.java:89)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.__AW_service(FilterChain.java:101)
at jrun.servlet.FilterChain.service(FilterChain.java)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.__AW_invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
</pre></font></td>
</tr>
</tbody></table>
</font>
</td>
</tr>
</tbody></table>
I have installed CF 9.0.2 and problem solved.

Parse table in HTML Agility Pack for WP7

I have following HTML:
<table cellspacing="8" cellpadding="6" border="1" style="color: Black; background-color: LightGoldenrodYellow;
width: 60%;" id="GridView2" rules="all">
<tbody>
<tr style="color: White; background-color: #CF4B0A; font-weight: bold;">
<th align="center" scope="col">
Booked At
</th>
<th align="center" scope="col">
Booked On
</th>
<th align="center" scope="col">
Delivered At
</th>
<th align="center" scope="col">
Delivered On
</th>
<th scope="col">
Details
</th>
</tr>
<tr align="left" style="color: #333333; background-color: #FFFBA1; font-family: Arial;
font-size: Small;">
<td align="center">
Not Available
</td>
<td align="center">
Not Available
</td>
<td align="center">
DATA
</td>
<td align="center">
12/01/2012
</td>
<td>
<a href="javascript:__doPostBack('GridView2$ctl02$LinkButton1','')" id="GridView2_ctl02_LinkButton1">
Details</a>
</td>
</tr>
</tbody>
</table>
I would like to parse the above table using HTML Agility pack. I'm using the HAP solution for WP7, downloaded from Codeplex.
Any quick help will be appreciated.
To parse the HTML, use HAP's HtmlDocument.LoadHtml() function and pass it the actual string. That will give you a DOM with all the HTML objects in it.

Resources