I am evaluating the product, <?:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>
I need to print the content of a GODocument using some feature like ‘fitToPage’, print the document divided by a number of pages set by the user, stretch etc.<o:p></o:p>
Is there an example that do these things easily<o:p></o:p>
Thanks in advance<o:p></o:p>

Try the FAQ. Search for “fit”.

I wrote some similar code but I had some problem when I set up the page in landscape mode, the PrintPreview() method (in GoView class) do not consider the the orientation of the page.
I’m looking for an example (if there is) that set the landscape on the document.

Try the following kind of GoView:
public class PrintToFitView : GoView {
public PrintToFitView() {}
protected DialogResult ShowPageSetupDialog(PrintDocument pd) {
PageSetupDialog dlg = new PageSetupDialog();
dlg.Document = pd;
DialogResult result = dlg.ShowDialog();
if (result != DialogResult.OK) return result;
SizeF docsize = this.PrintDocumentSize;
if (docsize.Width > 1 || docsize.Height > 1) {
Rectangle b = pd.DefaultPageSettings.Bounds;
Margins m = pd.DefaultPageSettings.Margins;
float w = b.Width - (m.Left + m.Right);
float h = b.Height - (m.Top + m.Bottom);
float ratio = Math.Min(w/docsize.Width, h/docsize.Height);
if (ratio > 1)
ratio = 1;
this.PrintScale = ratio;
return DialogResult.OK;
return DialogResult.Cancel;
protected override DialogResult PrintShowDialog(PrintDocument pd) {
if (ShowPageSetupDialog(pd) == DialogResult.OK) {
return base.PrintShowDialog(pd);
} else {
return DialogResult.Cancel;
protected override void PrintPreviewShowDialog(PrintDocument pd) {
if (ShowPageSetupDialog(pd) == DialogResult.OK) {