How can I add a .html file as an item under a folio? The bigger picture here being that I want to inject a pdf resource in a .html file to be
pushed to DPS to create the magazine. Do I need to bundle the pdf into a "HTMLResources.zip" file?
Solved! Go to Solution.
AEM renders pages into HTML. You can auto generate a cq:Page (based on a template) with the appropriate content in it to result in the rendered HTML you're seeking. Take a look at the PageManager API for use in your workflow.
Assuming the PDFs being used are in DAM you could consider the PDF case much like the image component case where the asset resides in DAM but your component, included on the page, references it.
During export you could add a custom ContentSync handler to pull the PDF out of DAM and store with with your article (dps-folio export config). If the PDFs can be shared across articles or there's a finite set of them you may prefer to include them in the HTMLResources using existing handlers such as 'assets'. Depending the approach the PDF's location will change and the component use of that asset on disk will need to adjust to avoid bad paths.
http://docs.adobe.com/docs/en/cq/current/javadoc/com/day/cq/wcm/api/PageManager.html
'assets' from https://docs.adobe.com/docs/en/cq/current/developing/mobile/contentsync.html
Re: Asset inclusion
Any shared or common assets can be included in the HTMLResource.zip by configuring the ContentSync handler responsible for exporting the HTMLResoruces. For Geomtetrixx-unlimited it can be found at /etc/contentsync/templates/dps-geometrixx-unlimited/dps-HTMLResources
If the PDF is added to an HTML page via an AEM component it can be included in the Article's folio.zip by configuring the ContentSync handler responsible for exporting the AEM articles as folios. For Geomtetrixx-unlimited it can be found at /etc/contentsync/templates/dps-geometrixx-unlimited/dps-folio
Re: PDF
Is this a generic PDF or an existing DPS article (of the PDF format)?
Views
Replies
Total Likes
It's a generic pdf, how can I add an html resource inside the article though? ie. When building the article in AEM, how can I drag and drop an .html file in the article from the sidemenu.
Reason being is I'm creating a custom workflow process which takes in PDF names and references them in the <img src=...> tag and renders a .html file. I then want to inject this new .html which refers the PDF (I'm guessing to use relative pathname to DPS) into an article or drop it as an file under the folio.
Also the PDF is not getting added as an component to the page. The page will not be able to show the PDF as I'm not adding a slingRequest within the page. The img reference is for DPS purposes only and relative to only that.
Thanks,
Ram
Views
Replies
Total Likes
AEM renders pages into HTML. You can auto generate a cq:Page (based on a template) with the appropriate content in it to result in the rendered HTML you're seeking. Take a look at the PageManager API for use in your workflow.
Assuming the PDFs being used are in DAM you could consider the PDF case much like the image component case where the asset resides in DAM but your component, included on the page, references it.
During export you could add a custom ContentSync handler to pull the PDF out of DAM and store with with your article (dps-folio export config). If the PDFs can be shared across articles or there's a finite set of them you may prefer to include them in the HTMLResources using existing handlers such as 'assets'. Depending the approach the PDF's location will change and the component use of that asset on disk will need to adjust to avoid bad paths.
http://docs.adobe.com/docs/en/cq/current/javadoc/com/day/cq/wcm/api/PageManager.html
'assets' from https://docs.adobe.com/docs/en/cq/current/developing/mobile/contentsync.html
From my understanding of this, I need to configure the contentsync each time I want to export html/pdf's since each article is going to be referencing different PDF's.
I need to create a node under the dps-HTMLResources node, and have path which refers to the pdf's, correct?
Thanks,
Ram
Views
Replies
Total Likes
No you should not have to.
In the HTML resource approach via asset handler, if your PDF's are all in a single folder you could have it pull them all in. Issue is you may include some files that are not used by the articles.
In the article .folio approach your custom ContentSync handler would look at the fileReference and only pull the referenced PDF (much like how only referenced images are pulled into the folio). This will required a customer handler however as there is no handler OOTB that export PDFs in this manor.
JohnFait wrote...
No you should not have to.
In the HTML resource approach via asset handler, if your PDF's are all in a single folder you could have it pull them all in. Issue is you may include some files that are not used by the articles.
In the article .folio approach your custom ContentSync handler would look at the fileReference and only pull the referenced PDF (much like how only referenced images are pulled into the folio). This will required a customer handler however as there is no handler OOTB that export PDFs in this manor.
Thank you very much the referenced article helped a lot!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies