PdfViewer component is not showing in AEMaaCS | Community
Skip to main content
Level 2
February 5, 2025
Solved

PdfViewer component is not showing in AEMaaCS

  • February 5, 2025
  • 5 replies
  • 961 views

Hello guys ,

I am trying to use Pdfviewer component in my AEMaaCS sandbox instance but even with all configuration given here  and here  component is not showing on page without any error in console and error-log , below are the steps I have done -

 

1) ClientId generated for publisher domain site from here and added in com.adobe.cq.wcm.core.components.internal.services.pdfviewer.PdfViewerCaConfig under /conf/<mysite>/sling:configs .

 

2)  /conf/<mysite> has been added as a value for key sling:conf and sling:configRef  (tried with both ) in /content/brandpage/jcr:content .

 

3) Overlayed  Pdfviewer component with  sling:resourceSuperType with value as core/wcm/components/pdfviewer/v1/pdfviewer and allowed it in page template .

 

3) Overlayed  Component is added in page under /content/page1/page11/page111 .

 

4) Pages are published . 

 

Can anyone please help me ?

Best answer by MukeshYadav_

Hi @newbie34 ,

Could you try the name as osgi factory name like org.apache.sling.caconfig.impl.override.OsgiConfigurationOverrideProvider~pdfviewer.cfg.json


Sample: we have kept like below and working for our project

 

{ "description": "CA config for PDF Embed viewer (for local environment)", "overrides":["[/content/projectname]com.adobe.cq.wcm.core.components.internal.services.pdfviewer.PdfViewerCaConfig={\"clientId\":\"28b07c6be4d544f188dc2f36e33b196b\",\"reportSuiteId\":\"\"}"], "enabled": true }

 

 

 

Reference https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/issues-with-pdf-viewer/td-p/404562#M88760

Thanks

5 replies

newbie34Author
Level 2
February 5, 2025

Correction in step 3 -- component is added in /content/brandpage/page1/page11/page111 

AmitVishwakarma
Community Advisor
Community Advisor
February 5, 2025
1. Check Component Overlay: Ensure the PdfViewer component is correctly overlaid under /apps/<your-site>/components/pdfviewer with the correct sling:resourceSuperType.
2. Verify Configuration: Double-check the PdfViewerCaConfig in /conf/<mysite>/sling:configs is correct.
3. Clear Dispatcher Cache: Clear the dispatcher cache and re-publish the page to resolve potential cache issues.
4. Check Permissions: Ensure the proper permissions are set for the component in your AEMaaCS sandbox.
5. Verify Core Components: Ensure the PdfViewer component is included in your AEM Core Components package.

If the issue persists, check for any hidden JavaScript or CSS conflicts.
chaudharynick
Level 4
February 5, 2025

Hi, please follow these steps

 

  1. create config under /conf/<project>/sling:configs with name as 
    1. com.adobe.cq.wcm.core.components.internal.services.pdfviewer.PdfViewerCaConfig
    2. sample
      <com.adobe.cq.wcm.core.components.internal.services.pdfviewer.PdfViewerCaConfig
      jcr:primaryType="nt:unstructured"
      clientId="<client_id>"
      reportSuiteId=""/>
  2. in the jcr:content, set sling:configRef as /conf/<project> on home page /content/project/home/jcr:content
  3. create a page as /content/project/home/test and add the component there.
  4. if it still doesnt work, check the console logs of browser and inspect the page to see what is being generated in div and coming up in logs.

Also, can you share the screenshot of the html markup it is rendering?

 
 
MukeshYadav_
Community Advisor
MukeshYadav_Community AdvisorAccepted solution
Community Advisor
February 7, 2025

Hi @newbie34 ,

Could you try the name as osgi factory name like org.apache.sling.caconfig.impl.override.OsgiConfigurationOverrideProvider~pdfviewer.cfg.json


Sample: we have kept like below and working for our project

 

{ "description": "CA config for PDF Embed viewer (for local environment)", "overrides":["[/content/projectname]com.adobe.cq.wcm.core.components.internal.services.pdfviewer.PdfViewerCaConfig={\"clientId\":\"28b07c6be4d544f188dc2f36e33b196b\",\"reportSuiteId\":\"\"}"], "enabled": true }

 

 

 

Reference https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/issues-with-pdf-viewer/td-p/404562#M88760

Thanks

newbie34Author
Level 2
February 19, 2025

Hi @mukeshyadav_ , @chaudharynick , @amitvishwakarma , thanks for reply . Issue was pdfviewer' clientlib was not loading even after embedding in our clientlib-site . We had to merged those JS and LESS file in our code base .