# Identifying UI elements in PDF with Accessibility options

> Adobe Reader DC versions that do not support UI element detection in untagged PDF files when using accessibility options.

:::note
Detection of UI elements for **untagged** PDF files is **not supported** for the following versions of Adobe Reader DC:
* 19.012.20036
* 19.012.20035
* 19.012.20034
* 19.010.20100
* 19.010.20099
* 19.010.20098
* 19.010.20091
* 19.010.20069
* 19.010.20064
* 19.008.20081
* 19.008.20080
* 19.008.20074
* 19.008.20071
We recommend using Adobe Reader DC 18 or Adobe Reader DC 19.012.20040 or greater.
:::

Active Accessibility is an API which provides greater reading support for individuals with physical or cognitive difficulties. When enabled in programs, such as Adobe Reader, access, identification, or manipulation of UI elements can become difficult or prone to errors.

In Studio, this means that elements on a page of a PDF file are identified as a whole, rather than individually.

Below there are a couple of examples of UI element identification issues in PDF files you might encounter, as well as how to solve them.

Starting with the **UiPath.UIAutomation.Activities** package v19.5.0, the **Change Reading Options of Current Document** window is automatically opened and the appropriate options selected when you indicate on screen. If, however, you still encounter problems during element selection, it's recommended to manually adjust Accessibility options, as described below.

  ![Change Reading Options of Current Document window opening automatically during on-screen element selection](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-166724-1c2a12d9.gif)

## Tagged PDF documents

In this scenario, the PDF file contains meta-information inside the page content. This means that Accessibility options read the embedded information (as a whole, instead of visible page elements) and present it to UI Explorer. This interferes with the detection of individual elements on the page itself:

  ![UI Explorer showing a tagged PDF document where elements are identified as a whole instead of individually](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-171814-4fa3a897.gif)

### Adobe Reader 2024

To set the **Read the entire document** option, follow these steps in Adobe Reader 2024:

1. Go to **Menu** &gt; **Preferences**.
2. From the **Categories** list, select **Reading**.
3. Under **Page vs Document**, select the **Read the entire document** option from the drop-down menu.
4. Under **Reading Order Options**, select the **Override the reading order in tagged documents** checkbox.

   ![Adobe Reader 2024 Preferences Reading panel with Override the reading order in tagged documents option selected](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-504629-d32c547e.webp)
5. To save the changes, select **OK**.

### Adobe Reader DC 19

The selection of UI elements inside untagged PDF files is only possible for Adobe Reader DC 19.012.20040 or greater. You need to tag PDF files for interactive UI element selection to function.

Once PDF files are tagged, you need to select the following option:

1. In Adobe Reader, open the **Edit** menu, and select the **Change Reading Options** option from the **Accessibility** sub-menu. The **Change Reading Options of Current Document** window is displayed.
2. From the **Reading Order** drop-down, select the **Tagged reading order** option. This instructs Adobe Reader to ignore Active Accessibility when reading the document.
3. In the **Reading Mode Options** section, select the **Read the entire document** option.
4. Select the **Start** button. UI Explorer can now be used to identify individual UI elements on the page.

   ![Change Reading Options of Current Document window with Tagged reading order and Read the entire document selected](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-167677-cb976adc.webp)

### Adobe Reader DC 18

To fix this, the document Accessibility reading order needs to be changed, by following these steps:

1. In Adobe Reader, open the **Edit** menu, and select the **Change Reading Options** option from the **Accessibility** sub-menu. The **Change Reading Options of Current Document** window is displayed.
2. From the **Reading Order** drop-down, select the **Infer reading order from document** option. This instructs Adobe Reader to ignore Active Accessibility when reading the document.
3. In the **Reading Mode Options** section, select the **Read the entire document** option.
4. Select the **Start** button. UI Explorer can now be used to identify individual UI elements on the page.

   ![Change Reading Options of Current Document window with Infer reading order from document option selected](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-171728-1725b3fa.gif)

## Single visible object on page

Here, the document contains a single Active Accessibility object which is visible on a page, composed of multiple elements, such as text and pictures. However, when printed or read by Accessibility options, the object is decomposed in individual elements. The issue here is the same, as you can see:

   ![UI Explorer showing a PDF page where a single composite object is identified instead of individual elements](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-167657-16b8f5d0.gif)

Again, the fix is to change the document Accessibility reading order, as follows:

1. In Adobe Reader, open the **Edit** menu, and select the **Change Reading Options** option from the **Accessibility** sub-menu. The **Change Reading Options of Current Document** window is displayed.
2. From the **Reading Order** drop-down, select the **Use reading order in raw print stream** option. This instructs Adobe Reader to ignore Active Accessibility when reading the document.
3. In the **Reading Mode Options**, select the **Read the entire document** option.
4. Select the **Start** button. UIExplorer can now be used to identify individual UI elements on the page.

   ![Change Reading Options of Current Document window with Use reading order in raw print stream option selected](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-171196-7c0cd875.gif)

## Security option in Adobe Reader DC

:::note
This issue has been fixed in **UiPath.UIAutomation.Activities** version 22.12. PDF automation works even if the **Protected Mode** security option is enabled.
:::

For **UiPath.UIAutomation.Activities** 22.10 and older and Adobe Reader DC version 22.003.20258 (see [Acrobat Reader Release Notes](https://www.adobe.com/devnet-docs/acrobatetk/tools/ReleaseNotesDC/continuous/dccontinuousoct2022.html)), PDF automation may be affected. It isn't possible to identify individual elements in PDF documents, instead the entire document is selected.

This issue is caused by a security option available in Adobe Reader DC, **Enable Protected Mode at startup**, which is enabled by default.

To fix this, disable the security option using the steps below:

1. Open Adobe Reader.
2. Go to **Menu** &gt; **Preferences**.
3. From the **Categories** list, select **Security (Enhanced)**.
4. In the **Sandbox Protections** section, clear the **Enable Protected Mode at startup** checkbox.

   ![Adobe Reader DC Security Enhanced Preferences with Enable Protected Mode at startup checkbox cleared](https://dev-assets.cms.uipath.com/assets/images/studio/studio-docs-image-504625-a29e3a8c.webp)
5. A confirmation is requested. Select **Yes** to continue, then select **OK**.
6. Restart Adobe Reader. UI Explorer can now be used to identify individual UI elements on the page.
