Core Components installed v. 2.16.0
https://github.com/adobe/aem-core-wcm-components/releases/tag/core.wcm.components.reactor-2.16.0
AEM 6.4.8.3
Follow this article on how to use PDFs in AEM with the PDF Viewer Component integrated with the PDF Embed API.
What I’ve done so far:
/conf
/mysite sling:Folder
/sling:configs nt:unstructured
/com.adobe.cq.wcm.core.components.internal.services.pdfviewer.PdfViewerCaConfig
Add Property = clientId, value = key obtained by registering for the view sdk api
ERROR1:
GET http://mysite/content/dam/mysite/myfile.pdf 404 (Not Found) VM20825 granite.js:266
ERROR2:
Uncaught (in promise) {code: "PREVIEW_RENDERING_FAILED"} page.html:1
Our author instance has http://mysite/author as contextPath, which is not reflected in Error 1
File reference should be http://mysite/author/content/dam/mysite/myfile.pdf
which does display the asset
Would Apache Sling Context-Aware Configuration - Override help me fix this?
Not sure how to add /author in the override syntax for [{contexPath}]
Thanks for all your help.
Solved! Go to Solution.
Views
Replies
Total Likes
Here are the steps I have followed and it works perfectly fine for me:
Thanks!
Please check below URL's and see if these are of some help.
https://aemcomponents.dev/content/core-components-examples/library/page-authoring/pdf-viewer.html
Resolved.
Views
Replies
Total Likes
Here are the steps I have followed and it works perfectly fine for me:
Thanks!
Thanks for taking the time Jena, your steps pretty much match what I described on mine, with the exception that I did not remove the child nodes from the overlay and perhaps you meant to leave the pdfviewer node and not the folder?... or maybe that is the node you used instead?...anyhow, I replicated your steps in WeRetail and still failed. I think the issues is (as stated on my last paragraph) with our application not having the same contextPath in my URL as the AEM default...we included the word /author after the localhost:4502 http://my.site/author/editor.html/content/we-retail/language-masters/en/experience.html
Views
Replies
Total Likes
I was able to resolve our issue by following @Vijayalakshmi_S OSGI factory approach here. In addition of overriding the WCM modes for edit and preview under /apps/site/components/content/pdfviewer/v1/pdfviewer/pdfviewer.html to account for our custom context path /author to reference back to the Assets Manager.
Views
Replies
Total Likes