The problem is probably with the width of your grid in relation of the XPSDocumentWriter's pagesize.
WPF will write in the Document the element you provide as is. That means that it will not be scaled in any way to fit the content of the page.
Assuming your document is the correct size (lets suppose letter), you need to determine the printable area of the document and apply a RenderTransform to the grid before you write it into the XPSDocumentWriter
The code to do it would be something like:
Grid grd = new Grid();
XpsDocumentWriter wrt = new XpsDocumentWriter();
//Bunch of code to manipulate your grid here
//Now we calculate the scaling required:
double ScaleX = PageWidth / grd.Width; //The page width must be in Device Independent Units
double ScaleY = ScaleX;
grd.RenderTransform = new ScaleTransform(ScaleX, ScaleY);
wrt.Write(grd);
EDIT: Changed the code so that both the ScaleX, and ScaleY point to the amount required to make the grid fit completely in the XpsDocument