Skip to main content
kima74036004
Participant
Jan 6, 2016 2:13 PM UTC
Answered

How to 'Flatten' in Adobe Acrobat Pro DC

We recently purchased Adobe Acrobat Pro DC and I'm trying to figure out how to take a document that I added a stamp to and flatten it so our users cannot delete the stamp from it.  I have found the 'Flatten' option but it is greyed out.  The only option in the menu available is 'Import as Layer'.  How do I enable the 'Flatten' feature?  In previous versions, I used a java script to flatten when the option was not available.

Thom Parker
Thom ParkerCorrect answer
Community Expert
Apr 28, 2025 4:50 PM UTC

The easy thing to do would be to download the free flatten tool linked above. It includes a page range.

Or the next easiest method is to run this code in the Console Window:

 

this.flattenPages(nPage);

 

where you replace "nPage" with the page number minus 1, because page numbers in the JavaScript model start at 0. 

 

Here's a video turorial on the Console:

https://www.pdfscripting.com/public/images/video/AcroJSIntro/AcroJSIntro_ConsoleWindow.cfm

 

 

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

36 replies

Thom Parker
Community Expert
Community Expert
Dec 14, 2021 11:09 PM UTC

The flattening feature mentioned by  kima74036004 is not for flattening annotations (i.e. stamps) into the page content.  It is for something entirely different. 

To preform real flattening you'd have to do one of three things.

 

1. Use the Preflight flattening mentioned in the previous post

2. Print to PDF or PS. This technique literally destroys the current struture of the PDF and rebuilds it. All non-visual data is lost. But it works. And it works with Reader. 

3. Use the JavaScript flatten function. This is the easiest and most flexible flattening method. You'll find a free Add-in tool that uses this method here:

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

 

 

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
Dec 1, 2020 7:58 PM UTC

I have several documents that need to be flattened, is there a way to flatten them all at once or do you have to do each one individually?

 

Translate
Thom Parker
Community Expert
Community Expert
Dec 1, 2020 8:51 PM UTC

Use an Acrobat Action. Find the "Action Wizard" in the Acrobat Tool listing

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
Nov 13, 2020 6:26 PM UTC

I have pdfs that have linked email addresses in them. Using the Preflight fix-up above does not remove the links and saving as an optimized pdf is not working either. Am I missing something or is there another way to remove the email links? Thanks

Translate
Participant
Oct 30, 2020 10:11 PM UTC

in the windows version you got to print, and save as a pdf, and that flattens the file, in the mac version there is some blockage that does not allow you to do this

 

Translate
JR Boulay
Community Expert
Community Expert
Dec 15, 2021 9:00 AM UTC

This book explains why you never never never should refry a PDF:

https://documentcloud.adobe.com/link/track?uri=urn%3Aaaid%3Ascds%3AUS%3A68be905e-5698-4cd4-9a87-61e7ab9ba3fe

Translate
Acrobate du PDF, InDesigner et Photoshopographe
Thom Parker
Community Expert
Community Expert
Dec 15, 2021 9:14 PM UTC

JR, I have to disagree with you on this point.   As anti-refry as Leonard is (and I know this personally from all the conferences and events we used to attend. He's quite animated on the topic), even he admits in the article that refrying may be unavoidable, so use EPS, not PS.   

However, all of the arguments in the article revolve around visual fidelity.  In nearly all of the cases for my clients, visual fidelity is a very low level consideration. And I would say the same for nearly all the members of the Acrobat Forums. The top priority for these users is the usability of their workflow. I know that in every case Adobe will claim there is a solution that doesn't require refrying, and they are correct. However, I have dealt with very few individuals who would ever consider an AEM solution, on cost alone.  Refrying is simple and effective for these users, who I think represent the vast majority.  Is it ideal? absolutely not, but it's cheap and accessible, which is way more important. 

 

 

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Known Participant
Sep 25, 2020 12:34 AM UTC

I ran this tool and it did not work for me.  I have a PDF document with a single image "floating" over the document.  If you click on it, only the image is selected. not the entire page.  I want the image "flattened" so that the page appears the same, but if you click on what was the image, the page is selected.  That's a pretty simple request, but this tool won't do that.  I runs, it saves a new file, but the new file is identical to the old file; click on the image and only the image is selected.

Translate
Bernd Alheit
Community Expert
Community Expert
Sep 25, 2020 5:37 AM UTC

Export the file as TIFF images.

Combine the images as a new PDF file.

Translate
Luisito77
Participating Frequently
May 28, 2020 3:32 PM UTC

Thanks for the info.

 

However, using this method still leaves the resulting PDF file "editable" and NOT entirely flatten.

 

The script suggested works much better.

 

Cheers!

 

STAY SAFE

Translate
Participating Frequently
Apr 28, 2020 11:37 PM UTC

If the goal of flattening is to make the pdf text unselctable to edit, which was my goal, the simple way is to save it as a jpeg, then open it in an application like Photoshop and Save As a PDF. Flattened and uneditable.

Translate
Participating Frequently
Feb 21, 2020 8:05 PM UTC

This worked perfectly to flatten form fields. Thank you!

Translate
parkanian
Participant
Nov 20, 2017 5:06 PM UTC

Best flattening tool out there is UVSAR's selective flattener. It's a Creative Commons Share-alike license, so free to use and install, and it's an open source JS file: UVSAR : Selective Flattener tool for Adobe Acrobat 8, 9 and X ​

Places a menu item in the Edit menu called "Flatten" - WAY WAY WAY faster than any of the built-in options.

Alternatively, Foxit Phantom PDF has a nice implementation of Flatten, but they haven't implemented the full Adobe standard yet, so it may not be the best option if you need to do things like use digital signatures and/or view 3D PDFs.

Translate
Syd.Salmon
Participant
Feb 6, 2018 9:21 PM UTC

Excellent suggestion, parkanian. This is the fastest way and most natural flattener.

Translate
Adobe Employee
Feb 12, 2016 4:32 AM UTC

You can also use an existing Preflight fix-up "Flatten annotations and form fields".

Steps:

1. Go to Print Production app.

2. Click on Preflight option from Right panel.

3. Search for the fixup "Flatten annotations and form fields".

4. Run the profile by pressing "Analyze and fix" button.

Regards,

Priyanka

Translate
Participant
Aug 3, 2023 12:00 AM UTC

This is the best, easiest solution.

Translate