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!>
Thanks for joining our community and helping improve Syncfusion products!
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();
}
}