I want to disable the “highlight text” button when I open my pdf on adobe reader.
After process the pdf document how I will set the disable “highlight text” property.
PFA
rabin.zip (647 Bytes)
Could you please also share the expected output PDF where highlight text property is disabled. We will investigate on how to create such document and share our feedback with you accordingly.
The settings to block/disable highlight button can be specified by modifying document privileges. For example, please check following code snippet which is creating a PDF document and highlight button is disabled in it:
Facades.DocumentPrivilege documentPrivilege = Facades.DocumentPrivilege.ForbidAll;
documentPrivilege.ChangeAllowLevel = 1;
documentPrivilege.AllowModifyContents = true;
documentPrivilege.AllowDegradedPrinting = true;
documentPrivilege.AllowPrint = true;
documentPrivilege.AllowCopy = true;
Document doc = new Document();
doc.Pages.Add().Paragraphs.Add(new TextFragment("Hello World"));
Facades.PdfFileSecurity pdfFileSecurity = new Facades.PdfFileSecurity();
pdfFileSecurity.BindPdf(doc);
pdfFileSecurity.SetPrivilege(documentPrivilege);
pdfFileSecurity.Save(dataDir + "BlockHighlightButton.pdf");