Hello All - We have extended the PDF viewer core component into our app : /apps/app-name/ by following the below medium article and also created the "Content Aware configuration" under /conf/app-name/ and added the property "sling:configRef" that points to Context Aware Config path under /content/site/.
https://medium.com/adobetech/pdfs-in-aem-embed-pdfs-into-your-pages-with-pdf-viewer-7115c60b3c34
After we made all the requirement changes and specify the PDF path in the dialog, the component is not rendering the PDF. The component is not editable and we are able to open the dialog only from Side Panel -> Content Tree. Please see the attached screenshot. Can someone tell me what could be the issue?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @aemninja,
One of the possible cause would be the clientId used in sling:configs. Can you confirm if it is the valid one generated for your application.
If yes, you can cross check directly by placing the markup(code snippet available in below link) in any component or in base page component. (by hardcoding the clientId and specific document instead of via PDF viewer component. Based on this result, we can narrow down the issue)
More details related to this in this documentation - https://medium.com/adobetech/easily-embed-pdf-into-your-website-using-adobe-document-cloud-view-sdk-...
If configMap is null, then the issue is with the way we reference the OSGI Factory Service.
In general, to refer OSGI service in Sling Model, we use either @Inject or @OSGiService annotation. As we have to get all instance of factory config via multiple and dynamic referencing, I suggest to create another service/impl to create this configMap object and expose that (In other words, move the Reference logic to another OSGI component) -> Use that service that returns the map in Sling Model via @Inject or @OSGiService annotation.
Views
Replies
Total Likes
Hi @Vijayalakshmi_S I followed the replies and I appreciate all your help with the PDV Viewer component. But I didn't understand how I can configure my environments to work.
Could you please help me?
I have my PDF Viewer as a proxy component on my local. I used the Override CA Config to have my clientId number working on my localhost. But how I can have the configs to the other clientIds related to my other domains? For example, I need a different clientId for my dev author environment, because it has a different domain.
I tried the CA Configuration Override solution. It works on my local, but how I can specify the dev author? I tried to add more lines on the Override with .dev.author, but seems that these lines are no readable by my author-dev instance.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies