code: public void endLayer() {
          int n = 1;
          if (layerDepth != null && !layerDepth.isEmpty()) {
              n = ((Integer)layerDepth.get(layerDepth.size() - 1)).intValue();
              layerDepth.remove(layerDepth.size() - 1);
          } else {
          	throw new IllegalPdfSyntaxException("Unbalanced layer operators." );
          }
          while (n-- > 0)
              content.append("EMC").append_i(separator);
      }
docs: Ends a layer controlled graphic block. It will end the most recent open block.