Kendo-angular: Pdf Export Arabic

Created on 24 Mar 2019  路  5Comments  路  Source: telerik/kendo-angular

Pdf Export When export words Utf8 like Arabic appear different letters

Documentation pdf-export

Most helpful comment

i define embedded font but it not works!

module:

import {defineFont} from "@progress/kendo-drawing/pdf";

defineFont({
  'BNazanin': '/font/bnazanin/BNazanin.ttf',
  'BNazanin|Bold': '/font/bnazanin/BNazaninBd.ttf',
  'IRANSans': '/font/IRANSans/ttf/IRANSans.ttf',
  'IRANSans|Bold': '/font/IRANSans/ttf/IRANSans_Bold.ttf',
});

component.css :

kendo-pdf-export {
  font-family: "BNazanin", "IRANSans", sans-serif;
  font-size: 14px;
}

i used two fonts for test their styles, but it not generate correct rtl pdf content.

this picture maybe help you what i say:

pdf

All 5 comments

The standard PDF fonts support only ASCII. To render Unicode symbols, use an embedded font.

Currently this is buried deep in our Drawing library documentation. We'll link to this topic in the main PDF Export documentation as well.

Added documentation topic on Embedded Fonts.

i define embedded font but it not works!

module:

import {defineFont} from "@progress/kendo-drawing/pdf";

defineFont({
  'BNazanin': '/font/bnazanin/BNazanin.ttf',
  'BNazanin|Bold': '/font/bnazanin/BNazaninBd.ttf',
  'IRANSans': '/font/IRANSans/ttf/IRANSans.ttf',
  'IRANSans|Bold': '/font/IRANSans/ttf/IRANSans_Bold.ttf',
});

component.css :

kendo-pdf-export {
  font-family: "BNazanin", "IRANSans", sans-serif;
  font-size: 14px;
}

i used two fonts for test their styles, but it not generate correct rtl pdf content.

this picture maybe help you what i say:

pdf

I have tried to follow the steps there but couldn't get it working.
It would be great if this added with a working example.

Right-to-left scripts are not supported by the PDF Export component. I'm sorry for the misleading initial reply.

Embedding the font solves only part of the issue. But it's not sufficient鈥攑roper rendering right-to-left scripts is extremely complex. Although the browser already has this implemented, the result is not available through the DOM. Our attempts at implementing this have failed so far.

We've listed the limitation in the Embedded Fonts page in addition to the Drawing Limitations and Browser Support.

Was this page helpful?
0 / 5 - 0 ratings