Code: Select all
length=SCI_GetLength()
If length
FormatRange.FORMATRANGE
If PrintRequester()
width=PrinterPageWidth()
height=PrinterPageHeight()
FormatRange\rc\left=0
FormatRange\rc\top=0
FormatRange\rc\right=width
FormatRange\rc\bottom=height
FormatRange\rcPage\left=0
FormatRange\rcPage\top=0
FormatRange\rcPage\right=width
FormatRange\rcPage\bottom=height
FormatRange\chrg\cpMin=0
FormatRange\chrg\cpMax=length
If StartPrinting("ReportBuilder Draft")
dc=StartDrawing(PrinterOutput())
If dc
FormatRange\hDC=dc
FormatRange\hdcTarget=dc
FormatRange\chrg\cpMin=SCI_FormatRange(#True,FormatRange)
While FormatRange\chrg\cpMin<FormatRange\chrg\cpMax
NewPrinterPage()
FormatRange\chrg\cpMin=SCI_FormatRange(#True,FormatRange)
Wend
StopDrawing()
EndIf
StopPrinting()
EndIf
EndIf
EndIf
Find the Scintilla includes in the usual places...
(If you don't already have them then this code will be of no use to you!
