2017-07-02 2 views
0

Webページをpdf形式でエクスポートする必要があります。ブラウザに表示するhtmlコンテンツをpdf形式でダウンロードしたいのですが、jsPDFを試しましたがそれはアラビア語をサポートしていません 私はpdfの言葉を必要としません、私はクライアント側でそれを行う必要があります。事前に おかげで、助けてくださいjfをutf-8でサポートしているHTMLを使用しているHTML

答えて

0

デモ:http://jsfiddle.net/kumarrishikesh12/rwdL0rxh/

<script async src="//jsfiddle.net/kumarrishikesh12/rwdL0rxh/embed/"></script>

OR

function doit(){ 
 
if (!window.print){ 
 
alert("You need NS4.x to use this print button!") 
 
return 
 
} 
 
window.print() 
 
}
color:#C03; 
 
\t font-size:18px; font-family:"Courier New", Courier, monospace; 
 
\t } 
 
p{ font-family:"Comic Sans MS", cursive; 
 
font-size:15px; color:#066; text-align:justify;} 
 
a{ 
 
\t text-decoration:none; 
 
\t font-size:20px; }
<body> 
 

 
<div style="float:right;"> 
 
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> 
 
<!-- sidebar300X600 --> 
 
<ins class="adsbygoogle" 
 
    style="display:inline-block;width:300px;height:600px" 
 
    data-ad-client="ca-pub-1456458421931279" 
 
    data-ad-slot="1562820743"></ins> 
 

 
</div> 
 

 
<div style="width:500px; height:600px; border:2px #093 dashed; margin:0 auto; padding:10px;"> 
 
<h2>What is PHP?</h2> 
 

 
<p>PHP is a server side scripting language commonly used for web applications</p> 
 

 
<h2>How to include a file to a php page?</h2> 
 

 
<p>we can include a file using &quot;include() &quot; or &quot;require()&quot; function with as its parameter..</p> 
 

 
<h2>What&#39;s the difference between include and require?</h2> 
 

 
<p>If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.</p> 
 

 
<h2>What Is a Session?</h2> 
 

 
<p>It can be used to store information on the server for future use</p> 
 

 
<h2>How to set cookies in PHP?</h2> 
 

 
<p>Cookies are often used to track user information Syntax: Setcookie(name, value, expire, path, domain); eg:Setcookie(&quot;sample&quot;, &quot;ram&quot;, time()+3600);</p> 
 

 
<div align="center"><a href="javascript:doit()"><img align="middle" border="0" src="http://demos.2my4edge.com/2my4edge-print-page/icon-48-print.png" /> Click here to Print the Page</a></div> 
 
</div> 
 

 

 
</body>

+0

あなたが取得し、投票を喜ばせる場合には、第2の提案は、それはアラビア文字とRTLを維持するうまく働いた、最初の提案は、私のために動作しません、おかげで再びあなたの歓迎を – abbr

+0

...ブロありがとう右の答えにチックを入れてください –

+0

私は最近のメンバーですが、投票する権利はありませんが、できるだけ早くそれに戻っています – abbr

関連する問題