hi everyone,
I'm trying to flatten pdf files which contain annotations :
for this I've tried to use SyncFusion's embedded function, which seems easy enough :
public void flattenPdfFileSyncFusion(string path)
{
//Load the existing PDF document
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(path);
//Get all the pages
foreach (PdfLoadedPage loadedPage in loadedDocument.Pages)
{
//Flatten all the annotations in the page
loadedPage.Annotations.Flatten = true;
}
//Save and close the PDF document instance
loadedDocument.Save(path);
loadedDocument.Close(true);
}
but the results are pretty strange, and the best outcome I could get (depending on source file) is this :
sometimes the annotations completely disappear too (maybe it depends on the original file generated from PDFCreator or WonderShare).
is it a common issue ?
and most importantly, is there any workaround to this ?
thank you