AEM PDF Viewer renders blank when required client libraries are missing

The AEM PDF Viewer component can render as an empty container when the required client libraries are not included in the site client library configuration. In AEM as a Cloud Service, rendering can also fail if the PDF Viewer CA-config uses a client ID that does not match the page domain. As a result, the viewer does not load correctly in Author or Publish even though the component is present on the page. Embed the required PDF Viewer client library, verify the CA-config client ID, and retest the page in both environments.

Description description

Environment

  • Adobe Experience Manager as a Cloud ServiceĀ (AEMaaCS)
  • Adobe Experience Manager 6.5 On-Premise

Issue/Symptoms

  • The PDF Viewer component displays a blank or empty area on the page.
  • The viewer does not load correctly in Author or Publish.
  • Required PDF Viewer JavaScript or CSS files do not load in the browser.
  • In AEM as a Cloud Service, the viewer fails even after the component is configured on the page.

Cause

The page is missing the required PDF Viewer client libraries because core.wcm.components.pdfviewer.v1 is not embedded in the site clientlib-base. In AEM as a Cloud Service, rendering can also fail when the PdfViewerCaConfig client ID is valid but mapped to a different domain than the one used to open the page.

Resolution resolution

To resolve blank AEM PDF Viewer rendering caused by missing client libraries, follow these steps:

  1. Open the site client library at /apps/<project>/clientlibs/clientlib-base.
  2. Check the embed property and add core.wcm.components.pdfviewer.v1 if it is missing.
  3. Deploy the updated client library configuration. For AEM as a Cloud Service, deploy the change through Cloud Manager.
  4. For AEMaaCS, open /conf/<project>/sling:configs and verify that PdfViewerCaConfig contains the correct clientId for the exact domain used to access the page.
  5. Reload the page and test the PDF Viewer in both Author and Publish.
  6. Check the browser network tab and confirm that the required PDF Viewer JavaScript and CSS files now load successfully.
  7. If the client library embed is correct and the viewer still renders blank, contact Adobe Support and share the page URL, browser console logs, and a network trace.
recommendation-more-help
experience-cloud-kcs-help-kbarticles