...
When generating a PDF report in Joget, you can use server-side scripts (e.g., Groovy or Java) to convert binary data to Base64 before embedding it in the PDF. This can be part of the PDF generation process
Example:
Code Block |
---|
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Base64;
// Read binary data from the image file
byte[] imageData = Files.readAllBytes(Path.of("path/to/your/image.jpg"));
// Convert binary data to Base64
String base64ImageData = Base64.getEncoder().encodeToString(imageData);
// Now you can use 'base64ImageData' for embedding in the PDF |
...
Note |
---|
Ensure that you adapt the code to your specific use case, and consult Joget's documentation or community forums for the latest information and best practices. |
...
Warning |
---|
|
- #reportLink.id#ID# - To attach reports in email tool, where ID is the report id.
- #reportLink.idID[param1=value1¶m2=value2]# - To attach reports in email tool with parameters passing.
- #reportParam.name# - To populate dynamic report parameter values ( for example parameters set in report menu, subreport, etc. ).
- #reportLink.REPORT_ID[id={form.f1.id}]# - Example of the hash variable used in "Process > Email Tool > Files > Path" to pass the ID to the report builder to attach the PDF into the Email Tool.
Example hash variable:
Code Block | ||
---|---|---|
| ||
#reportLink.rp_report1[id=5c3daa8c-b8e7-4e04-8119-e31be53d6232]# |
Download Demo App
...
...