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

Edit text and Note not saving data

More
10 years 9 months ago #9954 by gabmor
Hi, the line returns false and my package is the same of the demo project com.radee.reader, I tested the other functionalities like add line,add rect, add, oval, select, etc. and works fine. this issue with the EditText and the Note is the only that I get with the library.
Code:
public void onDismiss() { Log.d("Reader","onDismiss"); if( m_edit_type == 1 )//edit box { EditText edit = (EditText)m_pEdit.getContentView().findViewById(R.id.annot_text); Log.d("Reader","Text Edit "+edit.getText().toString()); m_annot.SetEditText(edit.getText().toString()); Log.d("Reader", "Annot text " + m_annot.SetEditText(edit.getText().toString())); Log.d("Reader", "Annot text "+m_annot.GetEditText()); m_view.vRenderSync(m_annot_page); if( m_listener != null ) m_listener.OnPageModified(m_annot_page.GetPageNo()); PDFEndAnnot(); } if( m_edit_type == 2 )//combo { if( m_sel_index >= 0 ) { m_annot.SetComboItem(m_sel_index); m_view.vRenderSync(m_annot_page); if( m_listener != null ) m_listener.OnPageModified(m_annot_page.GetPageNo()); } m_sel_index = -1; PDFEndAnnot(); } m_edit_type = 0; }

this is the console output

12-10 12:00:29.049 3165-3165/com.radaee.reader D/Reader: onDismiss
12-10 12:00:29.049 3165-3165/com.radaee.reader D/Reader: Text Edit vfgghfy
12-10 12:00:29.049 3165-3165/com.radaee.reader D/Reader: Annot text false
12-10 12:00:29.049 3165-3165/com.radaee.reader D/Reader: Annot text null
More
10 years 9 months ago #9955 by gabmor
any update? or how to fix my problem?
More
10 years 9 months ago #9956 by gabmor
I have changed the code to test more and found something strange, for some reason my annotation type is changing when I tried to edit, I have even tried with other variable and it's the same
Code:
private com.radaee.pdf.Page.Annotation m_annot; public static com.radaee.pdf.Page.Annotation m_annot2; public void OnAnnotClicked(PDFVPage vpage, Page.Annotation annot) { Log.d("Reader","Annotation Click "+annot); m_annot_vpage = vpage; if(annot!=null) { m_annot = annot; } if(annot!=null){ if (annot.GetType() == 1) {//Popup note m_reader.PDFPerformAnnot(); }else{ if (annot.GetType() == 3) {//EditText m_annot=annot; m_annot2=annot; Log.d("Reader","Gettype==3 "+m_annot2.GetType()); Log.d("Reader","Gettype==3 "+m_annot2.SetEditText("aaa")); onEdit2(); } } } private void onEdit2() { final EditText input = new EditText(getActivity()); final AlertDialog dialog = new AlertDialog.Builder(getActivity()) .setTitle("Edit Text") .setView(input) .setPositiveButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { Editable value = input.getText(); String newValue = value.toString(); Log.d("Reader", "Annot text " + m_annot); Log.d("Reader", "Annot text " + m_annot.GetType()); Log.d("Reader", "Annot text " + m_annot.SetEditText(newValue)); Log.d("Reader", "Annot text " + m_annot.GetEditText()); Log.d("Reader", "Annot text type " + m_annot.GetEditTextFormat()); Log.d("Reader", "Annot text " + m_annot2); Log.d("Reader", "Annot text " + m_annot2.GetType()); Log.d("Reader", "Annot text " + m_annot2.SetEditText(newValue)); Log.d("Reader", "Annot text " + m_annot2.GetEditText()); Log.d("Reader", "Annot text type " + m_annot2.GetEditTextFormat()); m_reader.PDFEndAnnot(); m_reader.updatePage(m_annot_vpage); } }) .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { // Do nothing. m_reader.PDFEndAnnot(); } }) .setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialogInterface) { m_reader.PDFEndAnnot(); } }).create(); input.setText(m_annot.GetEditText()); input.setSelection(input.getText().length()); input.setSingleLine(true); input.setImeOptions(input.getImeOptions() | EditorInfo.IME_FLAG_NO_EXTRACT_UI); dialog.show(); }


12-10 17:36:44.459 23223-23223/com.radaee.reader D/Reader: Annotation Click com.radaee.pdf.Page$Annotation@42312ea8
12-10 17:36:44.459 23223-23223/com.radaee.reader D/Reader: Gettype==3 3
12-10 17:36:44.839 23223-23223/com.radaee.reader D/Reader: Gettype==3 true

12-10 17:36:49.269 23223-23223/com.radaee.reader D/Reader: Annot text com.radaee.pdf.Page$Annotation@42312ea8
12-10 17:36:49.269 23223-23223/com.radaee.reader D/Reader: Annot text 0
12-10 17:36:49.269 23223-23223/com.radaee.reader D/Reader: Annot text false
12-10 17:36:49.269 23223-23223/com.radaee.reader D/Reader: Annot text null
12-10 17:36:49.269 23223-23223/com.radaee.reader D/Reader: Annot text type null
12-10 17:36:49.269 23223-23223/com.radaee.reader D/Reader: Annot text com.radaee.pdf.Page$Annotation@42312ea8
12-10 17:36:49.269 23223-23223/com.radaee.reader D/Reader: Annot text 0
12-10 17:36:49.269 23223-23223/com.radaee.reader D/Reader: Annot text false
12-10 17:36:49.269 23223-23223/com.radaee.reader D/Reader: Annot text null
12-10 17:36:49.269 23223-23223/com.radaee.reader D/Reader: Annot text type null
More
10 years 9 months ago #9972 by Davide
Hi,
sorry for the delay.
We have sent the issue to our developers.
We'll get back to you as soon as possible..
More
IP: 1.186.44.5 8 years 4 months ago - 8 years 4 months ago #13806 by [email protected]
Arabic text not adding..english is working fine but arabic text not adding and if you add english and arabic text only english text is showing..

Referred Link : www.radaeepdf.com/support/knowledge-base?view=kb&kbartid=43

For Example : "Hi..it test..." - working fine
"لوحة المفاتيح العربية" - showing nothing
""لوحة المفاتيح العربية Hi..it test... " - only showing Hi..it test...

If i open it in adobe reader irt showing line box and if i tap on it showing arabic text in adobe reader.


Thank you
Last edit: 8 years 4 months ago by [email protected].
More
IP: 37.183.44.177 8 years 4 months ago #13809 by nermeen
This is a font related problem, you need to set the annotation font to a font that supports also Arabic.

In the demo project you can use (Amiri), by modifying Global.Init(ContextWrapper act, int license_type, String company_name, String mail, String serial) as follows:
Code:
setAnnotFont("Amiri-Regular")
instead of
Code:
setAnnotFont("DroidSansFallback")

In your project make sure to include this font (or other font of your choice) and add it to the font list by adding the following before fontfileListEnd();
Code:
load_truetype_font( res, R.raw.amiri_regular, new File(files, "amiriRegular.ttf") );//arabic
Time to create page: 0.556 seconds
Powered by Kunena Forum