- Posts: 15
- 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
Radio button - label properties
IP: 89.190.191.227
6 years 6 months ago #14653
by Righetti
Radio button - label properties was created by Righetti
Hi, I need to get the label of radio annotation, example :
"Yes [x] No[ ] "
I have to retrieve the value on the left of the annotation : "Yes" or "No".
I try with all the methods of Page.Annotation class but I can't get the value.
Can U help me?
Thanks in advance
Tommaso.
"Yes [x] No[ ] "
I have to retrieve the value on the left of the annotation : "Yes" or "No".
I try with all the methods of Page.Annotation class but I can't get the value.
Can U help me?
Thanks in advance
Tommaso.
IP: 111.196.246.155
6 years 6 months ago - 6 years 6 months ago #14655
by radaee
Replied by radaee on topic Radio button - label properties
if you just only need to get check status.
plz try Annotation.GetCheckStatus();
if you mean label text of radio, there no methods.
because the label text display on page is part of content stream on page object.
and not in annotation object.
plz try Annotation.GetCheckStatus();
Code:
/**
* get status of check-box and radio-box.<br/>
* this method require premium license
* @return <br/>-1 if annotation is not valid control.<br/>0 if check-box is not checked.<br/>1 if check-box checked.<br/>2 if radio-box is not checked.<br/>3 if radio-box checked.
*/
final public int GetCheckStatus()
{
return Page.getAnnotCheckStatus(page.hand, hand);
}
if you mean label text of radio, there no methods.
because the label text display on page is part of content stream on page object.
and not in annotation object.
Last edit: 6 years 6 months ago by radaee.
IP: 89.190.191.227
6 years 6 months ago #14656
by Righetti
Replied by Righetti on topic Radio button - label properties
I found this solution :
Obj obj = doc.Advance_GetObj(annotation.Advance_GetRef());
Obj dict_AP_N = obj.DictGetItem("AP").DictGetItem("N");
String key = null;
for (int i = 0; i < dict_AP_N.DictGetItemCount(); i++)
{
key = dict_AP_N.DictGetItemTag(i);
if (key.equalsIgnoreCase("Off") == false)
break;
}
...
In key var the label!!!
Obj obj = doc.Advance_GetObj(annotation.Advance_GetRef());
Obj dict_AP_N = obj.DictGetItem("AP").DictGetItem("N");
String key = null;
for (int i = 0; i < dict_AP_N.DictGetItemCount(); i++)
{
key = dict_AP_N.DictGetItemTag(i);
if (key.equalsIgnoreCase("Off") == false)
break;
}
...
In key var the label!!!
IP: 89.190.191.227
6 years 6 months ago #14658
by Righetti
Replied by Righetti on topic Radio button - label properties
I found a BUG!!!
when I try to call "DictGetItemTag" in a annotation object "radiobutton" with label with special char ex. "Sì" (accent i) I get this exception :
N.B. : look the second row : string: 'S�'
JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] string: 'S�'
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] input: '0x53 0xec'
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] in call to NewStringUTF
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] from java.lang.String com.radaee.pdf.adv.Obj.dictGetItemName(long, int)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] "AsyncTask #2" prio=5 tid=15 Runnable
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] | group="main" sCount=0 dsCount=0 obj=0x12d43790 self=0x7823083200
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] | sysTid=8060 nice=10 cgrp=bg_non_interactive sched=0/0 handle=0x7823352450
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] | state=R schedstat=( 8874413714 796178207 25317 ) utm=865 stm=21 core=0 HZ=100
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] | stack=0x7823250000-0x7823252000 stackSize=1037KB
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] | held mutexes= "mutator lock"(shared held)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #00 pc 0000000000479ffc /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+220)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #01 pc 0000000000479ff8 /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+216)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #02 pc 000000000044e608 /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+472)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #03 pc 00000000002eea0c /system/lib64/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+1128)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #04 pc 00000000002ef0f4 /system/lib64/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+120)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #05 pc 0000000000102474 /system/lib64/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+156)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #06 pc 0000000000103170 /system/lib64/libart.so (_ZN3art11ScopedCheck14CheckUtfStringEPKcb+1344)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #07 pc 00000000000ff9bc /system/lib64/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+1120)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #08 pc 00000000000fa4fc /system/lib64/libart.so (_ZN3art8CheckJNI12NewStringUTFEP7_JNIEnvPKc+624)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #09 pc 000000000014bc1c /data/app/com.radaee.reader-1/oat/arm64/base.odex (Java_com_radaee_pdf_adv_Obj_dictGetItemName__JI+136)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] at com.radaee.pdf.adv.Obj.dictGetItemName(Native method)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] at com.radaee.pdf.adv.Obj.DictGetItemTag(Obj.java:69)
when I try to call "DictGetItemTag" in a annotation object "radiobutton" with label with special char ex. "Sì" (accent i) I get this exception :
N.B. : look the second row : string: 'S�'
JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] string: 'S�'
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] input: '0x53 0xec'
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] in call to NewStringUTF
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] from java.lang.String com.radaee.pdf.adv.Obj.dictGetItemName(long, int)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] "AsyncTask #2" prio=5 tid=15 Runnable
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] | group="main" sCount=0 dsCount=0 obj=0x12d43790 self=0x7823083200
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] | sysTid=8060 nice=10 cgrp=bg_non_interactive sched=0/0 handle=0x7823352450
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] | state=R schedstat=( 8874413714 796178207 25317 ) utm=865 stm=21 core=0 HZ=100
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] | stack=0x7823250000-0x7823252000 stackSize=1037KB
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] | held mutexes= "mutator lock"(shared held)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #00 pc 0000000000479ffc /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+220)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #01 pc 0000000000479ff8 /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+216)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #02 pc 000000000044e608 /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+472)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #03 pc 00000000002eea0c /system/lib64/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+1128)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #04 pc 00000000002ef0f4 /system/lib64/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+120)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #05 pc 0000000000102474 /system/lib64/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+156)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #06 pc 0000000000103170 /system/lib64/libart.so (_ZN3art11ScopedCheck14CheckUtfStringEPKcb+1344)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #07 pc 00000000000ff9bc /system/lib64/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+1120)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #08 pc 00000000000fa4fc /system/lib64/libart.so (_ZN3art8CheckJNI12NewStringUTFEP7_JNIEnvPKc+624)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] native: #09 pc 000000000014bc1c /data/app/com.radaee.reader-1/oat/arm64/base.odex (Java_com_radaee_pdf_adv_Obj_dictGetItemName__JI+136)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] at com.radaee.pdf.adv.Obj.dictGetItemName(Native method)
2019-11-07 10:38:39.596 8031-8060/com.radaee.reader A/art: art/runtime/java_vm_ext.cc:470] at com.radaee.pdf.adv.Obj.DictGetItemTag(Obj.java:69)
IP: 111.196.246.155
6 years 6 months ago #14659
by radaee
Replied by radaee on topic Radio button - label properties
this shall not be label, it shall be export value.
about 'DictGetItemTag' we assume it always encoding as ASCII not exceed code 127.
the export can be retrived as method Document.ExportForm();
look xml path like field full name.
about 'DictGetItemTag' we assume it always encoding as ASCII not exceed code 127.
the export can be retrived as method Document.ExportForm();
look xml path like field full name.
IP: 111.196.246.155
6 years 6 months ago #14660
by radaee
Replied by radaee on topic Radio button - label properties
we'll fix crashed issue, and update later.
Time to create page: 0.464 seconds