The problem is in struktex.sty which has
\def\struktogramm@NoProof(#1,#2)[#3]{% \def\next{#3} \setlength{\savelength@nss}{\unitlength} \setlength{\unitlength}{0.001mm} \begin{minipage}[\Position@nss]{#1mm} \ifx\next\empty\else #3\\[\smallskipamount]\fi% \begin{picture}(#1000,#2000)% \str@kt{0}{#2000}{#1000}% }
and this inserts three unwanted space tokens.
File a bug report. The correct code should be
\def\struktogramm@NoProof(#1,#2)[#3]{% \def\next{#3}% \setlength{\savelength@nss}{\unitlength}% \setlength{\unitlength}{0.001mm}% \begin{minipage}[\Position@nss]{#1mm} \ifx\next\empty\else #3\\[\smallskipamount]\fi \begin{picture}(#1000,#2000) \str@kt{0}{#2000}{#1000} }
You can see the differences: I added three % characters (and removed three that do nothing, but were actually harmless).
What happens is that if you use struktogramm in a normal document, you probably will have it between paragraphs, so those spaces aren't significant. But standalone typesets its input inside \mbox and now those spaces become signifiicant.
Workaround:
\documentclass[12pt, border=2pt,varwidth=1000pt]{standalone} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage[outer]{struktex} \begin{document} \sffamily \begin{struktogramm}(170,42) \assign{Drücke im Viewsonic-Homescreen auf die Uhrzeit} \ifthenelse{5}{5}{Steht unter 'vom Netzwerk bereitgestellte Zeit' schon die richtige Uhrzeit?}{ja}{nein} \assign[20]{Stelle Zeitzone auf 'GMT$+$0'} \change \assign[20]{Stelle Zeitzone entsprechend ein, GMT$-$1 oder GMT$+$1} \ifend \end{struktogramm} \end{document}
In any case using parskip and setting \parindent should be avoided in standalone.
varwidthwith large width, e.g. 20cm. The whole content ofdocumentwill then be wrapped byvarwidthenvironment. See documentation of standalone and varwidth for more info.