3 Replies Latest reply on Mar 23, 2012 11:26 AM by Willi Adelberger

    How to export heading tags from InDesign to PDF


      I'm trying to get a better handle on the steps required to pass heading tags from InDesign to PDF.


      Using InDesign CS5.5…


      Method 1 (works):


      The "Map Styles to Tags" feature, accessible from the Structure Panel menu, works. I can map document styles to H1, H2, artifact, etc. and after exporting to PDF, the tag structure includes tags like <_H1_>, <_H2_>, etc., with the original styles nested as tags inside those structural tags, like this:







      JAWS and NVDA recognize these as headings.


      Method 2 (does not work):


      If a document does NOT have styles, I would expect to be able to still tag its elements without having to create new styles. Is this possible? It seems to be: I can right click on individual elements within the Structure Panel, and select "Tag Element", then choose the appropriate tag (again, H1, H2, etc.)  I would expect that to work, but if I do this, then export to PDF, the PDF has a tagged structure that looks superficially a lot like the previous example (with <_H1_> and <_H2_> tags). However, neither JAWS nor NVDA recognizes these headings. Why not? Am I missing a step?


      If an element is tagged as an Artifact following this same procedure, it is in fact an artifact. So "Tag Element" from the Structure panel seems to work for Artifacts, but not headings.


      Using InDesign CS4 (version 6.0.6)… 


      I can't figure out how to pass heading tags to PDFs at all.  I've tried this using both of the methods documented above for CS5.5, but neither of them worked.  Since Method 1 works in CS5.5, I was especially hoping that would work in CS4. However, if I follow the same procedure, the tagged structure in the PDF does not include H1 or H2 tags (nor _H1_ or _H2_). Instead it contains "Heading1" and "Heading2" but JAWS and NVDA don't recognize those as headings.


      There's another problem with the PDF too: The <Heading1> tag includes a buffer of containers nested between it and its  content (<NormalParagraph> and <Span>).


      In order to make this document readable by screen readers using Acrobat Pro, I have to change "Heading1" to "H1" and I have to remove the inner nested container tags. Performing either one of these fixes without the other does not fix the document. I'm not sure how to avoid having those nested tags in InDesign - the structure I'm seeing in the Structure Panel is flat. The element I've tagged as an H1 is a child of Article, and there are no other tags inside it, so those tags seem to be generated during the export to PDF.


      I've tried consulting all the Adobe help resources I could find on this topic, but none of them address these problems. 

        • 1. Re: How to export heading tags from InDesign to PDF
          Jeffrey_Smith Most Valuable Participant

          Have you read this whitepaper ? It seems to address a number of your questions.

          1 person found this helpful
          • 2. Re: How to export heading tags from InDesign to PDF
            tfthompso Level 1

            Thanks for your reply, Jeffrey.  Yes, I read the white paper and it describes yet another method for mapping styles to tags (using Export Tagging via the Paragraph Style Options dialog). Like Method 1 described in my original question, that does work in InDesign CS5.5 and results in a PDF with screen-readable headings.


            What's not explained in the white paper though is:


            1. Whether it's possible at all to tag headings if there are no paragraph styles. I know having no styles in an InDesign document is not good practice, but in higher education I frequently encounter documents where the author has not included styles. Typically I think the authors have inherited a workflow that includes InDesign, but aren't proficient at using the tool. Since InDesign includes an option within the Structure Pane to tag each item individually, I would expect this to result in a screen-readable document even if styles aren't present, but I'm getting the sense that isn't the case, and for tags to work they're actually dependent on styles. If it's true that tagging items individually doesn't work, then what is the purpose of the "Tag item" option in the Structure Pane? Are there use cases where one would select this option, and if so, what is the effect?


            2.  Is it possible to produce a PDF with screen-readable headings usign InDesign CS4? Clearly CS5.5 has made some major improvements in accessibility but for some of the folks I'm working with upgrading from CS4 isn't currently an option. CS4, like CS5.5, has options to map styles to tags, and to tag items individually. Like CS5.5, tagging items individually doesn't seem to work; and unlike CS5.5, mapping styles to tags doesn't seem to work either.


            Thanks again.

            • 3. Re: How to export heading tags from InDesign to PDF
              Willi Adelberger Most Valuable Participant

              1. Without having styles it is not possible to tag paragraphs and texts automatically. It is one of the reasons why anyone should use styles for any text.

              2. Nope, it is not possible to tag based on text and their styling only. This is a new feature of Id CS5.5.