-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Current Behavior
The current interface for the render method looks like this:
CarboneDocument render(String json, String fileOrTemplateId) throws CarboneException;This works well for loading templates from disk or the Carbone Cloud.
However, when a template is already loaded into JVM memory (e.g., from a custom storage service), there’s no direct way to use it without writing it to disk or uploading it to the Carbone API.
Proposal
Add a method that accepts the template directly as a byte array:
CarboneDocument render(String json, byte[] templateBytes) throws CarboneException;This would allow rendering entirely in-memory, improving performance and avoiding I/O or network overhead.
Workarounds Today
Currently, we must either:
- Upload the template to the Carbone Cloud (adds network latency), or
- Save the template bytes as a temporary file (adds I/O, storage requirement, and file handling overhead).
Benefits
- Simplifies integration with cloud/custom storage.
- Enables faster in-memory.
- Reduces I/O and disk usage in stateless environments (e.g., serverless, containers).
Would this enhancement be possible to consider in a future release?
Thanks for the great SDK and for considering this request!
Miro
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels