Your font is probably not embedded in the PDF file. ( How do I know if the fonts in a PDF file are embedded or not? )
Every font has a name, ARIALUNI.TTF defines Arial Unicode MS, you should use that.
So change this:
@font-face {
font-family: Arial1;
src: url("arialuni.ttf");
-fs-pdf-font-embed: embed;
-fs-pdf-font-encoding: Identity-H;
}
* {
font-family: Arial1;
}
To this:
@font-face {
font-family: Arial Unicode MS;
src: url("arialuni.ttf");
-fs-pdf-font-embed: embed;
-fs-pdf-font-encoding: Identity-H;
}
* {
font-family: Arial Unicode MS;
}
This way the font will be embedded.
And you don't need to call renderer.getFontResolver().addFont
, the css is enough.