Skip to main content
Participant
February 11, 2011
Question

Flattening on X Standard?

  • February 11, 2011
  • 1 reply
  • 25808 views

I recently upgraded to Adobe X Standard and cannot find a quick way to flatten files.

Previously in 8 and 9 I had used the javascript approach: http://blogs.adobe.com/acrolaw/2010/02/add-a-flatten-document-menu-item-to-acrobat/.

When I purchased X, I thought I would be able to used the Action Wizard, but did not realize it Standard does not support the Action Wizard: http://acrobatusers.com/content/flatten-fields-and-comments.

Is there any way to easily flatten on X Standard (other than printing)?  Is a java script available for X that I simply haven't found?  Or do I need to upgrade to X Pro?  Thanks.

    This topic has been closed for replies.

    1 reply

    Inspiring
    February 11, 2011

    Did you copy the folder JavaScript file to the new installation? If so, it may need to be editied depending on which menu item it used, since a lot of them were removed with Acrobat 10.

    As a test with a copy of a document, try opening the interactive JavaScript console (Ctrl+J) and enter the following line of code:

    flattenPages();

    Click on the line or highlight it, and press Ctrl+Enter. This should execute the code and flatten all pages in the document. If it gives an error, post again and include exactly what it says.

    BTW37Author
    Participant
    February 11, 2011

    For some reason my interactive javascript consule is not appearing.  CTRL J isn't bringing anything up.  I did copy the script for 8 and 9 into my X Program File prior to the first post and have not had any results.

    Bernd Alheit
    Community Expert
    Community Expert
    February 11, 2011

    Use this:

    function Flatten(boolCurrentPageOnly) // Takes a boolean argument
    {
      var i
      // Give them a chance to back out
      i = app.alert("Are you sure you want to do this?", 1, 2)
      if (i != 3) { // If they didn’t click "No"...
        if (boolCurrentPageOnly) // Flatten either this page...
          this.flattenPages(this.pageNum)
        else
          this.flattenPages() // ...or all pages
      }
    }

    app.addMenuItem({
    cName: "Flatten current page",
    cParent: "File",
    cExec: "Flatten(true)"});
    app.addMenuItem({
    cName: "Flatten all pages",
    cParent: "File",
    cExec: "Flatten(false)"});