如何编程打印网页在A4大小,横向不丢失任何内容使用HTML/JavaScript/Jquery
How to programatically print the web page in A4 size, Landscape orientation without loosing any contents using HTML/JavaScript/Jquery
请回复解决方案:
以A4尺寸打印网页,横向,不丢失内容和清晰度或者
将网页转换为PDF或图像(A4大小,横向,不丢失内容&图像清晰度)
编程语言:HTML/Javascript/jQuery我当前的代码是:
//patInstallBrochure.html <!doctype html>
<html>
<head>
<title>Generated at http://psd2htmlconverter.com - Your site's title should be here</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="description" content="Generated at http://psd2htmlconverter.com - Your site's description should be here">
<meta name="keywords" content="Generated at http://psd2htmlconverter.com - Your site's keywords should be here">
<meta name="generator" content="http://psd2htmlconverter.com">
<link rel="stylesheet" type="text/css" href="PatientInstallationBrochureFront/style.css">
</head>
<body>
<FORM NAME="joe">
<INPUT TYPE="hidden" NAME="burns">
<div class="front group">
<div class="left group">
<img class="android_icon" src="PatientInstallationBrochureFront/images/android_icon.png" alt="" width="267" height="310">
<p class="android">Android</p>
<p class="downloading_installing_en"><strong><a href="#" style="text-decoration: underline; font-size: 58.33333px; font-variant: small-caps; color: #1e172b; font-weight: 600;">Downloading/Installing </a></strong><br><span style="line-height: 58px;"> </span><br>Ensure you have a gmail account before starting<br><span style="line-height: 58px;"> </span><br>Search for “247Patient” in the google playstore and download/install the app on your phone<br><span style="line-height: 58px;"> </span><br><strong><a href="#" style="text-decoration: underline; font-size: 58.33333px; font-variant: small-caps; color: #1b1126; font-weight: 600;">Configuring 247Patient Application</a></strong><br><span style="line-height: 58px;"> </span><br>Open the 247Patient App<br><span style="line-height: 58px;"> </span><br>Enter the <em>Clinic mobile number</em> (found on first page of brochure) and click “Configure”<br><span style="line-height: 58px;"> </span><br>You will be automatically redirected to the login screen of your clinic.<br><span style="line-height: 58px;"> </span><br>You will also receive an SMS with your login details.<br><span style="line-height: 58px;"> </span><br>Enter your login detials in the login page and hit login to access your clinic<br><span style="line-height: 58px;"> </span><br>Now you will have full access to your 247Patient App and you can start booking appointments</p>
</div>
<div class="center">
<p class="support_information"><a href="#">Support Information</a></p>
<p class="web_url"></p>
<p class="inputTxt" id="webUrl" align="left" ></p>
<p class="use_the_above_url_for_boo">(Use the above URL for booking appointments through the internet.)</p>
<p class="for_a_full_list_of_featur">For a full list of features and more detailed instructions, visit<strong style="font-style: normal; font-weight: bold;"> www.247doctorcare.com</strong></p>
<p class="address"><div style="text-align: center;"> <span style="font-size: 75px; font-weight: bold;">Address:</span></div></p>
<p class="inputTxt" id="addr1"></p>
<p class="inputTxt" id="addr2"></p>
<p class="inputTxt" id="addr3"></p>
</div>
<div class="right">
<p class="patient_installation_guid"><a href="#">Patient Installation Guide</a></p>
<p class="clinic_name"></p>
<p class="inputTxt" id="cName"></p>
<p id="cCNo"></p>
<p class="clinic_mobile_number_only"><span style="font-size: 60px;">Clinic Mobile Number</span><br><a href="#" style="text-decoration: underline; font-variant: small-caps;">(Only for Installation)</a></p>
<div class="rectangle_1"><p id="cMobNo" class="inputTxt"></p></div>
<img class="logo" src="PatientInstallationBrochureFront/images/logo.png" alt="" width="649" height="125">
</div>
</div>
</FORM>
</body>
<div style="zoom: 400%;">
<script type="text/javascript">
var pdfbuttonlabel="Save page as PDF"
</script>
<script src="http://www.web2pdfconvert.com/pdfbutton2.js" id="Web2PDF" type="text/javascript"></script>
<!-- Web2PDF Converter Button END -->
<p align="right">Page : <a href="patInstallBrochure.html">1 </a><a href="patInstallBrochureback.html">2 </a></p>
</div>
</html>
你可以使用html2canvas js插件来满足你的需求。它能够打印网页而不丢失内容& &;图像清晰度。
是html2canvas的链接你可以在这个链接中找到完整的文档和用法。
关于更多的查询,您可以在网站上找到github链接。
快乐编码…
相关文章:
- 如何创建php函数或任何脚本/jquery Javascript,使我能够获取与复选框关联的值并添加它们
- 是否有任何内置方法可以更改JavaScript对象'的属性设置为某个值
- 任何与JQuery的$(window)有关的东西都不会在IE中触发
- 网站范围内jQuery/javascript选择器的最佳实践
- 可以Flot(或任何其他JQuery图表库)绘制公式
- 用于表排序、导出、动态行生成的任何Javascript/jQuery库
- 组内jquery选择器的问题&在元素上循环
- 使用 CasperJS 时,是否可以在执行任何内联或外部 Javascript 之前与加载页面的 DOM 进行交互
- 找不到“”;应用程序“;模板或视图.对象{fullName:“template:application”}将不呈现任何内
- .val,但不返回任何值[JQuery]
- 如何在没有任何内置函数的情况下将元素添加到数组中
- 是否有任何事件jQuery或JavaScript,我可以隐藏元素之前,他们出现在浏览器中
- 任何通过jQuery获取HTTP请求的方法
- 如何获得元素id点击没有任何内联函数调用在javascript
- 在javascript/jquery中是否有任何内置功能来过滤邮件,如php's函数(!使用filter_var
- 任何过滤jquery数据的选项,比如linq中的. Any()
- 在JavaScript中过滤数组,而不使用任何内置函数或新数组
- Ajax文件上传进度没有任何插件Jquery
- Jquery是否有任何内置方法来单独查找可验证的元素?
- 我试图在不使用任何内置方法的情况下延迟此函数.为什么这行不通呢?