Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Page Exporter API

Avatar

Level 2

I need to export page as zip file programatically and i used Page Exporter interface and its export(page, resourceResolver, targetPath) method, but, its not happening.

I found the zip file under /var/contentsync node, but that has only html in it, no clientlibs, no assets.

I tried to delete the nodes under /var/contentsync, but of no use.

 

Thanks

Ankita A

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

 

what do you expect from the PageExporter API? Should it create a zip containing all referenced/embedded files? 

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Hi,

 

what do you expect from the PageExporter API? Should it create a zip containing all referenced/embedded files? 

Avatar

Level 2
Yes, it should create a zip with all the reference file and should get stored at the specifies location.

Avatar

Employee Advisor
Then you are need features which are not provided by the PageExporter, and you need to implement it on your own. You can take the PageExporter to render the HTML, and then use jsoup to parse it and extract all external references. Finally create a zip file out of all these files.