Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable persist Renderable's conversion result by mimeType #320

Closed
lmtoo opened this issue Aug 17, 2020 · 2 comments · Fixed by #870 · May be fixed by #864
Closed

Enable persist Renderable's conversion result by mimeType #320

lmtoo opened this issue Aug 17, 2020 · 2 comments · Fixed by #870 · May be fixed by #864

Comments

@lmtoo
Copy link

lmtoo commented Aug 17, 2020

docx4j will convert docx to pdf if the request's Accept is application/pdf, but it will also slow the request , even for just 10 pages document, it will cost at least 30 seconds, if persist the conversion result when the first request, to will speed up subsequent request, also ,if original docx is changed ,auto cleanup conversion result.

@paulcwarren
Copy link
Owner

Hi @lmtoo,

Indeed. Storing renditions as additional content on the entity is a goal. The basic plan I have is to indicate which renditions you want to store on an Entity (perhaps through additional @Content(mimeType="application/pdf") annotations). The content would be converted the first time that rendition is accessed and returned as usual but also stored so that subsequent request for that rendition would not have to re-convert the content.

@lmtoo
Copy link
Author

lmtoo commented Aug 29, 2020

Entities may have different mimeTypes , for example Document may be doc/docx or xlsx. only doc/docx convert to pdf should be persist, and xlsx already exists a web preview solution , like sheetjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants