Comments (6)
No, I haven't. Please describe this problem in more detail. Which language diacritics are not rendered?
Perhaps you can submit a pull-request to fix it yourself?
from openpdf.
As with the unicode issue, it seems that the fonts provided are not so symbol rich as you need it, Please try loading a font which has the symbols you need, and see if it works.
Take a look at this "test": https://github.com/LibrePDF/OpenPDF/blob/master/openpdf/src/test/java/com/lowagie/text/pdf/UnicodePdfTest.java
from openpdf.
@wickstargazer , you mean the combination of 2 symbols like "a" + "´" = "á", and be hanled like 2 symbols, instead of 1?
from openpdf.
We've recently run into the same (?) problem with the German Umlauts (ä, ö, ü). The base letter and the diaeresis were rendered side by side, e.g. as "a¨", as described by @asturio in the comment above.
There are two solutions for this problem:
If you are using common diacritics, for which a singleton character exists in Unicode, then simply preprocess your text with the java.text.Normalizer
using the NFC algorithm as described here. Of course there is some performance penalty for this.
Set the correct PDF Font encoding–I suggest Identity H–as described here. If you're using OpenPDF with FlyingSaucer, then you need to call ITextRenderer.getFontResolver().addFont(path, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
from openpdf.
Hi all,
The same issue I am getting with Telugu ( India ) language like pointed by @asturio of two characters not mixing to have proper diacritic. The solutions suggested by @rntrp is not solving. As @asturio said about using the right font, I think that is not the issue in my case. Please let me explain.
If the combined string of the two characters ( \u0C2D \u0C4B ) are displaying properly in the sysout.
But not in the PDF.
Character \u0C2D is
and in console it is displaying as
The code i have written basically is ..
static String FONT = "c:\\windows\\fonts\\lohit-telugu.ttf";
BaseFont bfComic = BaseFont.createFont(FONT, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
Font font = new Font(bfComic, 12);
String text3 = "Some Telugu \u0305cha\u0C46racter\u0300s: భోజనం తర్వాత తదుపరి పైన ముందు \u0C2D\u0C4B ";
doc.add(new Paragraph(text3, font));
from openpdf.
With #329 this issue has been fixed, please check with latest OpenPDF, make sure to include FOP dependency as well. @asturio we can close this issue.
from openpdf.
Related Issues (20)
- Handling Row Content Splitting in PdfPTable.writeSelectedRows() HOT 3
- font can't display Complete when text length greater than pdf edit box length HOT 2
- Is OpenPDB library is fully supported on Android? HOT 3
- Support for Circular Shaped Images HOT 1
- Does OpenPDF support multiThreadding ? HOT 1
- Opening a file with `PdfReader` (or `RandomAccessFileOrArray`) keeps the file locked after `close()` HOT 1
- Print large text cells that exceed the remaining height of one page of paper starting from the second page rather than from the remaining height of the first page HOT 1
- Prevent leading from affecting the first cell HOT 2
- Unable to insert text in Identity-H encoding using a subset font file HOT 2
- Please provide Android support for GrallVM native-image feature; HOT 1
- Is there html to pdf capability HOT 2
- Japanese symbols are not rendered into PDF file HOT 14
- Rendering Multi lingual Text HOT 1
- Example code for RadioCheckField HOT 1
- "Unknown encryption type R = 5" HOT 6
- VariableBorder cell renders border differently from nonVariableBorder cell
- Non-styled versions of TTF fonts are chosen and artificially styled over available styled versions
- NullPointerException using PdfTextExtractor HOT 3
- JDK8 无法使用OPENPDF 2..0.3 HOT 5
- How to set a left aligned string and a center aligned string in a single line? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openpdf.