I had the requirement to export data to a PDF document recently, which involved plotting data from a Domino database over an map that was stored in JPEG format.
The process I took was this:
- Extract the map from the Domino document to the file system
- Load the map in a Java agent using the java.awt.* package
- Plot the data on the map image
- Save the changes to the JPEG image on the file system
- Load the JPEG image again
- Slice the JPEG image into “pages”
- “Print” the sliced JPEG images into a PDF document
- Save the PDF document to the file system
- Use accordingly
I use step 5 because I built a custom script library to do the processing from that point forward so it seemed logical for code reusability to store the changes to disk.
Attached is the code for the script library to do the JPEG to PDF conversion.
File resource missing