Exemplo n.º 1
0
        private bool HasPageNumber(FooterReference footerReference)
        {
            var document   = footerReference.Ancestors <Document>().Single();
            var footerPart = (FooterPart)document.MainDocumentPart.GetPartById(footerReference.Id);
            var fieldCodes = footerPart.Footer.Descendants <FieldCode>();

            return(fieldCodes.Any(fc => fc.Text.Contains("PAGE")));
        }