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

Flatten shapes created as comments

New Here ,
Jan 17, 2025 Jan 17, 2025

I've just finished a form and have since realized I committed an Adobe sin and used the comments tools to create what i intended to be visble lines to help divide up sections of the form.  I'm using Acrobat Standard and am curious if anyone can offer me some guidance on converting these lines into static elements and making them unselectable.  I didn't even notice this was an issue until I doubled back to test ans adjust the tab order and these lines showed as selectable..  Or, if they can't be converted in some manner, is there a way i can replace them with other lines to take their place?  I don't have the heart to start over from scratch.

 

I've seen some other threads suggesting the comments can be flattened with javascript?  Is that an option?  If so, could someone help me with that?

 

TOPICS
How to , JavaScript , PDF , PDF forms
418
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 ,
Jan 17, 2025 Jan 17, 2025

Please can someone help me in filling out the forms

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 ,
Jan 17, 2025 Jan 17, 2025

You can flatten them.  However, the process will flatten all annotations and all form fields unless you do it properly.  You must set the bNonPrint parameter to 1 (Non-printing annotations are left as is) and then set the form fields display property to display.noPrint and set  the print property of any other annotations that you don't wish to flatten to false.  After flattening, change the displays and print properties back to the way they were.  The flattening script to run would be:

this.flattenPages({bNonPrint: 1});

You can simply run this script in the console.  If you are using Standard, I don't believe you can open the console with the UI so create a button (visible but doesn't print) with the following mouse up action:

console.show();

www.pdfscripting.com used to have a free tool that automates all of this for you.  I don't know if it's still available.

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 ,
Jan 17, 2025 Jan 17, 2025
LATEST

Run this code in the console window

this.flattenPages();

 

It'll flatten all annotations in the PDF.  

 

There is a free flattening tool here:

https://www.pdfscripting.com/public/Free_Acrobat_Automation_Tools.cfm 

 

There is a selective flattening tool here, but it's not free:

https://www.pdfscripting.com/public/Selective-Flatten-Tool-Description.cfm

 

 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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