PDFExport German character

3 Answers 296 Views
PDF Processing
n/a
Top achievements
Rank 1
Iron
n/a asked on 26 May 2021, 08:16 AM

Hello,

I am using PDFExport, and in text there are also some German characters (Ü Ö Ä ).

When I open the created PDF, then the text is not right.

Example of created PDF:

 

 I also tried this on StackBlitz and it is the same output.

Text example:

ÜÖÄLorem ipsum dolor sit amet, consectetur adipiscing elit. Integer felis libero, lobortis ac rutrum quis, varius a velit. Donec lacus erat, cursus sed porta quis, adipiscing et ligula. Duis volutpat, sem pharetra accumsan pharetra, mi ligula cursus felis, ac aliquet leo diam eget risus. Integer facilisis, justo cursus venenatis vehicula, massa nisl tempor sem, in ullamcorper neque mauris in orci.

 

What can I dot that the text will be displayed correctly.

 

Thank, you, Matjaz Reberc

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 May 2021, 10:06 AM

Hello, Matjaz,

I assume there was an issue saving the example as it leads to the StackBlitz overview page.

Still, an issue like this can occur if a font that supports these character is not loaded:

https://www.telerik.com/kendo-react-ui/components/drawing/pdf-output/embedded-fonts/

If the issue still occurs after embedding the font, please share an example with the font files and I will be happy to inspect it.

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

n/a
Top achievements
Rank 1
Iron
commented on 28 May 2021, 09:01 AM

Hi,

it works if I use the same code from you example.

It tried to use font locally, but I can not make it work.

I created Font folder, and downloaded font (xy.ttf)

in css file I set the path to downloaded xy.ttf file
@font-face {
font-family: 'TimesNewRoman';
src: url(../Fonts/times-new-roman.ttf) format('truetype');
}

In component, xy.tsx where I need this fond I made import the same way as did you in your example.
import "./xy.css";

Am I missing something?

Thank you, Matjaz Reberc
0
Stefan
Telerik team
answered on 28 May 2021, 09:51 AM

Hello, Matjaz,

I have attached a local example with loading different fonts that may prove helpful.

If the issue still occurs, please share a runnable example where it is reproducible as this will allow us to inspect it locally.

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Dinesh
Top achievements
Rank 1
Iron
answered on 18 Jun 2023, 10:21 AM

Unicode Font Nut Supported When I exported Page to PDF. 

<div className='documentHeader'> <p>प्राइभेट फर्म दर्ता प्रमाण पत्र </p></div>
<div className='PrivateFormPageContainer'>
<p> निम्‍न अनुसारको विवरण भएको श्री<strong style={{textDecoration:'underline'}}> {firmDetails.FormName} </strong> फर्मलाई संम्बत {Barsa}  साल {Mahina} महिना {Gate} मा उद्योग
/बाणिज्य सम्बन्धी कार्य संचालन गर्नको लाग
गाउँपालिकाको प्राइभेट फर्म दर्ता  कार्यविधि २०७७ को दफा ६ (१) बमोजिम दर्ता गरी यो प्रमाण पत्र प्रदान गरिएको छ।</p>
</div>
<div style={{textAlign:'left', margin:'50px'}}>
<h2><u><strong>विवरण</strong></u></h2>
<p><strong>प्रोपाइटरको नामथर :</strong>{firmDetails.FirmOwner} </p>
<p><strong>नागरिकता नम्वर :</strong>{firmDetails.FirmOwnerCitizenNo} </p>
<p><strong>फर्मको ठेगाना :</strong>{firmDetails.Municipality} वडा नं.- {firmDetails.WardNo}, {firmDetails.Tol}, {firmDetails.District} </p>
<p><strong>पुँजी रु :</strong>{firmDetails.FirmCapital}({firmDetails.FirmCapitalNepali}) </p>
<p><strong>उद्धेश्य:</strong>{firmDetails.FormObjective} </p>

</div>

When I exported I got result in Square text format.

Filip
Telerik team
commented on 20 Jun 2023, 12:29 PM

Hello, Dinesh,

This issue can be observed if the used font does not support the language that you are trying to export. I can recommend making sure that the loaded font supports the required language, more information on embedding fonts can be found in the following article:

https://www.telerik.com/kendo-react-ui/components/drawing/pdf-output/embedded-fonts/

If the issue persists when using a suitable font, please share a reproducible example so that we can investigate further.

Regards,
Filip

Tags
PDF Processing
Asked by
n/a
Top achievements
Rank 1
Iron
Answers by
Stefan
Telerik team
Dinesh
Top achievements
Rank 1
Iron
Share this question
or