The q operator shall push a copy of the entire graphics state onto the stack.
The Q operator shall restore the entire graphics state to its former value by popping it from the stack.
Occurrences of the q and Q operators shall be balanced within a given content stream (or within the sequence
of streams specified in a page dictionary’s Contents array).
From section 8.4.2 of PDF 32000-1:2008
Occurrences of the q and Q operators shall be balanced within a given content stream (or within the sequence of streams specified in a page dictionary’s Contents array).
The PCLm obtained using PclmWriter is as follows:
This is treated as an error on some serious printers.