The content of the PDF file is the HTML code of this test page1 you can download to check your content.
When you open the file in the browser and select the download link; the PDF file is downloaded in the folder "Downloads"to 2, but the result contains some encoded characters:
This is a fragment of the HTML file:
<div class="TituloPagina"> CONTRATO INDIVIDUAL DE TRABAJO A TÉRMINO FIJO INFERIOR A UN AÑO CELEBRADO ENTRE COMPAÑÍA (A). Y FUTURO EMPLEADO (B) –SALARIO ORDINARIO. </div>
– is shown encoded in the PDF as well:
I have tried:
- Place the property
UTF-8in the HTML file.
- Save the HTML file as indicated in the response, but in this case, I do not believe that the problem is in the HTML file shown, but in the result of the conversion to PDF.
- Change the label
<meta charset="iso-8859-1" />; which causes the HTML file, you lose the encoding of the characters such as
But there is no difference in the generated PDF files.
How to remove encoded characters from a file generated in PDF using jsPDF?
1 I have created this test file, since the real development contains confidential information.
2 The path of the discharge varies depending on the configuration of each user in their browser preference.