Move pdf related code out of PrawnCharts module so CodeClimate does not think complex code is being defined outside of methods