// Flatten all pages
I've never done this.
I did "command J"
what do I do after I enter "// Flatten all pages"
Open pdf. Go to Tools->Actions->Create New Action.
In the dialog that appears, select Content and there you'll see Flatten Layers. Create an action from there and once done, use that action from Tools->Actions menu to flatten pages.