Spread Windows Forms 7.0 Product Documentation
GetOwnerPrintColumnPageBreaks Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FpSpread Class : GetOwnerPrintColumnPageBreaks Method

Glossary Item Box

Gets the column page breaks for the specified sheet under the current printing conditions.

Overload List

GetOwnerPrintColumnPageBreaks(Graphics,Rectangle,Int32,Boolean)Gets the column page breaks for the specified sheet under the current printing conditions.  
GetOwnerPrintColumnPageBreaks(Graphics,Rectangle,Int32,Boolean,OwnerPrintInfo)Gets the column page breaks for the specified sheet under the current printing conditions.  


The reCalc parameter is for optimization; if the GetOwnerPrintRowPageBreaks method is called before this method, set this parameter to false.


This examples gets the page breaks.
C#Copy Code
private System.Drawing.Printing.PrintDocument pd; 

private void Form1_Load(object sender, System.EventArgs e)
pd = new System.Drawing.Printing.PrintDocument(); 
pd.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.pd_PrintPage); 

private void button1_Click(object sender, System.EventArgs e)

private void pd_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs ev) 
int[] i; 
Rectangle rect = new Rectangle(0, 0, 500, 500); 
int cnt = fpSpread1.GetOwnerPrintPageCount(ev.Graphics, rect, 0); 

fpSpread1.OwnerPrintDraw(ev.Graphics, rect, 0, 1); 

FarPoint.Win.Spread.Model.ISheetAxisModel isa; 
isa = (FarPoint.Win.Spread.Model.ISheetAxisModel)fpSpread1.ActiveSheet.Models.ColumnAxis; 
isa.SetPageBreak(3, true); 

i = fpSpread1.GetOwnerPrintColumnPageBreaks(ev.Graphics, rect, 0, true);
    foreach (object o in i) 
Visual BasicCopy Code
Private WithEvents pd As New System.Drawing.Printing.PrintDocument()

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub

Private Sub pd_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles pd.PrintPage
        Dim rect As New Rectangle(0, 0, 500, 500)
        Dim cnt As Integer = FpSpread1.GetOwnerPrintPageCount(e.Graphics, rect, 0)
        Dim i() As Integer
        Dim o As Object

        FpSpread1.OwnerPrintDraw(e.Graphics, rect, 0, 1)
        i = FpSpread1.GetOwnerPrintColumnPageBreaks(e.Graphics, rect, 0, True)

        For Each o In i
End Sub


Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also


FpSpread Class
FpSpread Members

User-Task Documentation

Adding a Page Break

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.