RadaeePDF.com :: Topic: How to use Document.SetFontDel method (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: How to use Document.SetFontDel method

How to use Document.SetFontDel method 2 years 8 months ago #8308

  • asliyanage
  • asliyanage's Avatar
  • Expert Boarder
  • Posts: 105
  • Karma: 0
I added below code in PDFReader class.
private class MyFontDelegate implements Document.PDFFontDelegate
public String GetExtFont(String collection, String fname, int flag,
int[] ret_flags)
Log.d("Font", "collection "+collection);
Log.d("Font", "fname "+fname);
Log.d("Font", "flag "+flag);
Log.d("Font", "ret_flags "+flag);
ret_flags[0] = 0;
return null;
Then inside PDFOpen method i added below line
doc.SetFontDel(new MyFontDelegate());
I got below result.
01-14 22:42:09.794: D/Font(12137): collection
01-14 22:42:09.794: D/Font(12137): fname TimesNewRoman
01-14 22:42:09.794: D/Font(12137): flag 0
01-14 22:42:09.794: D/Font(12137): ret_flags 0
01-14 22:42:09.814: D/Font(12137): collection
01-14 22:42:09.814: D/Font(12137): fname Helvetica-Bold
01-14 22:42:09.814: D/Font(12137): flag 0
01-14 22:42:09.814: D/Font(12137): ret_flags 0

1)So do i need to add TimesNewRoman and Helvetica-Bold fonts to my app?
2)I saw below line in PDFReader class..

so if i need to add a new font file where is the place to add file ?
where is the system/fonts folder ?
Last Edit: 2 years 8 months ago by Docrishav.
The administrator has disabled public write access.
Powered by Kunena Forum