-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate horizontal pdf #50
Comments
You have to define a custom LaTeX template and add it to the url in your link in order to modify the report. I highly recommend looking into all of the cool things that LaTeX can do as it's possible to add logos, move titles, add extra text and all sorts of things.
The template must be in your project directory under /bin/templates/landscapeTemplate.tex For example:
|
Thanks for the info @herrkutt, I'll do it. LaTex is another new world for me. |
@herrkutt Thanks for the good answer! |
The example that @herrkutt provided didn't work for me. It is missing a backward slash wherever there is supposed to be two. Probably Github that broke something. %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} |
It seems the project does not support |
The template feature should be independent of the api version; it should work. |
Follow up I saw the url used in thsi thread is
I am using the
But the pdf generated is still the default one, I have copied and pasted the latex code enclosed in this thread. Did I miss something? Edit I found the
Update: Solved by directly editing the source code Thanks!! |
From the readme:
You are incorrectly supplying a file, not a directory. If you have created a directory |
Hello, I have created a custom template and it works fine when I start grafana-reporter from command line: /root/go/bin/./grafana-reporter & However, I created a system service file in order to launch grafana reporter as a service which is using exactly the same command: ExecStart=/root/go/bin/./grafana-reporter & In that case, grafana reporter is started, but I get the following error: Error reading template file: "open templates/logoTemplate.tex: no such file or directory" What is the issue here ? When I start grafana-reporter from command line it finds the template but when started via systemctl as a service, it doesn't find it..... |
You can use the param |
where i could find this setting. can you tell me please the location |
I haven't seen this documented anywhere, but for custom templates that require conditionals based on panel type, the
For example, if you want to rotate a Table rather than the entire page. The width of the table image is set to
Ideally, the user-friendly option would be to add
|
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 |
I was wondering if it is possible to generate horizontal pdf's?
Thanks in advance
The text was updated successfully, but these errors were encountered: