File: class-gtksourceprintjob.html

package info (click to toggle)
gnome-python-desktop 2.32.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,548 kB
  • sloc: sh: 10,214; xml: 8,851; ansic: 3,428; python: 1,457; makefile: 664
file content (263 lines) | stat: -rw-r--r-- 84,008 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>gtksourceview.SourcePrintJob</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Python GtkSourceView Reference Manual"><link rel="up" href="gtksourceview-class-reference.html" title="The GtkSourceView Class Reference"><link rel="prev" href="class-gtksourcetagstyle.html" title="gtksourceview.SourceTagStyle"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtksourceview.SourcePrintJob</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtksourcetagstyle.html">Prev</a> </td><th width="60%" align="center">The GtkSourceView Class Reference</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="refentry" title="gtksourceview.SourcePrintJob"><a name="class-gtksourceprintjob"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtksourceview.SourcePrintJob</h2><p>gtksourceview.SourcePrintJob — Print Job object for <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView">gtksourceview.SourceView</a></p></div><div class="refsect1" title="Synopsis"><a name="id2563416"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtksourceview.SourcePrintJob</span></span>(<span class="ooclass"><span class="classname">gobject.GObject</span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#constructor-gtksourceprintjob" title="Constructor">gtksourceview.SourcePrintJob</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-config" title="gtksourceview.SourcePrintJob.set_config">set_config</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>config</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-config" title="gtksourceview.SourcePrintJob.get_config">get_config</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-buffer" title="gtksourceview.SourcePrintJob.set_buffer">set_buffer</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-buffer" title="gtksourceview.SourcePrintJob.get_buffer">get_buffer</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--setup-from-view" title="gtksourceview.SourcePrintJob.setup_from_view">setup_from_view</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>view</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-tabs-width" title="gtksourceview.SourcePrintJob.set_tabs_width">set_tabs_width</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tabs_width</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-tabs-width" title="gtksourceview.SourcePrintJob.get_tabs_width">get_tabs_width</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-wrap-mode" title="gtksourceview.SourcePrintJob.set_wrap_mode">set_wrap_mode</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>wrap</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-wrap-mode" title="gtksourceview.SourcePrintJob.get_wrap_mode">get_wrap_mode</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-highlight" title="gtksourceview.SourcePrintJob.set_highlight">set_highlight</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>highlight</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-highlight" title="gtksourceview.SourcePrintJob.get_highlight">get_highlight</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-font-desc" title="gtksourceview.SourcePrintJob.set_font_desc">set_font_desc</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>font_desc</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-font-desc" title="gtksourceview.SourcePrintJob.get_font_desc">get_font_desc</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-font" title="gtksourceview.SourcePrintJob.set_font">set_font</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>highlight</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-font" title="gtksourceview.SourcePrintJob.get_font">get_font</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-numbers-font-desc" title="gtksourceview.SourcePrintJob.set_numbers_font_desc">set_numbers_font_desc</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>desc</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-numbers-font-desc" title="gtksourceview.SourcePrintJob.get_numbers_font_desc">get_numbers_font_desc</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-numbers-font" title="gtksourceview.SourcePrintJob.set_numbers_font">set_numbers_font</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>font_name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-numbers-font" title="gtksourceview.SourcePrintJob.get_numbers_font">get_numbers_font</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-font" title="gtksourceview.SourcePrintJob.get_font">get_font</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-print-numbers" title="gtksourceview.SourcePrintJob.set_print_numbers">set_print_numbers</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>interval</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-print-numbers" title="gtksourceview.SourcePrintJob.get_print_numbers">get_print_numbers</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-text-margins" title="gtksourceview.SourcePrintJob.set_text_margins">set_text_margins</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>top</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bottom</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>right</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-text-margins" title="gtksourceview.SourcePrintJob.get_text_margins">get_text_margins</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--print" title="gtksourceview.SourcePrintJob.print">print</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--print-range" title="gtksourceview.SourcePrintJob.print_range">print_range</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--print-range-async" title="gtksourceview.SourcePrintJob.print_range_async">print_range_async</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>start</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>end</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--cancel" title="gtksourceview.SourcePrintJob.cancel">cancel</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-print-job" title="gtksourceview.SourcePrintJob.get_print_job">get_print_job</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-page" title="gtksourceview.SourcePrintJob.get_page">get_page</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-page-count" title="gtksourceview.SourcePrintJob.get_page_count">get_page_count</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-print-context" title="gtksourceview.SourcePrintJob.get_print_context">get_print_context</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-print-header" title="gtksourceview.SourcePrintJob.set_print_header">set_print_header</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-print-header" title="gtksourceview.SourcePrintJob.get_print_header">get_print_header</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-print-footer" title="gtksourceview.SourcePrintJob.set_print_footer">set_print_footer</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-print-footer" title="gtksourceview.SourcePrintJob.get_print_footer">get_print_footer</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-header-footer-font-desc" title="gtksourceview.SourcePrintJob.set_header_footer_font_desc">set_header_footer_font_desc</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>desc</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname">get_header_footer_font_desc</span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-header-footer-font" title="gtksourceview.SourcePrintJob.set_header_footer_font">set_header_footer_font</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>font_name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-header-footer-font" title="gtksourceview.SourcePrintJob.get_header_footer_font">get_header_footer_font</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-header-format" title="gtksourceview.SourcePrintJob.set_header_format">set_header_format</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>center</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>right</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>separator</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-footer-format" title="gtksourceview.SourcePrintJob.set_footer_format">set_footer_format</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>center</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>right</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>separator</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2608844"></a><h2>Ancestry</h2><pre class="synopsis">+-- gobject.GObject
  +-- <a class="link" href="class-gtksourceprintjob.html" title="gtksourceview.SourcePrintJob">gtksourceview.SourcePrintJob</a>
</pre></div><div class="refsect1" title="Properties"><a name="id2608879"></a><h2>Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"buffer"</td><td valign="top">Read-Write</td><td valign="top">The <a href="../poppler/.html">gtksourceview.SourceBuffer</a> to print.</td></tr><tr valign="top"><td valign="top">"config"</td><td valign="top">Read-Write</td><td valign="top">Configuration options for the print job.</td></tr><tr valign="top"><td valign="top">"font"</td><td valign="top">Read-Write</td><td valign="top">GnomeFont name to use for the document text (deprecated), default None.</td></tr><tr valign="top"><td valign="top">"font-desc"</td><td valign="top">Read-Write</td><td valign="top">Font to use for the document text (e.g. "Monospace 10").</td></tr><tr valign="top"><td valign="top">"header-footer-font"</td><td valign="top">Read-Write</td><td valign="top">GnomeFont name to use for the header and footer (deprecated), default None.</td></tr><tr valign="top"><td valign="top">"header-footer-font-desc"</td><td valign="top">Read-Write</td><td valign="top">Font to use for headers and footers (e.g. "Monospace 10").</td></tr><tr valign="top"><td valign="top">"highlight"</td><td valign="top">Read-Write</td><td valign="top">Whether to print the document with highlighted syntax, default True.</td></tr><tr valign="top"><td valign="top">"numbers-font"</td><td valign="top">Read-Write</td><td valign="top">GnomeFont name to use for the line numbers (deprecated), default None.</td></tr><tr valign="top"><td valign="top">"numbers-font-desc"</td><td valign="top">Read-Write</td><td valign="top">Font description to use for the line numbers (e.g. "Monospace 10").</td></tr><tr valign="top"><td valign="top">"print-footer"</td><td valign="top">Read-Write</td><td valign="top">Whether to print a footer in each page, default False.</td></tr><tr valign="top"><td valign="top">"print-header"</td><td valign="top">Read-Write</td><td valign="top">Whether to print an header in each page, default False.</td></tr><tr valign="top"><td valign="top">"print-numbers"</td><td valign="top">Read-Write</td><td valign="top">Interval of printed line numbers (0 means no numbers), allowed values: minor or equal to 100, default value: 1.</td></tr><tr valign="top"><td valign="top">"tabs-width"</td><td valign="top">Read-Write</td><td valign="top">Width in equivalent space characters of tabs, allowed values: minor or equal to 100, default value: 8.</td></tr><tr valign="top"><td valign="top">"wrap-mode"</td><td valign="top">Read-Write</td><td valign="top">Word wrapping mode, default value: GTK_WRAP_NONE.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Signal Prototypes"><a name="id2609201"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><a class="link" href="class-gtksourceprintjob.html#signal-gtksourceprintjob--begin-page" title='The "begin-page" gtksourceprintjob.SourcePrintJob Signal'>"begin-page"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourceprintjob</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>arg1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term"><a class="link" href="class-gtksourceprintjob.html#signal-gtksourceprintjob--finished" title='The "finished" gtksourceprintjob.SourcePrintJob Signal'>"finished"</a></span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourceprintjob</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>arg1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="description-gtksourceprintjob"></a><h2>Description</h2><p>
        The <a class="link" href="class-gtksourceprintjob.html" title="gtksourceview.SourcePrintJob">gtksourceview.SourcePrintJob</a> object is used to print the contents of a 
        <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer">gtksourceview.SourceBuffer</a>. You can set various configuration options to 
        customize the printed output, and the result is obtained as a 
        <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView">gtksourceview.SourcePrintJob</a> object, which you can then preview with 
        gnomeprint.ui.JobPreview or print directly with 
        gnomeprint.Job.print
    </p><p>
        Printing can be done synchronously and asynchronously. Asynchronous methods are provided so you can give the user feedback 
        about what's going on when printing long documents (see the <a class="link" href="class-gtksourceprintjob.html#signal-gtksourceprintjob--begin-page" title='The "begin-page" gtksourceprintjob.SourcePrintJob Signal'>"begin-page"</a> 
        and <a class="link" href="class-gtksourceprintjob.html#signal-gtksourceprintjob--finished" title='The "finished" gtksourceprintjob.SourcePrintJob Signal'>"finished"</a> signals).
    </p><p>
        The task of a <a class="link" href="class-gtksourceprintjob.html" title="gtksourceview.SourcePrintJob">gtksourceview.SourcePrintJob</a> is to produce a 
        gnomeprint.Job. What this means is that once you get the resulting 
        gnomeprint.Job, you might reuse the 
        <a class="link" href="class-gtksourceprintjob.html" title="gtksourceview.SourcePrintJob">gtksourceview.SourcePrintJob</a> to produce another output 
        (with different configuration options for example) or just unreference it and forget about it. 
        The lifetime of the produced object is independent of that of the producer.
    </p><p>
        Before printing you should at least set the <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer">gtksourceview.SourceBuffer</a> 
        you want to print (using <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-buffer" title="gtksourceview.SourcePrintJob.set_buffer">set_buffer</a>). 
        Besides that, you might configure word wrapping, font, whether to print hightlighted text as seen in the 
        <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView">gtksourceview.SourceView</a>, line numbers, basic headers and footers.
    </p><p>
        <a class="link" href="class-gtksourceprintjob.html" title="gtksourceview.SourcePrintJob">gtksourceview.SourcePrintJob</a> can print basic headers and footers in each page. 
        You can specify the time like strings for text on the left, right and center of the top and bottom of the page. 
        You can also make <a class="link" href="class-gtksourceprintjob.html" title="gtksourceview.SourcePrintJob">gtksourceview.SourcePrintJob</a> draw a separator line between 
        the text document and the header and footer. And you can specify a different font (from that used for the text document).
    </p><p>
        Customization beyond that is possible, but you have to do the printing manually. To do that, you need to connect to the 
        <a class="link" href="class-gtksourceprintjob.html#signal-gtksourceprintjob--begin-page" title='The "begin-page" gtksourceprintjob.SourcePrintJob Signal'>"begin-page"</a> signal of the job and allocate some space in the 
        page using <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-text-margins" title="gtksourceview.SourcePrintJob.set_text_margins">set_text_margins</a>. 
        Whenever <a class="link" href="class-gtksourceprintjob.html" title="gtksourceview.SourcePrintJob">gtksourceview.SourcePrintJob</a> is about to print a new text page, 
        the signal will be emitted. You can then get the gnomeprint.Context being 
        used with <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-print-context" title="gtksourceview.SourcePrintJob.get_print_context">get_print_context</a> and use Gnome Print functions 
        directly. The space you allocate is inside the document margins defined in the specified 
        gnomeprint.Config, but outside all print area used by 
        <a class="link" href="class-gtksourceprintjob.html" title="gtksourceview.SourcePrintJob">gtksourceview.SourcePrintJob</a> itself.
    </p></div><div class="refsect1" title="Constructor"><a name="constructor-gtksourceprintjob"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtksourceview.SourcePrintJob</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>buffer</code></strong> :</span></p></td><td>a <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer"><code class="classname">gtksourceview.SourceBuffer</code></a> 
      or <code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gtksourceprintjob.html" title="gtksourceview.SourcePrintJob"><code class="classname">gtksourceview.SourcePrintJob</code></a>.
        </td></tr></tbody></table><p>
    Creates a new <a class="link" href="class-gtksourceprintjob.html" title="gtksourceview.SourcePrintJob"><code class="classname">gtksourceview.SourcePrintJob</code></a> object.
  </p></div><div class="refsect1" title="Methods"><a name="id2609694"></a><h2>Methods</h2><div class="refsect2" title="gtksourceview.SourcePrintJob.set_config"><a name="method-gtksourceprintjob--set-config"></a><h3>gtksourceview.SourcePrintJob.set_config</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_config</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>config</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>config</code></strong> :</span></p></td><td> a gnomeprint.Config object to get printing configuration from.</td></tr></tbody></table><p>
        The <code class="methodname">set_config</code>() method sets the print configuration for the job. 
        If you don't set a configuration object for the print job, when needed one 
        will be created with gnomeprint.Config
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_config"><a name="method-gtksourceprintjob--get-config"></a><h3>gtksourceview.SourcePrintJob.get_config</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_config</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the gnomeprint.Config for the print job.</td></tr></tbody></table><p>
      The <code class="methodname">get_config</code>() method gets the current gnomeprint.Config 
      the print job will use. If not previously set, this will create a default configuration and return it. The returned object reference 
      is owned by the print job.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_buffer"><a name="method-gtksourceprintjob--set-buffer"></a><h3>gtksourceview.SourcePrintJob.set_buffer</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_buffer</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>buffer</code></strong> :</span></p></td><td> a <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer">gtksourceview.SourceBuffer</a>.</td></tr></tbody></table><p>
        The <code class="methodname">set_buffer</code>() method sets the <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer">gtksourceview.SourceBuffer</a> 
        the print job will print. You need to specify a buffer to print, either by the use of this function or by creating the print 
        job passing the parameter <span style="color: red">&lt;methodparam&gt;buffer&lt;/methodparam&gt;</span> at the constructor.
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_buffer"><a name="method-gtksourceprintjob--get-buffer"></a><h3>gtksourceview.SourcePrintJob.get_buffer</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_buffer</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer">gtksourceview.SourceBuffer</a> to print.</td></tr></tbody></table><p>
      The <code class="methodname">get_buffer</code>() method gets the <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer">gtksourceview.SourceBuffer</a> 
      the print job would print. The returned object reference (if non <code class="literal">None</code>) is owned by the job object and should not be unreferenced
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.setup_from_view"><a name="method-gtksourceprintjob--setup-from-view"></a><h3>gtksourceview.SourcePrintJob.setup_from_view</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">setup_from_view</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>view</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>view</code></strong> :</span></p></td><td> a <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView">gtksourceview.SourceView</a> to get configuration from.</td></tr></tbody></table><p>
        The <code class="methodname">setup_from_view</code>() method is a convenience function to set several configuration options at once, 
        so that the printed output matches view. The options set are buffer (if not set already), tabs width, highlighting, wrap mode 
        and default font.
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_tabs_width"><a name="method-gtksourceprintjob--set-tabs-width"></a><h3>gtksourceview.SourcePrintJob.set_tabs_width</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_tabs_width</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tabs_width</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tabs_width</code></strong> :</span></p></td><td> the number of equivalent spaces for a tabulation.</td></tr></tbody></table><p>
        The <code class="methodname">set_tabs_width</code>() method sets the width (in equivalent spaces) of tabulations for the printed text. 
        The width in printing units will be calculated as the width of a string containing tabs_width spaces of the default font. 
        Tabulation stops are set for the full width of printed text.
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_tabs_width"><a name="method-gtksourceprintjob--get-tabs-width"></a><h3>gtksourceview.SourcePrintJob.get_tabs_width</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_tabs_width</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the width (in equivalent spaces) of a tabulation.</td></tr></tbody></table><p>
      The <code class="methodname">get_tabs_width</code>() method determines the configured width (in equivalent spaces) of tabulations. 
      The default value is 8.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_wrap_mode"><a name="method-gtksourceprintjob--set-wrap-mode"></a><h3>gtksourceview.SourcePrintJob.set_wrap_mode</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_wrap_mode</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>wrap</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>wrap</code></strong> :</span></p></td><td> the wrap mode.</td></tr></tbody></table><p>
        The <code class="methodname">set_wrap_mode</code>() method sets the wrap mode for lines of text larger than the printable width. 
        See GtkWrapMode for a definition of the possible values.
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_wrap_mode"><a name="method-gtksourceprintjob--get-wrap-mode"></a><h3>gtksourceview.SourcePrintJob.get_wrap_mode</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_wrap_mode</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the current wrapping mode for the print job.</td></tr></tbody></table><p>
      The <code class="methodname">get_tabs_width</code>() method determines the wrapping style for text lines wider than the printable width. 
      The default is no wrapping.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_highlight"><a name="method-gtksourceprintjob--set-highlight"></a><h3>gtksourceview.SourcePrintJob.set_highlight</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_highlight</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>highlight</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>highlight</code></strong> :</span></p></td><td> if <code class="literal">TRUE</code> the printed text should be highlighted.</td></tr></tbody></table><p>
        The <code class="methodname">set_highlight</code>() method sets whether the printed text will be highlighted according to the buffer 
        rules. Both color and font style are applied.
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_highlight"><a name="method-gtksourceprintjob--get-highlight"></a><h3>gtksourceview.SourcePrintJob.get_highlight</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_highlight</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">TRUE</code> if the printed output will be highlighted.</td></tr></tbody></table><p>
      The <code class="methodname">get_tabs_width</code>() method determines if the job is configured to print the text highlighted with 
      colors and font styles. Note that highlighting will happen only if the buffer to print has highlighting activated.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_font_desc"><a name="method-gtksourceprintjob--set-font-desc"></a><h3>gtksourceview.SourcePrintJob.set_font_desc</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_font_desc</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>desc</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>desc</code></strong> :</span></p></td><td>  the PangoFontDescription for the default font.</td></tr></tbody></table><p>
        The <code class="methodname">set_font_desc</code>() method sets the default font for the printed text.
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_font_desc"><a name="method-gtksourceprintjob--get-font-desc"></a><h3>gtksourceview.SourcePrintJob.get_font_desc</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_font_desc</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the current text font description.</td></tr></tbody></table><p>
      The <code class="methodname">get_font_desc</code>() method determines the default font to be used for the printed text. 
      The returned string is of the form "Fontfamily Style Size", for example "Monospace Regular 10.0".
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_font"><a name="method-gtksourceprintjob--set-font"></a><h3>gtksourceview.SourcePrintJob.set_font</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_font</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>font_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>font_name</code></strong> :</span></p></td><td> the name of the default font.</td></tr></tbody></table><p>
        The <code class="methodname">set_font</code>() method sets the default font for the printed text. 
        <em class="parameter"><code>font_name</code></em> should be a full font name GnomePrint can understand (e.g. "Monospace Regular 10.0")
	  </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
        Note that font_name is a GnomeFont name not a Pango font description string. This function is deprecated since GnomeFont 
        is no longer used when implementing printing for GtkSourceView; 
        you should use <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-font-desc" title="gtksourceview.SourcePrintJob.set_font_desc">set_font_desc</a> instead.
      </div></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_font"><a name="method-gtksourceprintjob--get-font"></a><h3>gtksourceview.SourcePrintJob.get_font</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_font</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>  a newly allocated string with the name of the current text font.</td></tr></tbody></table><p>
      The <code class="methodname">get_font</code>() method determines the default font to be used for the printed text. 
      The returned string is of the form "Fontfamily Style Size", for example "Monospace Regular 10.0". 
    </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
        Note that font_name is a GnomeFont name not a Pango font description string. This function is deprecated since GnomeFont 
        is no longer used when implementing printing for GtkSourceView; 
        you should use <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-font-desc" title="gtksourceview.SourcePrintJob.get_font_desc">get_font_desc</a> instead.
    </div></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_numbers_font_desc"><a name="method-gtksourceprintjob--set-numbers-font-desc"></a><h3>gtksourceview.SourcePrintJob.set_numbers_font_desc</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_numbers_font_desc</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>desc</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>desc</code></strong> :</span></p></td><td>  the PangoFontDescription for the default font for the line numbers or <code class="literal">None</code>.</td></tr></tbody></table><p>
        The <code class="methodname">set_numbers_font_desc</code>() method sets the font for printing line numbers on the left margin. 
        If <code class="literal">None</code> is supplied, the default font (i.e. the one being used for the text) will be used instead.
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_numbers_font_desc"><a name="method-gtksourceprintjob--get-numbers-font-desc"></a><h3>gtksourceview.SourcePrintJob.get_numbers_font_desc</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_numbers_font_desc</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the line numbers font description or <code class="literal">None</code>.</td></tr></tbody></table><p>
      The <code class="methodname">get_font_desc</code>() method determines the font to be used for the line numbers. 
      This function might return <code class="literal">None</code> if a specific font for numbers has not been set.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_numbers_font"><a name="method-gtksourceprintjob--set-numbers-font"></a><h3>gtksourceview.SourcePrintJob.set_numbers_font</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_numbers_font</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>font_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>font_name</code></strong> :</span></p></td><td> the full name of the font for line numbers, or <code class="literal">None</code>.</td></tr></tbody></table><p>
        The <code class="methodname">set_font</code>() method sets the font for printing line numbers on the left margin. 
        If <code class="literal">None</code> is supplied, the default font (i.e. the one being used for the text) will be used instead.
	  </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
        Note that font_name is a GnomeFont name not a Pango font description string. This function is deprecated since GnomeFont 
        is no longer used when implementing printing for GtkSourceView; 
        you should use <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-numbers-font" title="gtksourceview.SourcePrintJob.set_numbers_font">set_numbers_font</a> instead.
      </div></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_numbers_font"><a name="method-gtksourceprintjob--get-numbers-font"></a><h3>gtksourceview.SourcePrintJob.get_numbers_font</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_numbers_font</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a newly allocated string with the name of the current line numbers font, or <code class="literal">None</code>.</td></tr></tbody></table><p>
      The <code class="methodname">get_numbers_font</code>() method determines the font to be used for the line numbers. 
      The returned string is of the form "Fontfamily Style Size", for example "Monospace Regular 10.0". 
      This function might return <code class="literal">None</code> if a specific font for numbers has not been set.
    </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
        Note that font_name is a GnomeFont name not a Pango font description string. This function is deprecated since GnomeFont 
        is no longer used when implementing printing for GtkSourceView; 
        you should use <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-numbers-font" title="gtksourceview.SourcePrintJob.get_numbers_font">get_numbers_font</a> instead.
    </div></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_print_numbers"><a name="method-gtksourceprintjob--set-print-numbers"></a><h3>gtksourceview.SourcePrintJob.set_print_numbers</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_print_numbers</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>interval</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>interval</code></strong> :</span></p></td><td> interval for printed line numbers.</td></tr></tbody></table><p>
        The <code class="methodname">set_print_numbers</code>() method sets the interval for printed line numbers. 
        If interval is 0 no numbers will be printed. If greater than 0, a number will be printed every interval lines 
        (i.e. 1 will print all line numbers).
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_print_numbers"><a name="method-gtksourceprintjob--get-print-numbers"></a><h3>gtksourceview.SourcePrintJob.get_print_numbers</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_print_numbers</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the interval of printed line numbers.</td></tr></tbody></table><p>
      The <code class="methodname">get_font_desc</code>() method determines the interval used for line number printing. 
      If the value is 0, no line numbers will be printed. The default value is 1 (i.e. numbers printed in all lines).
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_text_margins"><a name="method-gtksourceprintjob--set-text-margins"></a><h3>gtksourceview.SourcePrintJob.set_text_margins</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_text_margins</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>top</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>bottom</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>right</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>top</code></strong> :</span></p></td><td> the top user margin.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>bottom</code></strong> :</span></p></td><td> the bottom user margin.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>left</code></strong> :</span></p></td><td> the left user margin.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>right</code></strong> :</span></p></td><td> the right user margin.</td></tr></tbody></table><p>
        The <code class="methodname">set_text_margins</code>() method sets the four user margins for the print job. 
        These margins are in addition to the document margins provided in the GnomePrintConfig and will not be used for headers, 
        footers or line numbers (those are calculated separatedly). You can print in the space allocated by these margins by 
        connecting to the "begin_page" signal. The space is around the printed text, and inside the margins specified in 
        the GnomePrintConfig.
	  </p><p>
        The margin numbers are given in device units. If any of the given values is less than 0, that particular 
        margin is not altered by this function.
      </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_text_margins"><a name="method-gtksourceprintjob--get-text-margins"></a><h3>gtksourceview.SourcePrintJob.get_text_margins</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_text_margins</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a list of margin numbers.</td></tr></tbody></table><p>
      The <code class="methodname">get_text_margins</code>() method determines the user set margins for the job. 
      This function retrieves the values previously set by 
      <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-text-margins" title="gtksourceview.SourcePrintJob.set_text_margins">set_text_margins</a>. 
      The default for all four margins is 0. Any of the pointers can be <code class="literal">None</code> if you want to ignore that value.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.print"><a name="method-gtksourceprintjob--print"></a><h3>gtksourceview.SourcePrintJob.print</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">print</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>  a closed GnomePrintJob with the printed document, or <code class="literal">None</code> if printing 
          could not be completed.</td></tr></tbody></table><p>
      The <code class="methodname">print</code>() method produces a GnomePrintJob with the printed document. 
      The whole contents of the configured <a class="link" href="class-gtksourcebuffer.html" title="gtksourceview.SourceBuffer"><code class="classname">gtksourceview.SourceBuffer</code></a> 
      are printed. The returned job is already closed and ready to be previewed 
      (using gnomeprint.ui.JobPreview) or printed directly. 
      The caller of this function owns a reference to the returned object, so job can be destroyed and the output will still be valid, 
      or the document can be printed again with different settings.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.print_range"><a name="method-gtksourceprintjob--print-range"></a><h3>gtksourceview.SourcePrintJob.print_range</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">print_range</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>start</code></strong> :</span></p></td><td> the start of the region of text to print.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>end</code></strong> :</span></p></td><td> the end of the region of text to print.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a closed GnomePrintJob with the text from start to end printed, or <code class="literal">None</code> 
          if job could not print.</td></tr></tbody></table><p>
      The <code class="methodname">print_range</code>() method is similar to <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--print" title="gtksourceview.SourcePrintJob.print">print</a>, 
      except you can specify a range of text to print. The passed GtkTextIter values might be out of order.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.print_range_async"><a name="method-gtksourceprintjob--print-range-async"></a><h3>gtksourceview.SourcePrintJob.print_range_async</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">print_range_async</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>start</code></strong> :</span></p></td><td> the start of the region of text to print.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>end</code></strong> :</span></p></td><td> the end of the region of text to print.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <code class="literal">True</code> if the print started.</td></tr></tbody></table><p>
      The <code class="methodname">print_range_async</code>() method starts to print job asynchronously. 
      This function will ready the job for printing and install an idle handler that will render one page at a time.
    </p><p>
        This function will not return immediatly, as only page rendering is done asynchronously. 
        Text retrieval and paginating happens within this function. Also, if highlighting is enabled, the whole buffer 
        needs to be highlighted first.
    </p><p>
        To get notification when the job has finished, you must connect to the 
        <a class="link" href="class-gtksourceprintjob.html#signal-gtksourceprintjob--finished" title='The "finished" gtksourceprintjob.SourcePrintJob Signal'>"finished"</a> signal. 
        After this signal is emitted you can retrieve the resulting GnomePrintJob with 
        <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-print-job" title="gtksourceview.SourcePrintJob.get_print_job">get_print_job</a>. 
        You may cancel the job with <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--cancel" title="gtksourceview.SourcePrintJob.cancel">cancel</a>
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.cancel"><a name="method-gtksourceprintjob--cancel"></a><h3>gtksourceview.SourcePrintJob.cancel</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">cancel</span>(<span class="methodparam"></span>)</code></pre><p>
      The <code class="methodname">cancel</code>() method cancels an asynchronous printing operation. 
      This will remove any pending print idle handler and unref the current GnomePrintJob
    </p><p>
        Note that if you got a reference to the job's GnomePrintJob 
        (using <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--get-print-job" title="gtksourceview.SourcePrintJob.get_print_job">get_print_job</a>) it will not be destroyed 
        (since you hold a reference to it), but it will not be closed either. 
        If you wish to show or print the partially printed document you need to close it yourself.
    </p><p>
        This function has no effect when called from a non-asynchronous print operation.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_print_job"><a name="method-gtksourceprintjob--get-print-job"></a><h3>gtksourceview.SourcePrintJob.get_print_job</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_print_job</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a new reference to the job's GnomePrintJob, or <code class="literal">None</code>.</td></tr></tbody></table><p>
      The <code class="methodname">get_font_desc</code>() method gets a reference to the GnomePrintJob which the job is printing 
      or has recently finished printing. You need to unref the returned object.
    </p>
    	You may call this function in the middle of an asynchronous printing operation, but the returned GnomePrintJob 
    	will not be closed until the last page is printed and the "finished" signal is emitted.
    <p>
        
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_page"><a name="method-gtksourceprintjob--get-page"></a><h3>gtksourceview.SourcePrintJob.get_page</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_page</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the current page number.</td></tr></tbody></table><p>
      The <code class="methodname">get_page</code>() method determines the currently printing page number. 
      This function is only valid while printing (either synchronously or asynchronously).
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_page_count"><a name="method-gtksourceprintjob--get-page-count"></a><h3>gtksourceview.SourcePrintJob.get_page_count</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_page_count</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the number of pages of the printed job.</td></tr></tbody></table><p>
      The <code class="methodname">get_page_count</code>() method determines the total number of pages the job will print. 
      The returned value is only meaninful after pagination has finished. In practice, for synchronous printing this means when 
      <a class="link" href="class-gtksourceprintjob.html#signal-gtksourceprintjob--begin-page" title='The "begin-page" gtksourceprintjob.SourcePrintJob Signal'>"begin-page"</a> is emitted, or after 
      <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--print-range-async" title="gtksourceview.SourcePrintJob.print_range_async">print_range_async</a> has returned.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_print_context"><a name="method-gtksourceprintjob--get-print-context"></a><h3>gtksourceview.SourcePrintJob.get_print_context</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_print_context</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the current GnomePrintContext. The returned object is owned by job.</td></tr></tbody></table><p>
      The <code class="methodname">get_print_context</code>() method determines the GnomePrintContext of the current job. 
      This function is only valid while printing. Normally you would use this function to print in the margins set by 
      <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-text-margins" title="gtksourceview.SourcePrintJob.set_text_margins">set_text_margins</a> in a handler for the 
      <a class="link" href="class-gtksourceprintjob.html#signal-gtksourceprintjob--begin-page" title='The "begin-page" gtksourceprintjob.SourcePrintJob Signal'>"begin-page"</a> signal.
    </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_print_header"><a name="method-gtksourceprintjob--set-print-header"></a><h3>gtksourceview.SourcePrintJob.set_print_header</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_print_header</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>setting</code></strong> :</span></p></td><td> if <code class="literal">TRUE</code> you want the header to be printed.</td></tr></tbody></table><p>
          The <code class="methodname">set_print_header</code>() method sets whether you want to print a header in each page. The default header consists of three pieces 
          of text and an optional line separator, configurable with <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-header-format" title="gtksourceview.SourcePrintJob.set_header_format">set_header_format</a>.
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_print_header"><a name="method-gtksourceprintjob--get-print-header"></a><h3>gtksourceview.SourcePrintJob.get_print_header</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_print_header</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <code class="literal">TRUE</code> if the header is set to be printed.</td></tr></tbody></table><p>
          The <code class="methodname">get_print_header</code>() method Determines if a header is set to be printed for each page. A header will be printed if this 
          function returns <code class="literal">TRUE</code> and some format strings have been specified with 
          <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-header-format" title="gtksourceview.SourcePrintJob.set_header_format">set_header_format</a>.
	  </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_print_footer"><a name="method-gtksourceprintjob--set-print-footer"></a><h3>gtksourceview.SourcePrintJob.set_print_footer</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_print_footer</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>setting</code></strong> :</span></p></td><td> if <code class="literal">TRUE</code> you want the footer to be printed.</td></tr></tbody></table><p>
          The <code class="methodname">set_print_footer</code>() method sets whether you want to print a footer in each page. The default header consists of three pieces 
          of text and an optional line separator, configurable with <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-footer-format" title="gtksourceview.SourcePrintJob.set_footer_format">set_footer_format</a>.
      </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
        By default the footer format is unspecified, and if it's empty it will not be printed, regardless of this setting.
      </div></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_print_footer"><a name="method-gtksourceprintjob--get-print-footer"></a><h3>gtksourceview.SourcePrintJob.get_print_footer</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_print_footer</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <code class="literal">TRUE</code> if the footer is set to be printed.</td></tr></tbody></table><p>
          The <code class="methodname">get_print_footer</code>() method determines if a footer is set to be printed for each page. A header will be printed if this 
          function returns <code class="literal">TRUE</code> and some format strings have been specified with 
          <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-footer-format" title="gtksourceview.SourcePrintJob.set_footer_format">set_header_format</a>.
      </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_header_footer_font_desc"><a name="method-gtksourceprintjob--set-header-footer-font-desc"></a><h3>gtksourceview.SourcePrintJob.set_header_footer_font_desc</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_header_footer_font_desc</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>desc</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>desc</code></strong> :</span></p></td><td> the PangoFontDescription for the font to be used in headers and footers, or <code class="literal">None</code>.</td></tr></tbody></table><p>
          The <code class="methodname">set_header_footer_font_desc</code>() method sets the font for printing headers and footers. If <code class="literal">None</code> is supplied,
          the default font (i.e. the one being used for the text) will be used instead.
      </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_header_footer_font_desc"><a name="method-gtksourceprintjob--get-header-footer-desc"></a><h3>gtksourceview.SourcePrintJob.get_header_footer_font_desc</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_header_footer_font_desc</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>  the header and footer font description or <code class="literal">None</code>.</td></tr></tbody></table><p>
          The <code class="methodname">get_header_footer_font_desc</code>() method determines the font to be used for the header and footer. This function might return 
          <code class="literal">None</code> if a specific font has not been set.
      </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_header_footer_font"><a name="method-gtksourceprintjob--set-header-footer-font"></a><h3>gtksourceview.SourcePrintJob.set_header_footer_font</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_header_footer_font</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>font_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>font_name</code></strong> :</span></p></td><td> the full name of the font to be used in headers and footers, or <code class="literal">None</code>.</td></tr></tbody></table><p>
          The <code class="methodname">set_header_footer_font</code>() method sets the font for printing headers and footers. If <code class="literal">None</code> is supplied, the 
          default font (i.e. the one being used for the text) will be used instead.
      </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
          the result is a GnomeFont name not a Pango font description string. This function is deprecated since GnomeFont is no longer used when implementing 
          printing for <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView">gtksourceview.SourceView</a>; you should use 
          <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-header-footer-font-desc" title="gtksourceview.SourcePrintJob.set_header_footer_font_desc">set_header_footer_font_desc</a> instead.
      </div></div><div class="refsect2" title="gtksourceview.SourcePrintJob.get_header_footer_font"><a name="method-gtksourceprintjob--get-header-footer-font"></a><h3>gtksourceview.SourcePrintJob.get_header_footer_font</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_header_footer_font</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>  a newly allocated string with the name of the current header and footer font, or <code class="literal">None</code>.</td></tr></tbody></table><p>
          The <code class="methodname">get_header_footer_font_desc</code>() method determines the font to be used for the header and footer. The returned string is of the
          form "Fontfamily Style Size", for example "Monospace Regular 10.0". The returned value should be freed when no longer needed. This function might return 
          <code class="literal">None</code> if a specific font has not been set.
      </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
          the result is a GnomeFont name not a Pango font description string. This function is deprecated since GnomeFont is no longer used when implementing 
          printing for <a class="link" href="class-gtksourceview.html" title="gtksourceview.SourceView">gtksourceview.SourceView</a>; you should use 
          get_header_footer_font_desc instead.
      </div></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_header_format"><a name="method-gtksourceprintjob--set-header-format"></a><h3>gtksourceview.SourcePrintJob.set_header_format</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_header_format</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>center</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>right</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>separator</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>left</code></strong> :</span></p></td><td> a format string to print on the left of the header.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>center</code></strong> :</span></p></td><td> a format string to print on the center of the header.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>right</code></strong> :</span></p></td><td> a format string to print on the right of the header.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>right</code></strong> :</span></p></td><td> <code class="literal">TRUE</code> if you want a separator line to be printed.</td></tr></tbody></table><p>
          The <code class="methodname">set_header_format</code>() method sets time() like header format strings, to be printed on the left, center and right of the top of
          each page. The strings may include strftime(3) codes which will be expanded at print time. All time() codes are accepted, with the addition of N for the 
          page number and Q for the page count.
      </p><p>
          Separator specifies if a solid line should be drawn to separate the header from the document text.
      </p><p>
          If <code class="literal">None</code> is given for any of the three arguments, that particular string will not be printed. For the header to be printed, in addition to specifying format strings, you need to enable header printing with <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-print-header" title="gtksourceview.SourcePrintJob.set_print_header">set_print_header</a>.
      </p></div><div class="refsect2" title="gtksourceview.SourcePrintJob.set_footer_format"><a name="method-gtksourceprintjob--set-footer-format"></a><h3>gtksourceview.SourcePrintJob.set_footer_format</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_footer_format</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>left</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>center</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>right</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>separator</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>left</code></strong> :</span></p></td><td> a format string to print on the left of the footer.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>center</code></strong> :</span></p></td><td> a format string to print on the center of the footer.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>right</code></strong> :</span></p></td><td> a format string to print on the right of the footer.</td></tr></tbody></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>right</code></strong> :</span></p></td><td> <code class="literal">TRUE</code> if you want a separator line to be printed.</td></tr></tbody></table><p>
          The <code class="methodname">set_footer_format</code>() method sets time() like footer format strings, to be printed on the left, center and right of the top of
          each page. The strings may include strftime(3) codes which will be expanded at print time. All time() codes are accepted, with the addition of N for the 
          page number and Q for the page count.
      </p><p>
          Separator specifies if a solid line should be drawn to separate the header from the document text.
      </p><p>
          If <code class="literal">None</code> is given for any of the three arguments, that particular string will not be printed. For the header to be printed, in addition to specifying format strings, you need to enable header printing with <a class="link" href="class-gtksourceprintjob.html#method-gtksourceprintjob--set-print-footer" title="gtksourceview.SourcePrintJob.set_print_footer">set_print_footer</a>.
      </p></div></div><div class="refsect1" title="Signals"><a name="id2620862"></a><h2>Signals</h2><div class="refsect2" title='The "begin-page" gtksourceprintjob.SourcePrintJob Signal'><a name="signal-gtksourceprintjob--begin-page"></a><h3>The "begin-page" gtksourceprintjob.SourcePrintJob Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourceprintjob</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>sourceprintjob</code></em> :</span></p></td><td>the sourceprintjob that received the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified with the 
        <code class="methodname">connect</code>() method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
        The "begin-page" signal is emitted when the sourceprintjob is about to print a new text page. You can connect to this signal to provide the user with 
        feedback about the progress of printing, or to customize the printed page by for example, printing your own headers and footers.
    </p></div><div class="refsect2" title='The "finished" gtksourceprintjob.SourcePrintJob Signal'><a name="signal-gtksourceprintjob--finished"></a><h3>The "finished" gtksourceprintjob.SourcePrintJob Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sourceprintjob</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>sourcebuffer</code></em> :</span></p></td><td>the sourcebuffer that received the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified with the 
        <code class="methodname">connect</code>() method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if any)</td></tr></tbody></table><p>
        The "finished" signal is emitted whenever an asynchronous print job has finished. You can connect to this signal to get notification when a job has 
        finished printing. When it's emitted, the GnomePrintJob the sourceprintjob was producing has been closed and it can be either previewed or printed to the 
        physical device.
    </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtksourcetagstyle.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtksourceview-class-reference.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">gtksourceview.SourceTagStyle </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>