Welcome to the .NET MAUI feedback portal. We’re happy you’re here! If you have feedback on how to improve the .NET MAUI, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hi, if the pdfviewer contains a combobox without a selected item then the SaveDocument methods fail with a System.ArgumentOutOfRangeException.

Sample code:
PdfDocument document = new PdfDocument();
PdfPage page = document.Pages.Add();
PdfComboBoxField comboBoxField = new PdfComboBoxField(page, "JobTitle");

comboBoxField.Bounds = new Syncfusion.Drawing.RectangleF(0, 40, 100, 20);
comboBoxField.Items.Add(new PdfListFieldItem("Development", "accounts"));
comboBoxField.Items.Add(new PdfListFieldItem("Support", "advertise"));
comboBoxField.Items.Add(new PdfListFieldItem("Documentation", "content"));
document.Form.Fields.Add(comboBoxField);

MemoryStream stream = new MemoryStream();
document.Save(stream);
stream.Position = 0;
pdfViewerControl.DocumentSource = stream;


var stream = new MemoryStream();
//await pdfViewerControl.SaveDocumentAsync(stream);
pdfViewerControl.SaveDocument(stream);   => 

System.ArgumentOutOfRangeException