You need to sign in to do that
Don't have an account?
Deepu161
why my pdf is not downloading successfully ..?, am getting network error in chrome browser..
<apex:page standardStylesheets="false" id="pge" applyHtmlTag="false" applyBodyTag="false" showHeader="false" standardController="Invoice__c" extensions="showallTimeCatdsCtrl2" renderAs="pdf" cache="false">
<head>
<style>
@page {
margin-top: 7cm;
margin-bottom: 4cm;
@top-center {
content: element(header);
}
@bottom-left {
content: element(footer);
}
}
div.header {
padding: 10px;
position: running(header);
}
div.footer {
display: block;
padding: 1%;
position: running(footer);
}
.pagenumber:before {
content: counter(page);
}
.pagecount:before {
content: counter(pages);
}
div.content {
border-style:
float: left;
width: 100%;
}
</style>
</head>
<!-- 1.HEADER -->
<div class="header">
<apex:image value="{!$Resource.ATSLogo1}" width="240" height="120" style="text-align:center; padding-left:210px; " />
<table style="width:80%;" >
<tr>
<td style="text-align:center; font-size:15px; margin-top:200px;">
<h1 style = "color:#959595;"> <u>INVOICE</u></h1>
</td>
</tr>
</table>
<span style = "font-size:13px;" > <br> <apex:outputText value="{0, date, MMMM d',' yyyy}" >
<apex:param value="{!now()}" />
</apex:outputText></br>
<br> INVOICE#:{!newInvoic.Name}</br>
</span>
<apex:image value="{!$Resource.Logo}" width="11cm" height="29.7" style="margin-left:10.5cm;margin-top:12cm; " />
<!--<apex:outputPanel>
<img src="{!URLFOR($Resource.Logo)}" style="position: fixed; left: 11.5cm; top:19cm; background-repeat:repeat;" width="11cm" height="29.7"/>
</apex:outputPanel>-->
</div>
<!-- 2.FOOTER -->
<div class="footer" style="margin-top:82px;">
<!-- <div style="background-color:#2E3640; color:white; width:70%; height:70px; border-radius:60px;font-size:12px;position:running; top:900px;margin-left:30px;width:92%" ><p><br> Access Technology Solutions Inc. Ph: 1.800.637.9569, Fax: 1.800.637.9569 </br>
<br> </br>
<br> www.Accesstechnologys.com CONFIDENTIAL Email:Info@accesstechnologys.com</br></p></div>
<br> </br>-->
<span style="margin-left:60px;color:#566068;font-size:16px;font-family:Batang;"> P. 800.637.9569 E. info@accesstechnologys.com W. www.accesstechnologys.com
</span>
<br/><br/>
<br/>
<span style="background-color:#0d1428;width:30cm;height:20px;display: block;margin-left:-60px;"></span>
</div>
<!--3.
CONTENT -->
<div class="content">
<p style= "font-size:12px;margin-left:30px;top:10%; "> <b>From :</b> <b> Access Technology Solutions Inc.</b>
<br> 141 W. Jackson Blvd..,</br>
<br> Ste. 3810,</br>
<br> Chicago, IL 60604,</br>
<br> Ph.: (312) 529-5159.</br></p>
<p style= "font-size:12px;margin-left:30px;"> <b> To : {!tcs[0].accountname__c}</b>
<br> {!tcs[0].accountbillingcity__c}</br>
<br> {!tcs[0].accountbillingstate__c}</br>
<br> {!tcs[0].accountbillingcity__c}</br>
<br> {!tcs[0].accountbillingPin__c}</br></p>
<br></br>
<table width="92%" height="auto" style="border:solid #000 0.5px; border-collapse: collapse; font-size:12px;margin-left:30px;">
<tr style ="background-color:#959595; text-align:center;">
<td style="border:solid #000 0.5px; "><b>Project Associate</b></td>
<td style="border:solid #000 0.5px;"><b>Project</b></td>
<td style="border:solid #000 0.5px;"><b>Service Terms</b></td>
<td style="border:solid #000 0.5px;"><b>Due Date</b></td>
</tr>
<apex:repeat value="{!selectedtimecards[0]}" var="sel">
<tr style = "text-align:center;">
<td style="border:solid #000 0.5px; ">{!sel.tc.project__r.owner.Name}</td>
<td style="border:solid #000 0.5px;">{!sel.tc.project__r.name}</td>
<td style="border:solid #000 0.5px;">{!sel.serviceTims}</td>
<td style="border:solid #000 0.5px;"><apex:outputText value="{0,date,MM'/'dd'/'yyyy}" >
<apex:param value="{!sel.tc.Date_Of_Service__c}" />
</apex:outputText></td>
</tr>
</apex:repeat>
</table><br/>
<table class="fixed" width="92%" height="auto" style="border:solid #000 0.5px; border-collapse: collapse; font-size:12px; margin-left:30px;">
<tr style ="background-color:#959595; text-align:center;">
<td style="border:solid #000 0.5px;width: 20%;"><b>Employee Name</b></td>
<td style="border:solid #000 0.5px;width: 20%;"><b>Description</b></td>
<td style="border:solid #000 0.5px;width: 20%;"><b>Hours</b></td>
<td style="border:solid #000 0.5px;width: 20%;"><b>Unit Price</b></td>
<td style="border:solid #000 0.5px;width: 20%;"><b>Amount</b></td>
</tr>
<apex:repeat value="{!selectedtimecardsWrpr}" var="var">
<tr style = "text-align:center;">
<td style="border:solid #000 0.5px;width: 20%;">{!var.empName}</td>
<td style="border:solid #000 0.5px;width: 20%;">{!var.decption}</td>
<td style="border:solid #000 0.5px;width: 20%;">{!var.totHrs}</td>
<td style="border:solid #000 0.5px;width: 20%;">{!var.hoursAndUnitprice}</td>
<td style="border:solid #000 0.5px;width: 20%;">{!var.totalAmt}</td>
</tr>
</apex:repeat>
</table>
<table style="width:17cm; height:auto;margin-left:30px;">
<tr>
<td style = "width:11cm;font-size:15px;">
<br/>
Comments: {!objInvoices.Comments__c}
</td>
<td style="width:7cm;">
<table style="width:103%; border:solid #000 0.5px; border-collapse: collapse; " >
<tr >
<td style="width:50%;font-size:13px;border:solid #000 0.5px;"><b>Total</b></td>
<td style="width:50%;font-size:13px;border:solid #000 0.5px;text-align:center;">$ {!grandTotal}</td>
</tr>
<tr>
<td style="width:50%;font-size:13px; border:solid #000 0.5px;"><b>Payment/Credit</b></td>
<td style="width:50%;font-size:13px; border:solid #000 0.5px;text-align:center;">$ {!payments}</td>
</tr>
<tr>
<td style="width:50%;font-size:13px; border:solid #000 0.5px;"><b>Due</b></td>
<td style="width:50%;font-size:13px; border:solid #000 0.5px;text-align:center;">$ {!grandTotal-payments}</td>
</tr>
</table>
</td>
</tr>
</table>
<!--
<apex:outputLabel ><br>Comments :</br></apex:outputLabel>
<br> <apex:inputTextarea style="width:55%;font-size:13px;" value="{!objInvoices.Comments__c}"/></br>
</apex:pageBlock>-->
<p style="font-size:13px; margin-left:30px;">
<br> Make all checks payable to <b>Access Technology Solutions, Inc</b></br>
<br>Remit your payments to the above address. If wiring, send them to Chase,</br>
<br>Acct# 181395661 R/T Number: 071000013. Chicago, IL 60604 USA</br></p>
<apex:outputText > <h4 style="text-align:center; margin-left:80px;;">
Thank you for your business!</h4></apex:outputText>
</div>
</apex:page>
<head>
<style>
@page {
margin-top: 7cm;
margin-bottom: 4cm;
@top-center {
content: element(header);
}
@bottom-left {
content: element(footer);
}
}
div.header {
padding: 10px;
position: running(header);
}
div.footer {
display: block;
padding: 1%;
position: running(footer);
}
.pagenumber:before {
content: counter(page);
}
.pagecount:before {
content: counter(pages);
}
div.content {
border-style:
float: left;
width: 100%;
}
</style>
</head>
<!-- 1.HEADER -->
<div class="header">
<apex:image value="{!$Resource.ATSLogo1}" width="240" height="120" style="text-align:center; padding-left:210px; " />
<table style="width:80%;" >
<tr>
<td style="text-align:center; font-size:15px; margin-top:200px;">
<h1 style = "color:#959595;"> <u>INVOICE</u></h1>
</td>
</tr>
</table>
<span style = "font-size:13px;" > <br> <apex:outputText value="{0, date, MMMM d',' yyyy}" >
<apex:param value="{!now()}" />
</apex:outputText></br>
<br> INVOICE#:{!newInvoic.Name}</br>
</span>
<apex:image value="{!$Resource.Logo}" width="11cm" height="29.7" style="margin-left:10.5cm;margin-top:12cm; " />
<!--<apex:outputPanel>
<img src="{!URLFOR($Resource.Logo)}" style="position: fixed; left: 11.5cm; top:19cm; background-repeat:repeat;" width="11cm" height="29.7"/>
</apex:outputPanel>-->
</div>
<!-- 2.FOOTER -->
<div class="footer" style="margin-top:82px;">
<!-- <div style="background-color:#2E3640; color:white; width:70%; height:70px; border-radius:60px;font-size:12px;position:running; top:900px;margin-left:30px;width:92%" ><p><br> Access Technology Solutions Inc. Ph: 1.800.637.9569, Fax: 1.800.637.9569 </br>
<br> </br>
<br> www.Accesstechnologys.com CONFIDENTIAL Email:Info@accesstechnologys.com</br></p></div>
<br> </br>-->
<span style="margin-left:60px;color:#566068;font-size:16px;font-family:Batang;"> P. 800.637.9569 E. info@accesstechnologys.com W. www.accesstechnologys.com
</span>
<br/><br/>
<br/>
<span style="background-color:#0d1428;width:30cm;height:20px;display: block;margin-left:-60px;"></span>
</div>
<!--3.
CONTENT -->
<div class="content">
<p style= "font-size:12px;margin-left:30px;top:10%; "> <b>From :</b> <b> Access Technology Solutions Inc.</b>
<br> 141 W. Jackson Blvd..,</br>
<br> Ste. 3810,</br>
<br> Chicago, IL 60604,</br>
<br> Ph.: (312) 529-5159.</br></p>
<p style= "font-size:12px;margin-left:30px;"> <b> To : {!tcs[0].accountname__c}</b>
<br> {!tcs[0].accountbillingcity__c}</br>
<br> {!tcs[0].accountbillingstate__c}</br>
<br> {!tcs[0].accountbillingcity__c}</br>
<br> {!tcs[0].accountbillingPin__c}</br></p>
<br></br>
<table width="92%" height="auto" style="border:solid #000 0.5px; border-collapse: collapse; font-size:12px;margin-left:30px;">
<tr style ="background-color:#959595; text-align:center;">
<td style="border:solid #000 0.5px; "><b>Project Associate</b></td>
<td style="border:solid #000 0.5px;"><b>Project</b></td>
<td style="border:solid #000 0.5px;"><b>Service Terms</b></td>
<td style="border:solid #000 0.5px;"><b>Due Date</b></td>
</tr>
<apex:repeat value="{!selectedtimecards[0]}" var="sel">
<tr style = "text-align:center;">
<td style="border:solid #000 0.5px; ">{!sel.tc.project__r.owner.Name}</td>
<td style="border:solid #000 0.5px;">{!sel.tc.project__r.name}</td>
<td style="border:solid #000 0.5px;">{!sel.serviceTims}</td>
<td style="border:solid #000 0.5px;"><apex:outputText value="{0,date,MM'/'dd'/'yyyy}" >
<apex:param value="{!sel.tc.Date_Of_Service__c}" />
</apex:outputText></td>
</tr>
</apex:repeat>
</table><br/>
<table class="fixed" width="92%" height="auto" style="border:solid #000 0.5px; border-collapse: collapse; font-size:12px; margin-left:30px;">
<tr style ="background-color:#959595; text-align:center;">
<td style="border:solid #000 0.5px;width: 20%;"><b>Employee Name</b></td>
<td style="border:solid #000 0.5px;width: 20%;"><b>Description</b></td>
<td style="border:solid #000 0.5px;width: 20%;"><b>Hours</b></td>
<td style="border:solid #000 0.5px;width: 20%;"><b>Unit Price</b></td>
<td style="border:solid #000 0.5px;width: 20%;"><b>Amount</b></td>
</tr>
<apex:repeat value="{!selectedtimecardsWrpr}" var="var">
<tr style = "text-align:center;">
<td style="border:solid #000 0.5px;width: 20%;">{!var.empName}</td>
<td style="border:solid #000 0.5px;width: 20%;">{!var.decption}</td>
<td style="border:solid #000 0.5px;width: 20%;">{!var.totHrs}</td>
<td style="border:solid #000 0.5px;width: 20%;">{!var.hoursAndUnitprice}</td>
<td style="border:solid #000 0.5px;width: 20%;">{!var.totalAmt}</td>
</tr>
</apex:repeat>
</table>
<table style="width:17cm; height:auto;margin-left:30px;">
<tr>
<td style = "width:11cm;font-size:15px;">
<br/>
Comments: {!objInvoices.Comments__c}
</td>
<td style="width:7cm;">
<table style="width:103%; border:solid #000 0.5px; border-collapse: collapse; " >
<tr >
<td style="width:50%;font-size:13px;border:solid #000 0.5px;"><b>Total</b></td>
<td style="width:50%;font-size:13px;border:solid #000 0.5px;text-align:center;">$ {!grandTotal}</td>
</tr>
<tr>
<td style="width:50%;font-size:13px; border:solid #000 0.5px;"><b>Payment/Credit</b></td>
<td style="width:50%;font-size:13px; border:solid #000 0.5px;text-align:center;">$ {!payments}</td>
</tr>
<tr>
<td style="width:50%;font-size:13px; border:solid #000 0.5px;"><b>Due</b></td>
<td style="width:50%;font-size:13px; border:solid #000 0.5px;text-align:center;">$ {!grandTotal-payments}</td>
</tr>
</table>
</td>
</tr>
</table>
<!--
<apex:outputLabel ><br>Comments :</br></apex:outputLabel>
<br> <apex:inputTextarea style="width:55%;font-size:13px;" value="{!objInvoices.Comments__c}"/></br>
</apex:pageBlock>-->
<p style="font-size:13px; margin-left:30px;">
<br> Make all checks payable to <b>Access Technology Solutions, Inc</b></br>
<br>Remit your payments to the above address. If wiring, send them to Chase,</br>
<br>Acct# 181395661 R/T Number: 071000013. Chicago, IL 60604 USA</br></p>
<apex:outputText > <h4 style="text-align:center; margin-left:80px;;">
Thank you for your business!</h4></apex:outputText>
</div>
</apex:page>
If this error is only for Chrome, then I suggest you refer below link.
https://productforums.google.com/forum/#!topic/chrome/WdIgVUzR9fU
Hope this helps you!
Thanks and Regards
Sandhya