谷歌Chrome打印问题

时间:2012-08-20 14:24:12

标签: jquery html css google-chrome printing

我遇到了Google Chrome特有的问题。这是订单的确认页面。在打印预览中,它显示正常。然而,当我实际打印页面时,所有文本都只是随机符号而没有任何意义。我正在使用UTF-8,就像所有其他工作正常的页面一样。我正式对这个问题感到困惑。

以下是该页面的HTML:

    <%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ include file="/shared/components/imageCacheUrl.jsp" %> 

<!doctype html>
<!--[if lte IE 6 ]><html lang="en" id="ie6"><![endif]-->
<!--[if IE 7 ]><html lang="en" id="ie7"><![endif]-->
<!--[if IE 8 ]><html lang="en" id="ie8"><![endif]-->
<!--[if IE 9 ]><html lang="en" id="ie9"><![endif]-->
<!--[if (gte IE 10)|!(IE)]><!--><html lang="en"><!--<![endif]-->
<head>
    <title>Delta.com - Donate Miles Confirmation</title>
    <link rel="stylesheet" type="text/css" href='<s:url value="/buyGiftTransfer/css/buygifttransferdonate.css"/>' />
    <link rel="stylesheet" type="text/css" href='<s:url value="/buyGiftTransfer/css/donateCss.css"/>' />
</head>
<body class="no-js">
    <jsp:include page="../../tmpl/breadcrumbs/index.jsp"></jsp:include>
    <h1 class="bgt-headerTxt">Donate Miles</h1>
    <div id="ContentWell" class="grid_9 alpha bgt-app">
        <div id="bgt-primarymodule" class="contentWrapper clearfix">
            <div id="bgt-primarymodule-container">
                <!--<jsp:include page="../../tmpl/donate/_primaryModule.tmpl.jsp"></jsp:include>-->
                <!-- fix for Defect ID 10345 -->
                <h2 class="marketingTitle">DONATE MILES. MAKE A DIFFERENCE</h2>
                <p>Not sure what to do with your SkyMiles? Donate them to charity. Whichever charity or charities you choose, your miles will be put to good use. Please read the need-to-knows list before donating.</p>
                <ul>
                    <li>All donations to SkyWish and SkyWish Asia charities are not tax deductible for SkyMiles members or Delta.</li>
                    <li>Maximum of five charities can be selected and processed in one transaction.</li>
                    <li>Once the transaction has been completed, the miles will be transferred to the selected charities and cannot be reversed.</li>
                    <li>SkyMiles account must have sufficient miles to donate. </li>
                    <li>Minimum mileage donation rules apply.  Select individual charity for details.</li>  
                </ul>

            </div>
            <s:fielderror template="inlineerrors" />
        </div>
            <div id="recieptModule" class="contentWrapper">
                <h2 class="contentWrapperHeader">CONFIRMATION</h2>
                <div>
                    <ul id="emailPrint">
                        <li id="print"><a href="javascript:window.print()" class="ir">Print</a></li>
                    </ul>
                </div>
                <div class="sub_container_6">
                    <div class="sub_grid_4 alpha">
                        <hgroup>
                            <h2 class="marketingTitle">Thanks, <strong mpdistrans><s:property value="donateMiles.donateMilesProductType.name.firstName" /> <s:property value="donateMiles.donateMilesProductType.name.lastName" /></strong></h2>
                            <h4 class="marketingSubtitle">for your generous donation of <strong><s:text name="format.number"><s:param value="donateMiles.donateMilesProductType.totalDonateMilesAmount"></s:param></s:text> miles</strong> to these charities:</h4>
                        </hgroup>
                    </div>
                    <div class="sub_grid_2 omega">
                        <p id="transactionDate">Transaction Date: <s:property value="donateMiles.donateMilesProductType.transactionDate" /></p>
                    </div>
                    <div class="clear"></div>

                    <s:iterator value="donateMiles.donateMilesProductType.donateMilesProductResponses">
                        <div class="addedCharityDeets clearfix">
                            <div class="sub_grid_4 alpha">
                                <h4 class="recipientOrgName" mpdistrans>
                                    <s:property value="donateMilesProduct.recipientOrg.description" />
                                    <s:if test="fault.error.errorCode != 0000">
                                        &nbsp;&mdash;&nbsp;<s:property value="fault.error.errorMsg"/>
                                    </s:if> 
                                </h4>
                            </div>
                            <div class="sub_grid_1 giftedSkyMiles">
                                <p class="label">Donated Miles</p>
                                <p class="value"><s:text name="format.number"><s:param value="donateMilesProduct.recipientOrg.milesToDonate"></s:param></s:text><!--20,000 Miles--></p>
