PDF Khmer Unicode Font Not Rendering Correctly
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- backend, computer-graphics
Hướng nghiên cứu
Start with the supplied OpenPDF example using Hanuman.ttf and Identity-H, then trace how OpenPDF embeds and renders fonts for Khmer text. Compare the generated PDF with the expected rendering shown in the issue and identify whether the problem lies in font handling or text shaping. Done means Khmer characters render correctly in the generated PDF.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello everyone,
I'm using Eclipse BIRT Report Designer to generate reports in PDF format, but I’m facing issues with rendering Khmer Unicode Font. The Khmer characters either:
- Appear as blank or missing text, or
- Show incorrect khmer characters.
I've tested generating a simple PDF using OpenPDF with the Hanuman font. Here’s the code I used:
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Font;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfWriter;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws DocumentException, IOException {
// Output PDF file
Document document = new Document();
try {
PdfWriter.getInstance(document, new FileOutputStream("Khmer_Font_Test.pdf"));
} catch (DocumentException | FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
document.open();
// Load Hanuman TTF font
BaseFont hanumanFont = BaseFont.createFont("/Users/sinsarath/eclipse-workspace/SamplePdf/fonts/Hanuman.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
Font font = new Font(hanumanFont, 14); // Set font size to 14
// Add Khmer text
String khmerText = "លេខ";
document.add(new Paragraph(khmerText, font));
document.close();
System.out.println("PDF generated successfully!");
}
}
Result are render not correct:
It should be displayed like that: លេខ
- Ngôn ngữ chính
- Java
- Star
- 4.4k
- Fork
- 714
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của LibrePDF/OpenPDF
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
IndexOutOfBoundsException in PdfReaderCó thể đã có người làm @andreasrosdalw đã nhận 94 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
`PdfSmartCopy` can take effectively unbounded time on nested shared Form XObjectsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
Tất cả issue của LibrePDF/OpenPDF
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
quarkiverse/quarkus-google-cloud-services#1188 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Component: Frontend Component: Web Component Type: Maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
it-at-m/refarch-templates#1944 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
priority: p2 type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
googleapis/java-genai#1372 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
-
GeoSeries scale and skew tests fail with pytest 9.2.0Có thể đã có người làm @jiayuasu đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày