AEM - how to export PDF Asset content as json | Community
Skip to main content
October 19, 2021
Solved

AEM - how to export PDF Asset content as json

  • October 19, 2021
  • 1 reply
  • 1437 views

Hello Community members -I have to check the feasibility of parsing PDF Asset conent and export it in json format.I have had a task to expose custom component's node properties like Question and Answer and their values, capture them and export them in json format, this have been achieved using a slingServlet and querybuilder.However to achieve similar task for PDF type of DAM Assets, where I need to parse the content for the plain text like "Question" and "answer" and parse related values to export them in json format. Reference PDFs can be big in size and is not just limited to a simple "Q & A " sheet, can have more headings, paragraphs, images, links etc. and There could be multiple such reference pdfs on the page component. Really appreciate any assistance, pointers, references please.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Ankur_Khare

Look at this one-

 

https://aemcomponents.dev/content/core-components-examples/library/page-authoring/pdf-viewer.html

 

{
"id": "pdfviewer-98746e7e01",
"documentPath": "/content/dam/core-components-examples/library/sample-assets/Bodea Brochure.pdf",
"type": "IN_LINE",
"defaultViewMode": "FIT_PAGE",
"borderless": false,
"showAnnotationTools": false,
"showFullScreen": true,
"showLeftHandPanel": true,
"showDownloadPdf": true,
"showPrintPdf": true,
"showPageControls": true,
"dockPageControls": true,
"reportSuiteId": "",
"documentFileName": "Bodea Brochure.pdf",
"viewerConfigJson": "{\"embedMode\":\"IN_LINE\",\"showDownloadPDF\":true,\"showPrintPDF\":true}",
"containerClass": "cmp-pdfviewer__in-line",
"clientId": "630681c60b144a498850fc22c1df83e0",
":type": "core-components-examples/components/pdfviewer",
"dataLayer": {
"pdfviewer-98746e7e01": {
"@type": "core-components-examples/components/pdfviewer"
}
}
}

1 reply

Ankur_Khare
Community Advisor
Ankur_KhareCommunity AdvisorAccepted solution
Community Advisor
October 19, 2021

Look at this one-

 

https://aemcomponents.dev/content/core-components-examples/library/page-authoring/pdf-viewer.html

 

{
"id": "pdfviewer-98746e7e01",
"documentPath": "/content/dam/core-components-examples/library/sample-assets/Bodea Brochure.pdf",
"type": "IN_LINE",
"defaultViewMode": "FIT_PAGE",
"borderless": false,
"showAnnotationTools": false,
"showFullScreen": true,
"showLeftHandPanel": true,
"showDownloadPdf": true,
"showPrintPdf": true,
"showPageControls": true,
"dockPageControls": true,
"reportSuiteId": "",
"documentFileName": "Bodea Brochure.pdf",
"viewerConfigJson": "{\"embedMode\":\"IN_LINE\",\"showDownloadPDF\":true,\"showPrintPDF\":true}",
"containerClass": "cmp-pdfviewer__in-line",
"clientId": "630681c60b144a498850fc22c1df83e0",
":type": "core-components-examples/components/pdfviewer",
"dataLayer": {
"pdfviewer-98746e7e01": {
"@type": "core-components-examples/components/pdfviewer"
}
}
}