Expand my Community achievements bar.

SOLVED

PdfViewer component is not showing in AEMaaCS

Avatar

Level 2

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 ?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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-...

Thanks

View solution in original post

5 Replies

Avatar

Level 2

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

Avatar

Level 7
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.

Avatar

Level 5

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?

 
 

Avatar

Correct answer by
Community Advisor

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-...

Thanks

Avatar

Level 2

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 .