When creating a PDF document containing a RadiobuttonField, and then opening this document on an Android device using Adobe Acrobats official Android application, the document cannot be opened.
Message: File is damaged or corrupt.
Reproduce:
1.Create a pdf containing a RadioButtonField
2.Open this document on an Android device using Adobe Acrobat on Android (Not Adobe Reader for windows)
3.Click on one of the options
4. The application displays errormessage “File is corrupt or damaged”. Application exits
SampleCode:
Aspose.Pdf.Document doc = new Aspose.Pdf.Document();
Page p1 = doc.Pages.Add();
//tbl to keep the checkboxes in
Table tbl = new Table();
tbl.ColumnWidths = "100";
var tbl_r1 = tbl.Rows.Add();
var tbl_r1_cell1 = tbl_r1.Cells.Add();
var tbl_r1_cell2 = tbl_r1.Cells.Add();
p1.Paragraphs.Add(tbl);
RadioButtonField radio = new RadioButtonField(p1);
radio.PartialName = "opt";
RadioButtonOptionField opt1 = new RadioButtonOptionField(p1,new Aspose.Pdf.Rectangle(0,0,0,0));
opt1.OptionName = "Test1";
radio.Add(opt1);
opt1.Width = 20;
opt1.Height = 20;
RadioButtonOptionField opt2 = new RadioButtonOptionField(p1, new Aspose.Pdf.Rectangle(0, 0, 0, 0));
opt2.OptionName = "Test2";
radio.Add(opt2);
opt2.Width = 20;
opt2.Height = 20;
doc.Form.Add(radio);
tbl_r1_cell1.Paragraphs.Add(opt1);
tbl_r1_cell2.Paragraphs.Add(opt2);
doc.Save(@"..\..\output\android_formfield.pdf");
System.Diagnostics.Process.Start(@"..\..\output\android_formfield.pdf");