IzakMarais / reporter

Service that generates a PDF report from a Grafana dashboard
Apache License 2.0
946 stars 304 forks source link

Generate horizontal pdf #359

Open ericsirius opened 6 months ago

ericsirius commented 6 months ago

Hi, I already did all the steps and test, but it does not work here, someone can help me ? the pdf is not in landscap mode

%use square brackets as golang text templating delimiters \documentclass{article} \usepackage{pdflscape} \usepackage{graphicx} \usepackage[margin=1in]{geometry} \graphicspath{ {images/} } \begin{document} \begin{landscape} \title{[[.Title]] [[if .VariableValues]] \ \large [[.VariableValues]] [[end]] [[if .Description]] \ \small [[.Description]] [[end]]} \date{[[.FromFormatted]]\to[[.ToFormatted]]} \maketitle \begin{center} [[range .Panels]][[if .IsSingleStat]]\begin{minipage}{0.3\textwidth} \includegraphics[width=\textwidth]{image[[.Id]]} \end{minipage} [[else]]\par \vspace{0.5cm} \includegraphics[width=\textwidth]{image[[.Id]]} \par \vspace{0.5cm} [[end]][[end]] \end{center} \end{landscape} \end{document}

291091107-df41f3bd-cbaf-4521-a5c2-f9cf6cbbc605 291091036-b18838ea-5180-45cc-95bb-71cd5b97da10

JJ24093006 commented 6 months ago

@ericsirius you need rerun the command "go install -v github.com/IzakMarais/reporter/cmd/grafana-reporter" and "grafana-reporter". this step is rquired after every change you make on the any files. than create a report. I hope it will work for you.