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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Translation Object preview


Level 2



I am trying to use the TranslationObject#getTranslationObjectPreview method to get a preview of a page. 


I expect a zip with all files required to open the page offline, independently of AEM.

I would then like to send this archive over http to a server (which I believe is only tangentially important).


My issue is that when I open this zip package, the html page has broken encoding and image links:





Exploring the archive structure a bit I find the images from the body of the article, however, the html does not link to them correctly. I could not find images for the icons or the image from the top of the page.


My question is, am I doing something wrong or is this the full extent of the preview feature that AEM supports?

Below is a screenshot of the code in debug mode showing part of the method used for converting the ZipInputStream, obtained from the TranslationObject, into a ByteArrayInputStream that can be fed to the Apache http client.

The preview shows the content of the buffer, read using UTF8 encoding.Screenshot_1.png


Unless I'm missing something, this shows the locale specific characters are corrupted even before transfer.
Is there maybe some configuration to be done that could remedy this?

1 Reply


Community Advisor

HI @JanHumpal 


We had a similar requirment to create page preview zip. We faced similar issues with zip created from getTranslationObjectPreview so we ended up creating our own utility to create page preview zip. 







Level 2
Thank you for your feedback! I was afraid it might be the case, that circumventing the translation framework here will be necessary.


Level 2

While I appreciate the feedback from Nupur, as it shows that this is not merely a problem local to my setup, I still hesitate to mark it as a final answer to my questions.


I would still like a confirmation, that this is truly a limitation of the translation framework, rather than a case of two different developers running into the same wall.