public static Font normal=FontFactory.getFont("assets/Far_ZarBd.ttf",BaseFont.IDENTITY_H,,Font.BOLD);
------------------------------------------------------------------------------------------------------
Document doc = new Document();
String outPath = getExternalFilesDir(null) + "/mypdf7.pdf";
try {
PdfWriter.getInstance(doc, new FileOutputStream(outPath));
doc.open();
PdfPTable table = new PdfPTable(2);
table.setRunDirection(PdfWriter.RUN_DIRECTION_RTL);
PdfPCell cell;
cell = new PdfPCell(new Phrase("milad"));
table.addCell(cell);
cell = new PdfPCell(new Phrase("متن فارسی برای تست", normal));
table.addCell(cell);
doc.add(table);
doc.close();
} catch (DocumentException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
تولید pdf فارسی در اندروید
راه اندازی پیش نیاز نرم افزاری برای شروع کار با jsp
new ,cell ,table ,doc ,e ,} ,new phrase ,pdfpcell new ,{ e ,} catch ,doc new
درباره این سایت