- Posts: 8
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
two bug? SetEditFont() failed, setAnnotFont() not work for CJK
IP: 116.30.213.103
7 years 6 months ago #14322
by seanyzhou
1) after use page.AddAnnotEditbox() to create freetext, all CJK chars will be blank, only English letters displayed
then we found there' a method for Annotation: page.SetEditFont(), but when we use this method, it return crash error:
UnsatisfiedLinkError: No implementation found for boolean com.radaee.pdf.Page.setAnnotEditFont()
this means that .so file doesn't implement setAnnotEditFont() yet, please check it.
2) when modify EditText, it can only show English letters, all CJK chars will be blank.
when we add setAnnotFont("Courier") to Global.java, we do see that the font of EditText chagned to Courier
this confirm that setAnnotFont() works
but when we use setAnnotFont("DroidSansChinese") instead to display chinese chars
(we confirm that the system has this font file, and already add fontfileListAdd() and setDefaultFont() for it in Global.java same as we test Courier font.
it still can't show chinese chars, all are blank on the screen
please help!
then we found there' a method for Annotation: page.SetEditFont(), but when we use this method, it return crash error:
UnsatisfiedLinkError: No implementation found for boolean com.radaee.pdf.Page.setAnnotEditFont()
this means that .so file doesn't implement setAnnotEditFont() yet, please check it.
2) when modify EditText, it can only show English letters, all CJK chars will be blank.
when we add setAnnotFont("Courier") to Global.java, we do see that the font of EditText chagned to Courier
this confirm that setAnnotFont() works
but when we use setAnnotFont("DroidSansChinese") instead to display chinese chars
(we confirm that the system has this font file, and already add fontfileListAdd() and setDefaultFont() for it in Global.java same as we test Courier font.
it still can't show chinese chars, all are blank on the screen
please help!
IP: 111.196.247.111
7 years 6 months ago - 7 years 6 months ago #14323
by radaee
Replied by radaee on topic two bug? SetEditFont() failed, setAnnotFont() not work for CJK
Hi, seems some devices has no DroidSansChinese.
i'm using following codes to print list of fonts:
and "DroidSansChinese" is not exists on result.
font list on my device is:
when i pass "Noto Sans CJK SC Regular" setAnnotFont(). textbox display Chinese chars.
the best way to support CJK charset shall be :
package a CJK font on you APP, and extract font in Global.init().
setAnnotEditFont seems exists on JNI library, i will better check later.
i'm using following codes to print list of fonts:
Code:
String face_name = null;
int face_first = 0;
int face_count = getFaceCount();
while (face_first < face_count)
{
face_name = getFaceName(face_first);
Log.e("Fonts", "Name:" + face_name);
face_first++;
}
font list on my device is:
Code:
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:1.005;GOOG;NotoSansCJKjp-Regular;ADOBE
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:1.005;GOOG;NotoSansCJKkr-Regular;ADOBE
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:1.005;GOOG;NotoSansCJKsc-Regular;ADOBE
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:1.005;GOOG;NotoSansCJKtc-Regular;ADOBE
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:1.005;GOOG;NotoSansMonoCJKjp-Regular;ADOBE
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:1.005;GOOG;NotoSansMonoCJKkr-Regular;ADOBE
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:1.005;GOOG;NotoSansMonoCJKsc-Regular;ADOBE
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:1.005;GOOG;NotoSansMonoCJKtc-Regular;ADOBE
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:Amiri
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:Amiri-Regular
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:Arimo
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:Arimo Bold
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:Arimo Bold Italic
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:Arimo Italic
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:Arimo-Bold
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:Arimo-BoldItalic
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:Arimo-Italic
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:Ascender - Symbol Neu
2019-03-16 23:34:28.590 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Cousine
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Cousine Bold
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Cousine Bold Italic
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Cousine Italic
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Cousine-Bold
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Cousine-BoldItalic
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Cousine-Italic
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Google:Roboto Regular:2017
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Hanyi HYQiHei-50S Light v5.00
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:HYQiHei-50S Light
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:HYQiHei-EZS
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Arimo
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Arimo Bold
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Arimo Bold Italic
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Arimo Italic
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Cousine
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Cousine Bold
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Cousine Bold Italic
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Cousine Italic
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Tinos
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Tinos Bold
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Tinos Bold Italic
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Monotype Imaging - Tinos Italic
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Noto Sans CJK JP Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Noto Sans CJK KR Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Noto Sans CJK SC Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Noto Sans CJK TC Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Noto Sans Mono CJK JP Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Noto Sans Mono CJK KR Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Noto Sans Mono CJK SC Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Noto Sans Mono CJK TC Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:NotoSansCJKjp-Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:NotoSansCJKkr-Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:NotoSansCJKsc-Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:NotoSansCJKtc-Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:NotoSansMonoCJKjp-Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:NotoSansMonoCJKkr-Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:NotoSansMonoCJKsc-Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:NotoSansMonoCJKtc-Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Roboto
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Roboto-Regular
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Sorts Mill Tools 2.1.0_alpha1 : Amiri : 29-12-2013
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:Symbol Neu for Powerline
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:SymbolNeuForPowerline
2019-03-16 23:34:28.591 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.592 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.592 2753-2753/com.radaee.reader E/Fonts: Name:Tinos
2019-03-16 23:34:28.592 2753-2753/com.radaee.reader E/Fonts: Name:Tinos Bold
2019-03-16 23:34:28.592 2753-2753/com.radaee.reader E/Fonts: Name:Tinos Bold Italic
2019-03-16 23:34:28.592 2753-2753/com.radaee.reader E/Fonts: Name:Tinos Italic
2019-03-16 23:34:28.592 2753-2753/com.radaee.reader E/Fonts: Name:Tinos-Bold
2019-03-16 23:34:28.592 2753-2753/com.radaee.reader E/Fonts: Name:Tinos-BoldItalic
2019-03-16 23:34:28.592 2753-2753/com.radaee.reader E/Fonts: Name:Tinos-Italic
2019-03-16 23:34:28.592 2753-2753/com.radaee.reader E/Fonts: Name:null
2019-03-16 23:34:28.592 2753-2753/com.radaee.reader E/Fonts: Name:汉仪旗黑-50S Light
the best way to support CJK charset shall be :
package a CJK font on you APP, and extract font in Global.init().
setAnnotEditFont seems exists on JNI library, i will better check later.
Last edit: 7 years 6 months ago by radaee.
IP: 111.196.247.111
7 years 6 months ago - 7 years 6 months ago #14324
by radaee
Replied by radaee on topic two bug? SetEditFont() failed, setAnnotFont() not work for CJK
we checked on Annotation.setEditFont(), wrong function name on JNI codes.
we will update next week for this function.
we will update next week for this function.
Last edit: 7 years 6 months ago by radaee.
IP: 212.97.62.176
7 years 6 months ago #14325
by emanuele
Replied by emanuele on topic two bug? SetEditFont() failed, setAnnotFont() not work for CJK
Dear user,
the new demo version is now available.
This version contains the fix of Annotation.setEditFont() method.
You could download it from here: www.radaeepdf.com/download/download-prev...120-radaeepdf-3-50-2
the new demo version is now available.
This version contains the fix of Annotation.setEditFont() method.
You could download it from here: www.radaeepdf.com/download/download-prev...120-radaeepdf-3-50-2
IP: 116.7.31.181
7 years 6 months ago #14326
by seanyzhou
Replied by seanyzhou on topic two bug? SetEditFont() failed, setAnnotFont() not work for CJK
continued problem:
after add setAnnotFont("Noto Sans CJK SC Regular"), it does show chines chars, but there's a big problem:
each time I input text to edit-box, the pdf filesize will add 13MB+. after I test to input text to 3 edit-box, the file size increase from 100K to 41MB, that's very horrible.
is there any option that I can input text only but it DOESN'T save the font resource to the pdf file? at least doesn't save the font duplicated each time, you can imagine, if I fill a pdf with 100 edit-box, it'll be 100*13MB size @_@
the setAnnotFont() should allow to display the edit-text only, but doesn't save font resource each time I edit it.
after add setAnnotFont("Noto Sans CJK SC Regular"), it does show chines chars, but there's a big problem:
each time I input text to edit-box, the pdf filesize will add 13MB+. after I test to input text to 3 edit-box, the file size increase from 100K to 41MB, that's very horrible.
is there any option that I can input text only but it DOESN'T save the font resource to the pdf file? at least doesn't save the font duplicated each time, you can imagine, if I fill a pdf with 100 edit-box, it'll be 100*13MB size @_@
the setAnnotFont() should allow to display the edit-text only, but doesn't save font resource each time I edit it.
IP: 116.30.212.118
7 years 5 months ago #14327
by seanyzhou
Replied by seanyzhou on topic two bug? SetEditFont() failed, setAnnotFont() not work for CJK
Tested 3.50.2beta3, I confirm that the free text setEditFont() bug has been fixed, and after added free text with any chars, any NewFontCid , the pdf file size is still almost the same.
Thanks for the work!
Thanks for the work!
Time to create page: 0.437 seconds