Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Page Exporter API

Ankita_Aggarwal
Level 2
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
Jörg_Hoh
Correct answer by
Employee
Employee

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
Jörg_Hoh
Correct answer by
Employee
Employee

Hi,

 

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

View solution in original post

Ankita_Aggarwal
Level 2
Level 2
Yes, it should create a zip with all the reference file and should get stored at the specifies location.
Jörg_Hoh
Employee
Employee
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.