I am creating a flow chart and the flowchart goes out of the page border. Could someone help me?
This is my code:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{color}
\usetikzlibrary{shapes.geometric, arrows}
\title{test}
\begin{document}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black,text width=3cm, fill=red!30]
\tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]
\tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=orange!30]
\tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered,text width=2cm, draw=black, fill=green!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\begin{tikzpicture}[node distance=2cm]
\node (dec1) [decision] {dec1};
\node (dec2) [decision, below of=dec1 , right of=dec1, yshift=-1.5cm, xshift=2cm] {dec2};
\node (dec3) [decision, below of=dec1 , left of=dec1,yshift=-1.5cm , xshift=-2cm] {dec3};
\node (dec4) [decision, below of= dec3 , right of=dec3,yshift=-1.5cm , xshift=1cm] {dec4};
\node (dec5) [decision, below of= dec2 , left of=dec2,yshift=-1.5cm , xshift=0.3cm] {dec5};
\node (dec6) [decision, below of= dec4 , left of=dec4,yshift=-1cm , xshift=-2.5cm] {dec6};
\node (dec7) [decision, below of= dec5 , right of=dec4,yshift=-1cm , xshift=5.5cm] {dec7};
\node (box1) [startstop, below of=dec4, yshift=-1cm, xshift=-0.5cm ] {box1};
\node (box2) [startstop, below of=dec5, yshift=-1cm,xshift=0.5cm ] {box2};
\node (box3) [startstop, below of=dec6, left of=dec6 ,yshift=-1cm] {box3};
\node (box4) [startstop, below of=dec6, right of=dec6 ,yshift=-1cm] {box4};
\node (box5) [startstop, below of=dec7, left of=dec7 ,yshift=-1cm] {box5};
\node (box6) [startstop, below of=dec7, right of=dec7 ,yshift=-1cm] {box6};
\end{tikzpicture}
\end{document}



scaleis an option:How to scale a tikzpicture? – Bobyandbob Aug 10 '17 at 07:27