The output size is controlled by the figure's PaperPosition property. PaperPosition is a 4 element vector that specifies an x- and y-offset (used only by "paged" formats like PDF, PostScript, and printing to paper), and a width and height. The units it uses is specified in the figure's PaperUnits property.
For example, if you want the figure to be 2" by 2" in the PDF file you would do something like this (specifying the width and height to use):
f = figure;
f.PaperPosition(3:4) = [2 2];
print -dpdf foo.pdf
With the above code the 2x2 image is placed on a full size page (8.5" x 11" for me). If you wanted the PDF to be sized so it was just big enough to hold the image, change the figure's PaperSize property to match the output size, and change the x- and y-offsets of the PaperPosition property to 0. Continuing the example from above:
f.PaperSize = [2 2];
f.PaperPosition(1:2) = [0 0];
print -dpdf foo2.pdf
Because my PaperUnits are 'inches', this will put my plot onto a PDF file with a "page" that is 2" x 2".
Hope that helps.