Hi,
I need to get preview of a page to send it as a reference to the linguists. Using getTranslationObjectPreview on a TranslationObject should get me a zip which contains an html and supporting css/js files which can be used to preview the page outside AEM instance.
I am getting a zip but which is missing important files and messing up the page formatting which can't be used as a valid reference file. From the code below, the ZipInputStream is converted to a zip file which I can then extract. Am I missing something here? Why are the necessary css/js files included in the zip? Code an preview screenshot below:
@Override
public String uploadTranslationObject(String jobId, TranslationObject object)
throws TranslationException {
ZipInputStream inputStream = null;
try {
inputStream = object.getTranslationObjectPreview();
} catch (Exception ex) {
LOGGER.info("Error while generating translation object preview.");
inputStream = null;
}
}
Solved! Go to Solution.
Views
Replies
Total Likes
Views
Replies
Total Likes
Can you point the community to the online doc or sample you are using to base this work on please.
Views
Replies
Total Likes
Sure, here is the Github link:
The code snippet of interest starts at line 313:
ZipInputStream zipInputStream = translationObject.getTranslationObjectPreview();
Views
Replies
Total Likes
It's a bug in AEM 6.2. The fix is scheduled to go live in CFP-8 next month.
Views
Replies
Total Likes
Thank you! Can you please confirm if this is also a bug in AEM 6.3? And can I expect a CFP for 6.3 as well next month?
Views
Replies
Total Likes
Views
Replies
Total Likes
Thank you!
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies