About Arbortext Styler > Document Preview and Publishing > Generating Accessible PDF Output > User Assigned PDF Tags and Attributes
  
User Assigned PDF Tags and Attributes
Arbortext Styler associates a default PDF tag with each style in the stylesheet, when it is set to generate tagged PDF output. The attributes Lang, RowSpan, and ColSpan will also be set with default values as needed by the PTC ALD engine. You can manually override these default settings, or add other standard tags or attributes, to meet your own requirements. Use the PDF tags category to assign non-default PDF tags or attribute for individual elements, contexts, or conditions, or for property sets.
These options are only available when you are publishing tagged PDF with the PTC ALD engine.
Refer to Validating a Tagged PDF Structure for information on how to validate your tagged PDF settings and output.
Overriding the default PDF tag setting for an element
The procedure below explains how to override the default PDF tag that has been assigned to an element based on its style. The PDF tag will be output for every instance of the element from the document, when the document is published as tagged PDF.
For example, the draft-comment element has the Inline style (Inline structure) in your stylesheet. By default it will not output a PDF tag based on its style, when the source document is published to tagged PDF. To specify that draft-comment elements should output the Annot PDF tag in tagged PDF output, follow the steps below in Arbortext Styler:
1. Navigate to the Print/PDF tab of the Stylesheet Properties dialog box. Confirm that the Generate tagged PDF option is selected. Selecting this option will ensure you have access to the controls in the PDF tags category. Confirm that your environment is set to use the PTC ALD print engine.
2. Select the draft-comment element in the Elements list.
3. Navigate to the PDF tags category.
4. From the Element tag drop down list, select Annot. You have now associated the Annot PDF tag to the draft-comment element. As it is an explicit setting, note that the title of the drop down list is now bold and blue.
5. Publish tagged PDF, selecting the Tagged PDF option in the Publish to PDF File dialog box.
In the resulting tagged PDF output, you will see an Annot PDF tag output for every instance of a draft-comment element in your source document.
In this example, you have configured a single PDF tag for an element. Arbortext Styler also provides the option to configure primary and secondary (nested) tags for elements of certain styles. Refer to Configuring Primary and Secondary PDF Tags below for information.
Assigning an attribute to a PDF tag
The procedure below shows how to add a PDF attribute to the PDF tag output for an element when published to tagged PDF output. You will also specify that the value of the PDF attribute in output should be the value of an XML attribute on the source element.
* 
A PDF tag attribute can only be configured for the Element tag.
For example, abbr elements in your source document include an attribute expansion, whose value is the full version of the abbreviation. Use the steps below to output the PDF attribute /E on the PDF tag output for the abbr element, and pass the value of the original expansion attribute as its value.
1. Navigate to the Print/PDF tab of the Stylesheet Properties dialog box. Confirm that the Generate tagged PDF option is selected. Selecting this option will ensure you have access to the controls in the PDF tags category.
2. Select the abbr element in the Elements list.
3. Navigate to the PDF tags category.
4. Note the PDF tag that the element is set to output, for example Note.
You cannot set a PDF attribute if the Element tag is not configured for the element.
5. In the Attributes field, click Add to open the PDF Attribute dialog box.
6. From the PDF attribute drop down list, select E. You will see that the Synchronize with HTML attribute box is checked, with a suggested attribute in the associated drop down list. Make changes to this setting if required. Deselect it if you don’t plan to generate a corresponding attribute in HTML output from the same source, or wish to provide a different attribute for the element in HTML output.
7. In the Value field, select the From attribute option.
8. In the From attribute field, enter the name of the source attribute, i.e. expansion. The XML attributes defined for the element in the DTD/schema are listed in the drop down list for selection. You may have to type the attribute name in the field if it is not declared in the DTD/schema.
9. Click OK to exit the dialog box. You will see that the PDF attribute setting is listed in the Attributes table of the PDF tags category.
10. Publish tagged PDF, selecting the Tagged PDF option in the Publish to PDF File dialog box.
In the resulting tagged PDF output, you will see a Note PDF tag output for every instance of an abbr element in your source document. Each one will have an /E attribute whose value is the value of the expansion attribute on its source element.
Configuring Primary and Secondary PDF Tags
You can configure primary and secondary (nested) PDF tags to represent the constituent parts of certain elements. Arbortext Styler provides these PDF tag options:
Primary tag
Element tag — represents the whole element
Secondary tags
Before-text tag — represents any generated text output by the element
If this PDF tag is configured for the element, but the element generates no generated text, this PDF tag will not be output.
Element content tag — represents the element’s content
The availability of secondary tags depends on the setting of the primary tag. Refer to Validating a Tagged PDF Structure below for details of the rules controlling secondary tags.
For example, you can configure a list item element to output three PDF tags that wrap the list item itself, its generated text marker, for example a bullet, and its text content. Follow the steps below:
1. Navigate to the Print/PDF tab of the Stylesheet Properties dialog box. Confirm that the Generate tagged PDF option is selected. Selecting this option will ensure you have access to the controls in the PDF tags category.
2. Select the element that represents the list item in the Elements list, for example li.
3. Navigate to the PDF tags category.
4. In the Element tag drop down list, select the PDF tag that represents the list item element, for example LI.
5. In the Before-text tag drop down list, select the PDF tag that represent the list item’s generated marker, for example Lbl
6. In the Element content tag drop down list, select the PDF tag that represents the text content of the list item, for example LBody.
7. Publish tagged PDF, selecting the Tagged PDF option in the Publish to PDF File dialog box.
In the resulting tagged PDF output, you will see this type of PDF tag hierarchy output for every instance of an li element in your source document (example shown is from a bulleted list):
<LI>
<Lbl>

