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:
- Open the site client library at
/apps/<project>/clientlibs/clientlib-base. - Check the
embedproperty and addcore.wcm.components.pdfviewer.v1if it is missing. - Deploy the updated client library configuration. For AEM as a Cloud Service, deploy the change through Cloud Manager.
- For AEMaaCS, open
/conf/<project>/sling:configsand verify thatPdfViewerCaConfigcontains the correctclientIdfor the exact domain used to access the page. - Reload the page and test the PDF Viewer in both Author and Publish.
- Check the browser network tab and confirm that the required PDF Viewer JavaScript and CSS files now load successfully.
- 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.