- Posts: 21
- 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
Checkboxes not being marked
9 years 10 months ago #10566
by fdelcaz
Checkboxes not being marked was created by fdelcaz
Hi:
I have recently upgraded my license to premium. I´m trying to edit different documents and i have found that checkboxes are not working properly. They arent being highlighted or displaying the typical check mark when touched. I have also noticed that m_annot.GetEditType() returns -1.. What do I have to do?
Thanks
I have recently upgraded my license to premium. I´m trying to edit different documents and i have found that checkboxes are not working properly. They arent being highlighted or displaying the typical check mark when touched. I have also noticed that m_annot.GetEditType() returns -1.. What do I have to do?
Thanks
9 years 10 months ago #10567
by Davide
Replied by Davide on topic Checkboxes not being marked
Hi,
to perform the check mark you have to tap the checkbox and then tap the "Do button".
This button calls the onAct() method of PDFReaderAct that calls PDFPerformAnnot() that makes the tick.
The m_annot.GetEditType() correctly returns -1 because this annotation is not text-box, you should use m_annot.GetType().
For more info check this : www.radaeepdf.com/documentation/javadocs...ation.html#GetType--
to perform the check mark you have to tap the checkbox and then tap the "Do button".
This button calls the onAct() method of PDFReaderAct that calls PDFPerformAnnot() that makes the tick.
The m_annot.GetEditType() correctly returns -1 because this annotation is not text-box, you should use m_annot.GetType().
For more info check this : www.radaeepdf.com/documentation/javadocs...ation.html#GetType--
9 years 10 months ago #10569
by fdelcaz
Replied by fdelcaz on topic Checkboxes not being marked
Thanks. I´ve tried with getType() and it returns 20. I need the checkboxes to be marked automatically,, without tapping anything but the checkbox. Is this possible?
9 years 10 months ago #10570
by Davide
Replied by Davide on topic Checkboxes not being marked
Hi,
yes, you can move the code from PDFPerformAnnot (PDFReader.java) to the OnClick listener or where you want.
Something like that :
yes, you can move the code from PDFPerformAnnot (PDFReader.java) to the OnClick listener or where you want.
Something like that :
Code:
int check = m_annot.GetCheckStatus();
if( m_doc.CanSave() && check >= 0 )
{
switch( check )
{
case 0:
m_annot.SetCheckValue(true);
break;
case 1:
m_annot.SetCheckValue(false);
break;
case 2:
case 3:
m_annot.SetRadio();
break;
}
m_view.vRenderSync(m_annot_page);
if( m_listener != null )
m_listener.OnPageModified(m_annot_page.GetPageNo());
}
PDFEndAnnot();
Time to create page: 0.400 seconds