<LBody>
<P>
List item content
Validating a Tagged PDF Structure
Several controls assist you in creating a valid PDF tag structure in PDF output:
1. The Enforce valid PDF tag structure stylesheet property
Enable this property in the Print/PDF tab of the Stylesheet Properties dialog box to request that the PDF tag structure is validated during publishing of PDF. If an invalid structure is detected, no PDF will be output by the publishing action and errors will be generated in the Event Log for the action.
This option is only available when the stylesheet is set to publish print/PDF with the PTC ALD engine, and the Generate tagged PDF option is selected.
2. Configuration of secondary tags (Before-text tag, Element content tag) is subject to a set of rules:
Secondary tags are not permitted when the Element tag is configured as an Artifact.
Certain secondary tags are available, based on the configuration of the Element tag
Element tag
Secondary tags permitted
(No tag)
Valid Element tag choices
L
LI
LI
Lbl, LBody
TOC
TOC and TOCI
TOCI
Lbl, Reference, NonStruct, P, TOC
Table
TBody, THead, TFoot
THead
TR
TBody
TR
TFoot
TR
TR
TD, TH
Ruby
RB, RP, RT
Warichu
WP, WT
A Tools > Validate Stylesheet action will flag errors if secondary tags are not configured according to these rules.
Certain secondary tags are available, based on the category of the Element tag:
Secondary tag
Permitted in these categories of Element tag
Caption
Grouping tags1 (Not TOCI), Figure, List, Table
Lbl
BibEntry, LI, Note, TOCI
Top level inline tags2
Not permitted in grouping tags or strict structure tags3
Paragraph like tags4
Not permitted in inline tags or strict structure tags

1 Grouping tags: Document, Part, Art, Sect, Div, BlockQuote, TOC, TOCI, Index, NonStruct, Private

2 Top level inline tags: Span, Quote, Note, Reference, BibEntry, Code, Link, Annot, Ruby, Warichu

3 Strict structure tags: L, LI, Table, TBody, THead, TFoot, TR, TOC, TOCI

4 Paragraph like tags: P, H, H1–H6

A Tools > Validate Stylesheet action will flag errors if secondary tags are not configured according to these rules.
Primary and secondary tags are configured as a single group. It is not possible to explicitly set one and inherit the other.
PDF tag attributes can be applied to Element tags only. If the Element tag is configured as (No tag), an attribute cannot be set.