function [] =save811(svfName,varargin)
%usage:save811('/home/oper/ux060blahblah');
%saves gcf as /home/oper/ux060blahblah.eps
%usage: save811('x','orient','landscape','figNum','2','pdf','1')
%saves figure 2 in landscape as a pdf, set pdf = 0 or don't include to keep
%as a .eps file
%arguments:
%svfName, e.g. save811('/home/oper/ux060blahblah');
%saves gcf as /home/oper/ux060kjsf.eps
%vararging looks like:
%'figNum','4','orient','portrait','pdf','1'
tif=0;
pdf=0;
figureHandle='gcf';
lv=length(varargin);
paperPosn=[0 0 8.5 11];
%paperPosn=[0 0 11 8.5];
if lv > 0
    %display 'hi'
    %make sure to identify figure first:
    for i=1:lv
        if regexp('figNum',varargin{i})
            cmd=['figure(',varargin{i+1},');'];
            eval(cmd)
        end;
    end
    for i=1:lv
        if regexp('orient',varargin{i})
            ornt=varargin{i+1};
        end
        if regexp('pdf',varargin{i})
            pdf=str2num(varargin{i+1});
        end;
        if regexp('tif',varargin{i})
            tif=str2num(varargin{i+1})
        end;
        
    end
end
    
    set(gcf, 'PaperPositionMode','manual');
    set(gcf, 'PaperUnits','inches');
    set(gcf, 'PaperPosition',paperPosn);
    orient('landscape')
    
    cmd=['print -depsc ',svfName,'.eps',];
    eval(cmd);
    if tif
        cmd=['print -dtiffnocompression ',svfName,'.tif',];
        eval(cmd);
        cmd=['convert ',svfName,'.tif ',svfName,'.eps'];
        unix(cmd)
        cmd=['rm ',svfName,'.tif'];
        unix(cmd);
    end

    if pdf
        cmd=['convert ',svfName,'.eps ',svfName,'.pdf'];
        unix(cmd)
        cmd=['rm ',svfName,'.eps'];
        unix(cmd);
    end;
