Bug Report T1282135
Visible to All Users

PdfViewer - A document is slowly loaded and causes the "Unable to load the PDF document" error when Windows Narrator is enabled

created 6 days ago (modified 6 days ago)

Steps to reproduce:

  1. Enable Windows Narrator (or another tool that uses an application's accessibility).
  2. Load the document into PdfViewer.

The issue occurs in a specific document which cannot be shared in a public report.

Expected results:

A document is loaded fast and errors don't occur when Windows Narrator is enabled

Current results:

A document is loaded slowly and causes the "Unable to load the PDF document" error when Windows Narrator is enabled

Additional information:

Call Stack
DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.ParseGenericBlockElement(DevExpress.Pdf.PdfLogicalStructureElement element) Line 108 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.DevExpress.Pdf.Native.IPdfLogicalStructureVisitor.VisitElement(DevExpress.Pdf.PdfLogicalStructureElement element) Line 105 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfLogicalStructureItemExtension.Accept(DevExpress.Pdf.PdfLogicalStructureItem item, DevExpress.Pdf.Native.IPdfLogicalStructureVisitor visitor) Line 49 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.ParseGenericBlockElement(DevExpress.Pdf.PdfLogicalStructureElement element) Line 109 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.DevExpress.Pdf.Native.IPdfLogicalStructureVisitor.VisitElement(DevExpress.Pdf.PdfLogicalStructureElement element) Line 105 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfLogicalStructureItemExtension.Accept(DevExpress.Pdf.PdfLogicalStructureItem item, DevExpress.Pdf.Native.IPdfLogicalStructureVisitor visitor) Line 49 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.ParseGenericBlockElement(DevExpress.Pdf.PdfLogicalStructureElement element) Line 109 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.DevExpress.Pdf.Native.IPdfLogicalStructureVisitor.VisitElement(DevExpress.Pdf.PdfLogicalStructureElement element) Line 105 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfLogicalStructureItemExtension.Accept(DevExpress.Pdf.PdfLogicalStructureItem item, DevExpress.Pdf.Native.IPdfLogicalStructureVisitor visitor) Line 49 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.ParseGenericBlockElement(DevExpress.Pdf.PdfLogicalStructureElement element) Line 109 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.DevExpress.Pdf.Native.IPdfLogicalStructureVisitor.VisitElement(DevExpress.Pdf.PdfLogicalStructureElement element) Line 105 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfLogicalStructureItemExtension.Accept(DevExpress.Pdf.PdfLogicalStructureItem item, DevExpress.Pdf.Native.IPdfLogicalStructureVisitor visitor) Line 49 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.ParseGenericBlockElement(DevExpress.Pdf.PdfLogicalStructureElement element) Line 109 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.DevExpress.Pdf.Native.IPdfLogicalStructureVisitor.VisitElement(DevExpress.Pdf.PdfLogicalStructureElement element) Line 105 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfLogicalStructureItemExtension.Accept(DevExpress.Pdf.PdfLogicalStructureItem item, DevExpress.Pdf.Native.IPdfLogicalStructureVisitor visitor) Line 49 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.PerformParse() Line 93 C# DevExpress.Pdf.v24.2.Core.dll!DevExpress.Pdf.Native.PdfTaggedDataRecognizer.Parse(DevExpress.Pdf.Native.PdfMarkedContentDataCache cache) Line 77 C# DevExpress.XtraPdfViewer.v24.2.dll!DevExpress.XtraPdfViewer.Native.TextModelTagged.ParseTextModel() Line 93 C# DevExpress.XtraPdfViewer.v24.2.dll!DevExpress.XtraPdfViewer.Native.TextModelBase.RecreateInnerData() Line 104 C# DevExpress.XtraPdfViewer.v24.2.dll!DevExpress.XtraPdfViewer.Native.TextModelBase.TextModelBase(DevExpress.XtraPdfViewer.PdfViewer pdfViewer, bool calcData) Line 85 C# DevExpress.XtraPdfViewer.v24.2.dll!DevExpress.XtraPdfViewer.Native.TextModelTagged.TextModelTagged(DevExpress.XtraPdfViewer.PdfViewer pdfViewer, bool calcData) Line 85 C# DevExpress.XtraPdfViewer.v24.2.dll!DevExpress.XtraPdfViewer.Native.TextModelBase.Create(DevExpress.XtraPdfViewer.PdfViewer viewer) Line 60 C# DevExpress.XtraPdfViewer.v24.2.dll!DevExpress.XtraPdfViewer.Native.TextProvider.TextProvider(DevExpress.XtraPdfViewer.PdfViewer viewer) Line 49 C# DevExpress.XtraPdfViewer.v24.2.dll!DevExpress.XtraPdfViewer.Native.PdfViewerControlAccessible.GetTextProvider() Line 128 C# DevExpress.XtraPdfViewer.v24.2.dll!DevExpress.XtraPdfViewer.Native.PdfViewerControlAccessible.GetPatternProvider(DevExpress.UIAutomation.AutomationPattern pattern) Line 123 C# DevExpress.Utils.v24.2.dll!DevExpress.Accessibility.BaseAccessible.DevExpress.UIAutomation.IAutomationElementProviderWrapper.GetPatternProvider(DevExpress.UIAutomation.AutomationPattern pattern) Line 663 C# DevExpress.Utils.v24.2.dll!DevExpress.UIAutomation.AutomationElementProvider.GetPatternProvider(DevExpress.UIAutomation.AutomationPattern pattern) Line 209 C# DevExpress.Utils.v24.2.dll!DevExpress.UIAutomation.AutomationElementProvider.DevExpress.UIAutomation.IRawElementProviderSimple.GetPatternProvider(int patternId) Line 206 C#

Workaround

As a temporary solution, use the WindowsFormsSettings.DisableAccessibility property to disable accessibility as follows:

C#
WindowsFormsSettings.DisableAccessibility = DevExpress.Utils.DefaultBoolean.True;
Visual Basic
WindowsFormsSettings.DisableAccessibility = DevExpress.Utils.DefaultBoolean.True

Answers approved by DevExpress Support

created a day ago (modified 20 hours ago)

We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

Important Notes:

  • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
  • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.
Additional information:

We addressed the exceptions that occur while PdfViewer is loading the document. However, performance issues may still occur when the document is loaded on a machine where accessibility tools are enabled.

This happens because the document is quite large and when accessibility is enabled, our PdfViewer loads accessibility information for the whole document, which may take a significant amount of time.

On our side, slowness occurs even when I open your document in Adobe Acrobat Reader. Thus, the most appropriate solution here is to use the WindowsFormsSettings.DisableAccessibility property to disable accessibility.

    Comments (3)

      Thank you very much

      Sasha (DevExpress Support) 20 hours ago

        You are always welcome.

        I just wanted to inform you that we addressed the exceptions that occur while PdfViewer is loading your document. However, performance issues may still occur when you load the document on a machine where accessibility tools are enabled. This happens because your document is quite large and when accessibility is enabled, our PdfViewer loads accessibility information for the whole document, which may take a significant amount of time.

        On my side, slowness occurs even when I open your document in Adobe Acrobat Reader. Thus, the most appropriate solution here is to use the WindowsFormsSettings.DisableAccessibility property to disable accessibility.

        I hope you will find this information helpful.

          Thanks Sasha

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.