Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Locking text boxes within a pdf

New Here ,
Mar 08, 2021 Mar 08, 2021

Hi there. I need to lock multiple text boxes within a pdf document. The document has over 600 pages and there are 4405 text boxes. I know that in theory I can lock all by going to Tools/Comments/Open then selecting all the comments, right click and tick Locked but the document is so big that it crashes when I try to do this. Even scrolling down the list of comments to highlight prior to right clicking them all takes ages and then results in a Not Responding message. Any tips for a pain-free way to do this, please?

 

TOPICS
Edit and convert PDFs
6.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Mar 08, 2021 Mar 08, 2021

Assuming you mean Text Box comments you can do it using this script:

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
	for (var i in annots) {
		var annot = annots[i];
		if (annot.type=="FreeText") annot.setProps({lock: true, readOnly: true});
	}
}

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2021 Mar 08, 2021

Hi,

Can you include a screenshot and a description of what you would like to achieve at the end.

Are you trying to manage comments, text fields of a form,...?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2021 Mar 16, 2021

Hi there. I haven't been able to share a screenshot, sorry. I'm basically trying to lock all the annotations that have been added to a pdf document so they can't be moved around the page. The issue I'm having is that when I try to select all the text box comments the document starts to crash every time as it's so big. I  don't have javascript editor so can't use the scripts offered as solutions. Most of the text boxes are already locked so I basically need an esay way to select only those that are unlocked so I can then lock them en masse but I can't figure out how to do this. If I filter by author/reviewer etc. it's still too big and keeps crashing.

Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2021 Mar 16, 2021

If you have Acrobat then you have a JavaScript editor. Press Ctrl+J to display it.

Then paste the code into it, select it all and press Ctrl+Enter to run it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2021 Mar 16, 2021

Ctrl J does nothing on my Adobe, sorry

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 16, 2021 Mar 16, 2021

Would this work on external javascipt editors?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 16, 2021 Mar 16, 2021
LATEST

Adobe is a company. What exact application are you using, including version number?

Also, what's your OS version?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2021 Mar 08, 2021

Assuming you mean Text Box comments you can do it using this script:

 

this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
	for (var i in annots) {
		var annot = annots[i];
		if (annot.type=="FreeText") annot.setProps({lock: true, readOnly: true});
	}
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines