Ok, I've looked at the python code generating the PDFs (Splunk 6.1.3), and could make a change to force top-aligment:
splunk@hostname: [~/lib/python2.7/site-packages/splunk/pdf]> diff pdfrenderer.py.old pdfrenderer.py
365,367c365,369
< if columnVAlignments is not None:
< for i, valign in enumerate(columnVAlignments):
< tableStyleCommands.append(('VALIGN', (i, 0), (i, -1), valign))
---
> # if columnVAlignments is not None:
> # for i, valign in enumerate(columnVAlignments):
> # tableStyleCommands.append(('VALIGN', (i, 0), (i, -1), valign))
> for i in range(0,numDataCols):
> tableStyleCommands.append(('VALIGN', (i, 0), (i, -1), 'TOP'))
So basically, the reporting engine (reportlab's pdfgen) is using as default the 'BOTTOM' cell alignment in tables. The PDFrenderer Script in Splunk has the possibility to overide this default, but somehow doesn't do it systematically.
The above patch sets the alignement for every colomn to 'TOP', whatever arguments would have been passed by other scripts. I have absolutely no idea what these arguments to the tableStyleCommands mean, but it works...
I'm not sure if this will have any side effect, so if any Splunk employee could add a comment, that would be great. Even better if this could be included in future releases 🙂
... View more