Here is a Codepen of my code.
Our process is as follows:
- Generate plot using loadFigures() function
- Call saveImage() function to convert plot to SVG and grab SVG source code
- Use Java batik transcoder to convert the SVG source code to a PNG.
When I grab the SVG source code from the textarea in the Codepen example and create a test SVG file to load in a browser (Chrome), the image is still cut off so I feel like the batik transcoder is not the issue. When I use the download button in the mode bar to download as png directly, it works without cutting off the bottom of the table.
I am thinking it is a margin issue as it doesn’t seem like the margins of the canvas set in layout are being adhered to for the table.
Thanks,
Marcus