Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Stacking Order Bug when Exporting to Interactive PDF

IShouldBeInFront

I recently encountered a bug in InDesign’s stacking order when exporting to Interactive PDF. Apparently, I am not the only person having this issue, so I wanted to pass along the news and a fix.

I created a layout in InDesign that contained several layers, and objects that had been converted to buttons. In this case, it is a stack of images that together make up a coconut. In InDesign, the looked like this:

InDesign Layout, Properly Stacked

InDesign Layout, Properly Stacked

But when I exported an interactive PDF, this is what I got:

Interactive PDF with Wrong Stacking Order

Interactive PDF with Wrong Stacking Order

Even though each object was on the appropriate layer in InDesign, the stacking order of the layers was totally ignored in the PDF file.

After some experimenting, I found that by exporting to a Print PDF, I could obtain the correct stacking order. And I also found that by converting the different objects from buttons back to regular objects, the stacking order was correct in the PDF. To confirm this, I made a new document and tried to recreate the problem. Here is my layout in InDesign:

Correct Stacking Order in InDesign

Correct Stacking Order in InDesign

But after I converted the objects to buttons and exported an interactive PDF, this is what I got:

Wrong Stacking Order in Interactive PDF

Wrong Stacking Order in Interactive PDF

So I did another experiment with more objects to confirm my suspicion. First I made a correctly stacked layout in InDesign.

CMYK Buttons with Correct Stacking Order

CMYK Buttons with Correct Stacking Order

But I got the following result in the interactive PDF after creating the buttons in this order:

  1. Magenta
  2. Black
  3. Yellow
  4. Cyan

Stacking Order: Magenta, Black, Yellow, Cyan

Stacking Order in Interactive PDF: Magenta, Black, Yellow, Cyan

It turns out that there is a bug in InDesign that affects the stacking order in interactive PDFs. The stacking order is determined by the order in which the buttons are created. Buttons created first go at the bottom of the stacking order in the PDF. I compare it to a stack of paper: a sheet of paper put down first goes at the bottom of the pile. Then, each subsequent piece is stacked on top of it.

So the moral of the story is that if your stacking order is incorrect in an interactive PDF, remake your buttons, in the order opposite of how they should appear in the final PDF. I realize that may be a huge endeavor if you document has lots of buttons with lots of actions.

InDesignSecrets has several other articles on interactive buttons (see related articles, below). You can read the entire discussion on the forums here: http://forums.adobe.com/message/5340443#5340443.

Tags
Related Articles
Comments

16 Comments on “Stacking Order Bug when Exporting to Interactive PDF

  1. I think each time you cut and paste something it’s actually considered a new object by InDesign. So you can avoid having to remake the buttons by cutting and pasting them in place to change their “newness” and thus their stacking order in the PDF.

    Like in your CMYK example, cut the M and Y buttons together and paste them in place. Then cut and paste in place the K button. Then the “age” of the buttons is C M Y K and the PDF will come out with them in that stacking order.

    The same trick works for numbered paragraphs in separate text frames on a spread.

  2. Here’s another workaround: I think it’s easier than re-cutting and pasting.

    Use the Object > Interactive > Set Tab Order dialog. If you name your buttons (always a good idea), arrange them in bottom-to-top order: Cyan, Magenta, Yellow, Black.

    Then you’ll appear in that stacking order from back to front.

    • Well sure, if you want to be all organized and professional about it ;)

      It could also be a little confusing at first since as you say the order is reversed (you’d to click the Move Up to move a button down in the PDF stacking order).

  3. As the stacking order is also the tab order, you can get your stacking in order in Acrobat, by opening the Forms Edit mode and adjust the (button) fields in the Fields panel with manual tab order selected.

    • Replying to myself? I would not really consider it a bug, but a shortcoming.

      In PDF, annotations (to which form fields also belong) are by default stacked in the order of creation, and it requires an additional step to change the order of references to the objects, as mentioned by Mike Rankin.

      It would, of course, be a nice feature to have, if the stacking order for the fields would be taken from the general stacking order in the InDesign document.

  4. There stacking order is also a problem in accessible print PDFs. The reading order is supposed to derive form the articles panel which is a top down order. However, the stacking order which is bottom up will trump the article order every time. I don’t know why Adobe doesn’t just make them both top down which is more logical. Top down effects appearance of course, which can leave you with a problem if you have many graphics under type and you want the type to read first.

  5. I also discovered stacking order problems in both ID6 print documents and export to print pdf.

    Even with separate layers, with the items needed to be above all others, using Bring to Front for lines/strokes for a grid of images, InDesign refuses to place the vertical stroke lines in front.

    Definitely a bug.

  6. Actually no!

    it doesn’t work!
    I made all the buttons in reversed time stamp like indicated above but it didn’t work for me!

    indesign :
    Layer 1 (button)
    Layer 2 (button)
    Layer 3 (button)
    Layer 4 (button)

    export interactive pdf:
    Layer 2 (button)
    Layer 1 (button)
    Layer 4 (button)
    Layer 3 (button)

  7. Seriously how RETARDED are Adobe???

    to sell a product which is totally dysfunctional & has put me in HUGE trouble!
    i feelike suing them!!!

    im so pissed for the waste of time all this is causing me!
    I had a deadline to respect & because of them I have PASSED it! & still haven’t found a solution which works!

  8. There are soooo many of my buttons which aren’t functioning anymore after being exported to interactive pdf!
    Im pulling my hair!

    I Hate indesign finally! Ive lost soooo much time because of all this! it’s ridiculous!
    Worst softwarEVER!!

    Also I don’t understand… if I export my file in Swf.. apparently it can’t be seen on iPad right?
    Can someone be kind enough to come forward & help here??
    thanks

    • strawberrycupcake: I’m sorry you’re having trouble here, but it’s true that making complicated interactive PDF documents is… well, complicated. Often the problem is Acrobat, not InDesign. There are many things that don’t work right when you export to interactive PDF currently, including animations, etc.

      You are right that SWF cannot be viewed on an iPad. But I have some bad news for you: BUTTONS cannot be viewed on an iPad in most PDF readers (including currently Adobe’s). So if you’re relying on buttons, your PDF is probably not going to work correctly on an iPad.

      • One problem is that InDesign can create active elements which can not be represented in PDF. Most is caused because it creates eye candy, but if I remember correctly, there are some elements which are simply illegal in PDF (such as three-state checkboxes).

        Most of these active elements use Flash, which can be used with PDF, but then limits the user to Adobe PDF viewers on the desktop.

        One can understand that PDF is not only output path for interactive documents in InDesign, so one has to expect issues somewhere.

        Another thing appears with this issue as well: how little the various kingdoms at Adobe talk to each other, and how little enterprise-wide base technology planning there is…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>