Measure the width of the pocket door. Use a tape measure, and record your answer in inches.
Multiply the width of the door times 2, and add 1 inch to the product. For example, if the door is 32 inches wide, multiply 32 and 2 to get 64. Then add 1 inch to get 65 inches. The frame of a pocket door is twice the width of the door plus 1 inch.
Measure from the floor upward 84.5 inches (the standard height of pocket door frames), and mark the wall at this point. This height is taller than the actual door since you will have to add a track inside the doorframe.
Mark the width of the doorframe on the wall. Then, cut out the frame to the width that you obtained in Step 2.
Stretch a string from one top corner of the doorframe to the bottom corner on the opposite side. Stretch another string from the opposite top corner to the opposite bottom corner. The strings should lightly touch in the middle, forming an "x," if you measured properly and cut lines that are plumb and level.