Skip navigation
Currently Being Moderated

Flattening on X Standard?

Feb 11, 2011 12:19 PM

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-ite m-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.

 
Replies
  • George Johnson
    11,668 posts
    Aug 11, 2002
    Currently Being Moderated
    Feb 11, 2011 12:34 PM   in reply to BTW37

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 11, 2011 12:55 PM   in reply to BTW37

    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)"});

     
    |
    Mark as:
  • George Johnson
    11,668 posts
    Aug 11, 2002
    Currently Being Moderated
    Feb 11, 2011 12:56 PM   in reply to BTW37

    I don't have Standard 10 to test this with, but see if you've enabled the console by checking "Edit > Preferences > JavaScript". Here's what Acrobat 9 Pro looks like (in part):

     

    js_console.png

     

    Does the menu item get created by the code in the folder-level JavaScript get displayed? If not, can you post again with the exact location of the file as well as the relevant code inside it?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 11, 2011 2:57 PM   in reply to BTW37

    You might want to look at Free Acrobat Automation Tools at PDFScripitng.com.

     

    You also might want to look over Entering Folder Level Scripts by Thom Parker to learn how to install application folder level scripts.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 12, 2011 8:23 AM   in reply to BTW37

    Unless the file is secured or converted into a series of full-page images, it will *always* be editable in Acrobat. That's why people buy Acrobat.

     

    Flattening converts annotations into page content, so it becomes just like the rest of the text. It has no effect on optional content groups (OCG, also known as layers) - that's an entirely different thing. You can merge OGCs using the tools on the Layers Navigator tab, or use Sanitize Document to flatten and merge everything that's visible, but it will STILL be editable.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 30, 2011 1:48 PM   in reply to Dave Merchant

    Is there a fax way to convert the open document to an PDF Image? I have the same issue as the post creator has.  I actually sign documents using stamps and then print to Adobe PDF printer, go into advanced, and choose "print as image".  This is annoying to change back and forth. 

     

    If there were a way to use a button that always printed to PDF as an image, it would save me a lot of time and keep my signatures safe.  Do you know how to do this?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points