public synchronized void init() {
        if (inited) {
            return;
        }
        Vector v = (Vector) library.getObject(entries, "Matrix");
        if (v != null) {
            matrix = getAffineTransform(v);
        }
        bbox = library.getRectangle(entries, "BBox");
        // try and find the form's resources dictionary.
        Resources leafResources = library.getResources(entries, "Resources");
        // apply parent resource, if the current resources is null
        if (leafResources != null) {
            resources = leafResources;
            resources.addReference(this);
        } else {
            leafResources = parentResource;
        }
        // Build a new content parser for the content streams and apply the
        // content stream of the calling content stream. 
        ContentParser cp = new ContentParser(library, leafResources);
        cp.setGraphicsState(graphicsState);
        InputStream in = getInputStreamForDecodedStreamBytes();
        if (in != null) {
            try {
                shapes = cp.parse(in);
            }
            catch (Throwable e) {
                // reset shapes vector, we don't want to mess up the paint stack
                shapes = new Shapes();
                logger.log(Level.FINE, "Error parsing Form content stream.", e);
            }
            finally {
                try {
                    in.close();
                }
                catch (IOException e) {
                    // intentionally left blank.
                }
            }
        }
        inited = true;
    }