waqarirshad / jspdf

Automatically exported from code.google.com/p/jspdf
0 stars 0 forks source link

umlaute #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
if I have non standard ascii characters like german Umlaute for example, thy 
will render as some unreadable data chunk.
Is there a possibility to fix this and if how??

Original issue reported on code.google.com by peter.st...@gmail.com on 27 Nov 2011 at 11:37

GoogleCodeExporter commented 8 years ago
The problem is caused by the Base64 encoding lib which converts the document to 
UTF8 while the PDF itself states that it uses "WinAnsiEncoding".

For me it was solved by commenting out the following line in libs/base64.js:

input = Base64._utf8_encode(input);

Original comment by alfred.t...@gmail.com on 21 Dec 2011 at 12:28

GoogleCodeExporter commented 8 years ago
I am still facing the same trouble while trying to export the arabic text to 
PDF using JSPDF , could you please let me know where exactly I have to edit the 
library ?

Those Files I am using : 

    <script type="text/javascript" src="jspdf/jspdf.js"></script>
    <script type="text/javascript" src="jspdf/jspdf.plugin.addimage.js"></script>
<script type="text/javascript" 
src="jspdf/jspdf.plugin.standard_fonts_metrics.js"></script>
    <script type="text/javascript" src="jspdf/jspdf.plugin.split_text_to_size.js"></script>
    <script type="text/javascript" src="jspdf/jspdf.plugin.from_html.js"></script>
    <script type="text/javascript" src="jspdf/jspdf.plugin.cell.js"></script>
        <script type="text/javascript" src="jspdf/adler32cs.js"></script>
        <script type="text/javascript" src="jspdf/deflate.js"></script>
         <script type="text/javascript" src="jspdf/BlobBuilder.js"></script>

So kindly help

Original comment by tamer84h...@gmail.com on 3 Aug 2014 at 10:19