There are two ways i found of achieving something "related" to this question. To export the image from the document to a full scale pdf (which could then be included in the pdf, yes, those will be 3 steps, but, thats a result)
First is the use of preview:
% A calendar of circles
% Author: Till Tantau (The PGF manual),
% and Stefan Kottwitz (Modifications such as shaded circles and color)
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calendar,shadings}
\renewcommand*{\familydefault}{\sfdefault}
\colorlet{winter}{blue}
\colorlet{spring}{green!60!black}
\colorlet{summer}{orange}
\colorlet{fall}{red}
\usepackage[active, tightpage]{preview}
\setlength\PreviewBorder{10pt}%
% A counter, since TikZ is not clever enough (yet) to handle
% arbitrary angle systems.
\newcount\mycount
\begin{document}
\begin{preview}
\begin{tikzpicture}[transform shape,
every day/.style={anchor=mid,font=\tiny}]
\node[circle,shading=radial,outer color=blue!30,inner color=white,
minimum width=15cm] {\textcolor{blue!80!black}{\Huge\the\year}};
\foreach \month/\monthcolor in
{1/winter,2/winter,3/spring,4/spring,5/spring,6/summer,
7/summer,8/summer,9/fall,10/fall,11/fall,12/winter} {
% Computer angle:
\mycount=\month
\advance\mycount by -1
\multiply\mycount by 30
\advance\mycount by -90
\shadedraw[shading=radial,outer color=\monthcolor!30,middle color=white,
inner color=white,draw=none] (\the\mycount:5.4cm) circle(1.4cm);
% The actual calendar
\calendar at (\the\mycount:5.4cm) [
dates=\the\year-\month-01 to \the\year-\month-last]
if (day of month=1) {\large\color{\monthcolor!50!black}\tikzmonthcode}
if (Sunday) [red]
if (all) {
% Again, compute angle
\mycount=1
\advance\mycount by -\pgfcalendarcurrentday
\multiply\mycount by 11
\advance\mycount by 90
\pgftransformshift{\pgfpointpolar{\mycount}{1.2cm}}};}
\end{tikzpicture}
\end{preview}
\end{document}
Used this blogpost: https://texblog.org/2012/09/12/cropping-the-output-file-to-its-content-in-latex/
And this texample: http://www.texample.net/tikz/examples/calendar-circles/
The package used is the preview package.
The second is to externalize the tikz pictures.
Found here Script to automate externalizing TikZ graphics <- selected answer
Both work great i think. There are possibly easy ways to create macros for the first run: create the external PDFs, and a second run, adding the PDFs to the resulting PDF instead of generating the tikzpictures on the fly.
pdfcropthat should do exactly this... https://ctan.org/pkg/pdfcrop?lang=en; or you can generate the drawing with the classstandalone. – Rmano Sep 23 '19 at 11:14\crop{\begin{tikzpicture}...\end{tikzpicture}}and the page will have no extra space(maybe small margin) that is wasted outside the imagine. It is on it's own page. It is not difficult. – Sep 23 '19 at 13:43\newgeometryfromgeometrypackage) or c) something else? A\begin{tikzpicture}...\end{tikzpicture}is already cropped to its minimum bounding box (unless you have beziers curves near the borders, but that's another problem). – Rmano Sep 23 '19 at 13:54