Remove text from document

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v11)  /  Re: Remove text from document

DynamicPDF CoreSuite for .NET (v11) Forum

 Jan 18 2021 12:15 PM
Hello,

Is it possible to remove/cut/hide text from a document?

Thanks,
Vlad
 Jan 18 2021 12:32 PM
Posted by a ceTe Software moderator
Hi Vlad,

DynamicPDF Core Suite for .NET does not support removing text from an existing PDF.  If you know the position of text then you can add a white rectangle on top of the text to hide it, but please note that the text is still copyable.

Thanks,
ceTe Software Support Team
 Jan 18 2021 12:49 PM
Hi,

I have the problem that I have somehow to mark a document as not approved, by inserting a text or an image or something alike.
A couple of days later someone electronically signes the document and then I have to remove this mark.
Is there a way to do this?
For instance, if I insert a watermark, can I remove it later?

Tanks,
Vlad
 Jan 18 2021 1:55 PM
Posted by a ceTe Software moderator
Hi Vlad,

Can you keep an original version of the PDF and then provide a different one that shows not approved. Then when they digitally sign it, sign the original one?

Another approach may be to add a form field, then remove it later. Here is a code sample:
            Document document = new Document();
            Page page = new Page();
            document.Pages.Add(page);

            ceTe.DynamicPDF.PageElements.Forms.TextField txtField = new ceTe.DynamicPDF.PageElements.Forms.TextField("txt1", 100, 100, 100, 30);
            txtField.ReadOnly = true;
            txtField.BackgroundColor = RgbColor.AliceBlue;
            txtField.DefaultValue = "Remove this Text";
            page.Elements.Add(txtField);
            // Save the PDF
            document.Draw(@"C:\Temp\MyTextDocument.pdf");

Below is a code sample to remove a form field using its name.

            PdfDocument pdf = new PdfDocument(@"C:\Temp\MyTextDocument.pdf");
            MergeDocument document = new MergeDocument(pdf);
            document.Form.Fields["txt1"].Output = FormFieldOutput.Remove;
            document.Draw(@"C:\Temp\MyDocument.pdf");

Thanks,
ceTe Software Support Team
 Jan 19 2021 4:03 AM
Hi,

I like the second solution very much, it does what I need.
I tried it with the trial version and it works fine.

We have an old license bought 8 or 9 years ago (ceTe.DynamicPDF.20.dll), the features used are not included.
Is it possible to renew this license?

I suppose I need the Core Suite for .NET Essential Developer or Full Developer License.

Thanks,
Vlad

 Jan 19 2021 10:52 AM
Posted by a ceTe Software moderator
Hi Vlad,

Please send the information about your old license to sales@dynamicpdf.com and we'll let you know the options available to upgrade it to v11.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 9:42 PM.