<!--                                <div class="grid_4 push_4">
                                        <div class="callout">
                                            <p class="infoicon promoicon">Applied</p>
                                            <div class="infoMessage">
                                                <h5>Promotion</h5>
                                                <p>100% matching miles.</p>
                                                <p><a href="#">See Details</a></p>
                                            </div>
                                        </div>
                                    </div>
-->                             </div>  
                                <s:if test="donateMilesProduct.estimateBonusMiles != 0">
                                <div class="sub_grid_1 omega lastcolumn">
                                    <h5 class="label">Bonus Miles</h5>
                                    <p><s:property value="donateMilesProduct.estimateBonusMiles" /></p>
                                </div>
                            </s:if>
                        </div>
                    </s:iterator>

                    <div id="thankyouMessage" class="sub_grid_3 alpha">
                        <s:if test="donateMiles.donateMilesProductType.totalBonusMiles != 0">
                            <p>As a thank you, we are crediting your account with <s:property value="donateMiles.donateMilesProductType.totalBonusMiles" /> bonus miles. <s:a href="#" cssClass="ir help" >Help</s:a><!--<a class="ir help">Help</a>--></p>
                        <s:else>&nbsp;</s:else>
                        </s:if>
                    </div>
                    <!-- div id="transactionSummary" class="sub_grid_3 omega">
                        <dl>
                            <dt class="sub_grid_2 alpha">TOTAL DONATED MILES</dt>
                            <dd class="sub_grid_1 omega"><s:property value="donateMiles.donateMilesProductType.totalDonateMilesAmount" /></dd>
                            <dt class="sub_grid_2 alpha">New SkyMiles Balance</dt>
                            <dd class="sub_grid_1 omega"><s:property value="donateMiles.donateMilesProductType.memberAvailableBalance" /></dd>
                        </dl>
                        <p>We'll send a copy of this transaction to your current email address that we have on file.</p>
                    </div -->
                    <div id="transactionSummary" class="bgt-transSummary">
                        <dl>
                            <div class="row">
                                <dt>TOTAL DONATED MILES</dt>
                                <dd id="totalDonatedMiles"><s:text name="format.number"><s:param value="donateMiles.donateMilesProductType.totalDonateMilesAmount"></s:param></s:text></dd>
                            </div>
                            <div class="row">
                                <dt class="bottomLine">New SkyMiles Balance</dt>
                                <dd id="totalDonatedMiles" class="bottomLine"><s:text name="format.number"><s:param value="donateMiles.donateMilesProductType.memberAvailableBalance"></s:param></s:text></dd>
                            </div>
                        </dl>
                        <div class="textSummary"><p>A confirmation email will be sent to the email address associated with the SkyMIles account.</p></div>
                    </div>
                </div>
                <div class="clear"></div>
                <!-- Defect 9945 -->
                <div class="contentWrapperFooter">
                <p id="returnToLandingPage"><a href="index.action">Return to Buy, Gift, Transfer</a></p>                
            </div>
            </div><!-- End div.content -->
        </div>      
    <script src='<s:url value="/buyGiftTransfer/js/delta.bgt.common.js"/>' type="text/javascript"></script>
    <jsp:include page="/components/omniture/buyGiftTransferDonate.jsp"></jsp:include>
    <script id="renderFunction">
        $('#primaryModuleContainer').html($('#_primaryModule_loggedIn').render());
        $('#renderFunction').remove();
    </script>
    <jsp:include page="/components/omniture/buyGiftTransferDonate_errors.jsp"></jsp:include>
    <script src='<s:url value="/buyGiftTransfer/js/delta.bgt.common.js"/>' type="text/javascript"></script>
    <script src='<s:url value="/buyGiftTransfer/js/donatejs.js"/>' type="text/javascript"></script>
    <script src='<s:url value="/buyGiftTransfer/js/updateDashboardMiles.js"/>' type="text/javascript"></script>
</body>
</html>

这是CSS控制打印样式:

@media print {
nav#nav-widget, nav#utility-nav , .interactivebreadcrumb , footer, section{ display:none; }
.addedCharityDeets .giftedSkyMiles p.label {color:333333}
#brand a {
background:url(//int-cdn.delta.com/etc/designs/delta/images/bg-global-sprite.png) no-repeat 0 0;  
}
}

当我打印页面时,它是一堆随机字符。我已经研究了字符编码和字体编码问题,但我还没有在这里或谷歌上发现任何东西。我刚关上我的帖子,所以我转发了。我是新的堆栈溢出所以我不确定我需要提供什么。谢谢!

0 个答案:

没有答案