Note that there are some explanatory texts on larger screens.

plurals
  1. POdompdf special character converting into question mark
    primarykey
    data
    text
    <p>I have below html to parse with dompdf and generate a pdf file :-</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;style type="text/css"&gt; td { margin-left: 15px; padding-left: 15px; border: none; } table { border: none; } &lt;/style&gt; &lt;style type="text/css"&gt; @font-face { font-family: "nmsyms"; src: url("customfonts/nmsyms.eot"); } @font-face { font-family: nmsyms; src: url(customfonts/NMSYMS__.TTF) } table { bgcolor: none } ; tr { bgcolor: none } ; td { bgcolor: none } ; &lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;table align='center' width='100%' border='0' cellspacing='0' cellpadding='2'&gt; &lt;tr&gt; &lt;th colspan=5 align='left' height=35&gt; &lt;h3&gt;Temporary Corrections &amp;nbsp;&lt;/h3&gt; &lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th colspan=5 align='left'&gt;&lt;b&gt; 1569(T)/13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JAPAN - Hokkaidō West Coast. Kamui Misaki - Light.&amp;nbsp;&lt;/b&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan=4 align='left'&gt;Source: &lt;authority&gt;Japanese Notice 11/5141(T)/13&lt;/authority&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align='left' colspan=4&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;/body&gt;&lt;/html&gt; </code></pre> <p>You can see in second tr of above table <code>JAPAN - Hokkaidō West Coast. Kamui Misaki - Light.</code> . there is a special character <code>ō</code> . This character is converting into the question mark sign in generated pdf file but i dont want that. It should be as it is. </p> <p>On webpage it's showing as it is.</p> <p>Below is my php code using dompdf library : -</p> <pre><code> $file= "files/2012_Week_40_info.html"; $NMtextpdfFile = 'nmtext.pdf'; $content = file_get_contents($file); $dompdf = new DOMPDF(); $dompdf-&gt;load_html($content, 'UTF-8'); $dompdf-&gt;set_paper('A4', 'portrait'); //portrait,landscape $dompdf-&gt;render(); $output = $dompdf-&gt;output(); file_put_contents($NMtextpdfFile, $output); </code></pre> <p>I have also some other special characters like accents but they are looking good in generated pdf</p> <p><strong>I think this is font-family problem. Can any one tell me which font i have to apply to solve this problem ?</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload