public bool CheckIfDocumentWillBeModified(ILocalPdfEffectSettings localDataObject)
 {
     LocalTextEffectSettings localData = (LocalTextEffectSettings)localDataObject;
     if (localData.LocalTextIsUsed && localData.Text.Trim() == "") return false;
     if (!localData.LocalTextIsUsed && this.Text.Trim() == "") return false;
     return true;
 }
        public void ApplyEffect(ILocalPdfEffectSettings localDataObject, PdfDocument document)
        {
            LocalTextEffectSettings localData = (LocalTextEffectSettings)localDataObject;
            string drawText = Text;
            if (useLocalTexts) drawText = localData.Text;

            for (int i = 0; i < document.PageCount; i++)
            {
                PdfPage page = document.Pages[i];
                if (pages == PagesType.All) WriteOnPage(page, drawText);
                if (pages == PagesType.First && i == 0)
                {
                    WriteOnPage(page, drawText);
                    break;
                }
            }
        }