Welcome to the Xamarin.Android feedback portal. We’re happy you’re here! If you have feedback on how to improve the Xamarin.Android, 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!

0
Votes

Hi,
when flattening a pdf document, not all of the editable fields are beeing removed. This just happens, if a signature is on a page. And then only the page with the signature has that behavior. An example pdf document and its flattend form is attached.

Here is the code, I use:


private void FlattenAnpassbogen(EditablePdfDocumentInstance pdfDocument)

{

if (pdfDocument == null)

throw new ArgumentNullException(nameof(pdfDocument));


using(PdfLoadedDocument doc = new PdfLoadedDocument(pdfDocument.Data))

using (MemoryStream targetStream = new MemoryStream())

{

if(doc.Form != null)

doc.Form.Flatten = true;


doc.Save(targetStream);


targetStream.Flush();


pdfDocument.Data = targetStream.ToArray();

}

}