adjust metafile and buffer