annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gtk-doc/html/cairo/cairo-PDF-Surfaces.html @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
jpayne@68 2 <html>
jpayne@68 3 <head>
jpayne@68 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
jpayne@68 5 <title>PDF Surfaces: Cairo: A Vector Graphics Library</title>
jpayne@68 6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
jpayne@68 7 <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
jpayne@68 8 <link rel="up" href="cairo-surfaces.html" title="Surfaces">
jpayne@68 9 <link rel="prev" href="cairo-Image-Surfaces.html" title="Image Surfaces">
jpayne@68 10 <link rel="next" href="cairo-PNG-Support.html" title="PNG Support">
jpayne@68 11 <meta name="generator" content="GTK-Doc V1.27 (XML mode)">
jpayne@68 12 <link rel="stylesheet" href="style.css" type="text/css">
jpayne@68 13 </head>
jpayne@68 14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
jpayne@68 15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
jpayne@68 16 <td width="100%" align="left" class="shortcuts">
jpayne@68 17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
jpayne@68 18 <a href="#cairo-PDF-Surfaces.description" class="shortcut">Description</a></span>
jpayne@68 19 </td>
jpayne@68 20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
jpayne@68 21 <td><a accesskey="u" href="cairo-surfaces.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
jpayne@68 22 <td><a accesskey="p" href="cairo-Image-Surfaces.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
jpayne@68 23 <td><a accesskey="n" href="cairo-PNG-Support.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
jpayne@68 24 </tr></table>
jpayne@68 25 <div class="refentry">
jpayne@68 26 <a name="cairo-PDF-Surfaces"></a><div class="titlepage"></div>
jpayne@68 27 <div class="refnamediv"><table width="100%"><tr>
jpayne@68 28 <td valign="top">
jpayne@68 29 <h2><span class="refentrytitle"><a name="cairo-PDF-Surfaces.top_of_page"></a>PDF Surfaces</span></h2>
jpayne@68 30 <p>PDF Surfaces — Rendering PDF documents</p>
jpayne@68 31 </td>
jpayne@68 32 <td class="gallery_image" valign="top" align="right"></td>
jpayne@68 33 </tr></table></div>
jpayne@68 34 <div class="refsect1">
jpayne@68 35 <a name="cairo-PDF-Surfaces.functions"></a><h2>Functions</h2>
jpayne@68 36 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 37 <colgroup>
jpayne@68 38 <col width="150px" class="functions_return">
jpayne@68 39 <col class="functions_name">
jpayne@68 40 </colgroup>
jpayne@68 41 <tbody>
jpayne@68 42 <tr>
jpayne@68 43 <td class="function_type">
jpayne@68 44 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
jpayne@68 45 </td>
jpayne@68 46 <td class="function_name">
jpayne@68 47 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-create" title="cairo_pdf_surface_create ()">cairo_pdf_surface_create</a> <span class="c_punctuation">()</span>
jpayne@68 48 </td>
jpayne@68 49 </tr>
jpayne@68 50 <tr>
jpayne@68 51 <td class="function_type">
jpayne@68 52 <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
jpayne@68 53 </td>
jpayne@68 54 <td class="function_name">
jpayne@68 55 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-create-for-stream" title="cairo_pdf_surface_create_for_stream ()">cairo_pdf_surface_create_for_stream</a> <span class="c_punctuation">()</span>
jpayne@68 56 </td>
jpayne@68 57 </tr>
jpayne@68 58 <tr>
jpayne@68 59 <td class="function_type">
jpayne@68 60 <span class="returnvalue">void</span>
jpayne@68 61 </td>
jpayne@68 62 <td class="function_name">
jpayne@68 63 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-restrict-to-version" title="cairo_pdf_surface_restrict_to_version ()">cairo_pdf_surface_restrict_to_version</a> <span class="c_punctuation">()</span>
jpayne@68 64 </td>
jpayne@68 65 </tr>
jpayne@68 66 <tr>
jpayne@68 67 <td class="function_type">
jpayne@68 68 <span class="returnvalue">void</span>
jpayne@68 69 </td>
jpayne@68 70 <td class="function_name">
jpayne@68 71 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-get-versions" title="cairo_pdf_get_versions ()">cairo_pdf_get_versions</a> <span class="c_punctuation">()</span>
jpayne@68 72 </td>
jpayne@68 73 </tr>
jpayne@68 74 <tr>
jpayne@68 75 <td class="function_type">const <span class="returnvalue">char</span> *
jpayne@68 76 </td>
jpayne@68 77 <td class="function_name">
jpayne@68 78 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-version-to-string" title="cairo_pdf_version_to_string ()">cairo_pdf_version_to_string</a> <span class="c_punctuation">()</span>
jpayne@68 79 </td>
jpayne@68 80 </tr>
jpayne@68 81 <tr>
jpayne@68 82 <td class="function_type">
jpayne@68 83 <span class="returnvalue">void</span>
jpayne@68 84 </td>
jpayne@68 85 <td class="function_name">
jpayne@68 86 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-set-size" title="cairo_pdf_surface_set_size ()">cairo_pdf_surface_set_size</a> <span class="c_punctuation">()</span>
jpayne@68 87 </td>
jpayne@68 88 </tr>
jpayne@68 89 <tr>
jpayne@68 90 <td class="function_type">
jpayne@68 91 <span class="returnvalue">int</span>
jpayne@68 92 </td>
jpayne@68 93 <td class="function_name">
jpayne@68 94 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-add-outline" title="cairo_pdf_surface_add_outline ()">cairo_pdf_surface_add_outline</a> <span class="c_punctuation">()</span>
jpayne@68 95 </td>
jpayne@68 96 </tr>
jpayne@68 97 <tr>
jpayne@68 98 <td class="function_type">
jpayne@68 99 <span class="returnvalue">void</span>
jpayne@68 100 </td>
jpayne@68 101 <td class="function_name">
jpayne@68 102 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-set-metadata" title="cairo_pdf_surface_set_metadata ()">cairo_pdf_surface_set_metadata</a> <span class="c_punctuation">()</span>
jpayne@68 103 </td>
jpayne@68 104 </tr>
jpayne@68 105 <tr>
jpayne@68 106 <td class="function_type">
jpayne@68 107 <span class="returnvalue">void</span>
jpayne@68 108 </td>
jpayne@68 109 <td class="function_name">
jpayne@68 110 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-set-page-label" title="cairo_pdf_surface_set_page_label ()">cairo_pdf_surface_set_page_label</a> <span class="c_punctuation">()</span>
jpayne@68 111 </td>
jpayne@68 112 </tr>
jpayne@68 113 <tr>
jpayne@68 114 <td class="function_type">
jpayne@68 115 <span class="returnvalue">void</span>
jpayne@68 116 </td>
jpayne@68 117 <td class="function_name">
jpayne@68 118 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-set-thumbnail-size" title="cairo_pdf_surface_set_thumbnail_size ()">cairo_pdf_surface_set_thumbnail_size</a> <span class="c_punctuation">()</span>
jpayne@68 119 </td>
jpayne@68 120 </tr>
jpayne@68 121 </tbody>
jpayne@68 122 </table></div>
jpayne@68 123 </div>
jpayne@68 124 <div class="refsect1">
jpayne@68 125 <a name="cairo-PDF-Surfaces.other"></a><h2>Types and Values</h2>
jpayne@68 126 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 127 <colgroup>
jpayne@68 128 <col width="150px" class="name">
jpayne@68 129 <col class="description">
jpayne@68 130 </colgroup>
jpayne@68 131 <tbody>
jpayne@68 132 <tr>
jpayne@68 133 <td class="define_keyword">#define</td>
jpayne@68 134 <td class="function_name"><a class="link" href="cairo-PDF-Surfaces.html#CAIRO-HAS-PDF-SURFACE:CAPS" title="CAIRO_HAS_PDF_SURFACE">CAIRO_HAS_PDF_SURFACE</a></td>
jpayne@68 135 </tr>
jpayne@68 136 <tr>
jpayne@68 137 <td class="define_keyword">#define</td>
jpayne@68 138 <td class="function_name"><a class="link" href="cairo-PDF-Surfaces.html#CAIRO-PDF-OUTLINE-ROOT:CAPS" title="CAIRO_PDF_OUTLINE_ROOT">CAIRO_PDF_OUTLINE_ROOT</a></td>
jpayne@68 139 </tr>
jpayne@68 140 <tr>
jpayne@68 141 <td class="datatype_keyword">enum</td>
jpayne@68 142 <td class="function_name"><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-outline-flags-t" title="enum cairo_pdf_outline_flags_t">cairo_pdf_outline_flags_t</a></td>
jpayne@68 143 </tr>
jpayne@68 144 <tr>
jpayne@68 145 <td class="datatype_keyword">enum</td>
jpayne@68 146 <td class="function_name"><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-metadata-t" title="enum cairo_pdf_metadata_t">cairo_pdf_metadata_t</a></td>
jpayne@68 147 </tr>
jpayne@68 148 <tr>
jpayne@68 149 <td class="datatype_keyword">enum</td>
jpayne@68 150 <td class="function_name"><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-version-t" title="enum cairo_pdf_version_t">cairo_pdf_version_t</a></td>
jpayne@68 151 </tr>
jpayne@68 152 </tbody>
jpayne@68 153 </table></div>
jpayne@68 154 </div>
jpayne@68 155 <div class="refsect1">
jpayne@68 156 <a name="cairo-PDF-Surfaces.description"></a><h2>Description</h2>
jpayne@68 157 <p>The PDF surface is used to render cairo graphics to Adobe
jpayne@68 158 PDF files and is a multi-page vector surface backend.</p>
jpayne@68 159 <p>The following mime types are supported: <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JPEG:CAPS" title="CAIRO_MIME_TYPE_JPEG"><code class="literal">CAIRO_MIME_TYPE_JPEG</code></a>,
jpayne@68 160 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JP2:CAPS" title="CAIRO_MIME_TYPE_JP2"><code class="literal">CAIRO_MIME_TYPE_JP2</code></a>, <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-UNIQUE-ID:CAPS" title="CAIRO_MIME_TYPE_UNIQUE_ID"><code class="literal">CAIRO_MIME_TYPE_UNIQUE_ID</code></a>,
jpayne@68 161 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JBIG2:CAPS" title="CAIRO_MIME_TYPE_JBIG2"><code class="literal">CAIRO_MIME_TYPE_JBIG2</code></a>, <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JBIG2-GLOBAL:CAPS" title="CAIRO_MIME_TYPE_JBIG2_GLOBAL"><code class="literal">CAIRO_MIME_TYPE_JBIG2_GLOBAL</code></a>,
jpayne@68 162 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JBIG2-GLOBAL-ID:CAPS" title="CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID"><code class="literal">CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID</code></a>,
jpayne@68 163 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-CCITT-FAX:CAPS" title="CAIRO_MIME_TYPE_CCITT_FAX"><code class="literal">CAIRO_MIME_TYPE_CCITT_FAX</code></a>, <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-CCITT-FAX-PARAMS:CAPS" title="CAIRO_MIME_TYPE_CCITT_FAX_PARAMS"><code class="literal">CAIRO_MIME_TYPE_CCITT_FAX_PARAMS</code></a>.</p>
jpayne@68 164 <div class="refsect2">
jpayne@68 165 <a name="id-1.5.5.5.4"></a><h3>JBIG2 Images</h3>
jpayne@68 166 <p>JBIG2 data in PDF must be in the embedded format as described in
jpayne@68 167 ISO/IEC 11544. Image specific JBIG2 data must be in
jpayne@68 168 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JBIG2:CAPS" title="CAIRO_MIME_TYPE_JBIG2"><code class="literal">CAIRO_MIME_TYPE_JBIG2</code></a>. Any global segments in the JBIG2 data
jpayne@68 169 (segments with page association field set to 0) must be in
jpayne@68 170 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JBIG2-GLOBAL:CAPS" title="CAIRO_MIME_TYPE_JBIG2_GLOBAL"><code class="literal">CAIRO_MIME_TYPE_JBIG2_GLOBAL</code></a>. The global data may be shared by
jpayne@68 171 multiple images. All images sharing the same global data must set
jpayne@68 172 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JBIG2-GLOBAL-ID:CAPS" title="CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID"><code class="literal">CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID</code></a> to a unique identifier. At least
jpayne@68 173 one of the images must provide the global data using
jpayne@68 174 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JBIG2-GLOBAL:CAPS" title="CAIRO_MIME_TYPE_JBIG2_GLOBAL"><code class="literal">CAIRO_MIME_TYPE_JBIG2_GLOBAL</code></a>. The global data will only be
jpayne@68 175 embedded once and shared by all JBIG2 images with the same
jpayne@68 176 <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-JBIG2-GLOBAL-ID:CAPS" title="CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID"><code class="literal">CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID</code></a>.</p>
jpayne@68 177 </div>
jpayne@68 178 <hr>
jpayne@68 179 <div class="refsect2">
jpayne@68 180 <a name="ccitt"></a><h3>CCITT Fax Images</h3>
jpayne@68 181 <p>The <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-CCITT-FAX:CAPS" title="CAIRO_MIME_TYPE_CCITT_FAX"><code class="literal">CAIRO_MIME_TYPE_CCITT_FAX</code></a> mime data requires a number of decoding
jpayne@68 182 parameters These parameters are specified using <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-CCITT-FAX-PARAMS:CAPS" title="CAIRO_MIME_TYPE_CCITT_FAX_PARAMS"><code class="literal">CAIRO_MIME_TYPE_CCITT_FAX_PARAMS</code></a>.</p>
jpayne@68 183 <p><a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-CCITT-FAX-PARAMS:CAPS" title="CAIRO_MIME_TYPE_CCITT_FAX_PARAMS"><code class="literal">CAIRO_MIME_TYPE_CCITT_FAX_PARAMS</code></a> mime data must contain a string of the form
jpayne@68 184 "param1=value1 param2=value2 ...".</p>
jpayne@68 185 <p><em class="parameter"><code>Columns</code></em>
jpayne@68 186 : [required] An integer specifying the width of the image in pixels.</p>
jpayne@68 187 <p><em class="parameter"><code>Rows</code></em>
jpayne@68 188 : [required] An integer specifying the height of the image in scan lines.</p>
jpayne@68 189 <p><em class="parameter"><code>K</code></em>
jpayne@68 190 : [optional] An integer identifying the encoding scheme used. &lt; 0
jpayne@68 191 is 2 dimensional Group 4, = 0 is Group3 1 dimensional, &gt; 0 is mixed 1
jpayne@68 192 and 2 dimensional encoding. Default is 0.</p>
jpayne@68 193 <p><em class="parameter"><code>EndOfLine</code></em>
jpayne@68 194 : [optional] If true end-of-line bit patterns are present. Default is false.</p>
jpayne@68 195 <p><em class="parameter"><code>EncodedByteAlign</code></em>
jpayne@68 196 : [optional] If true the end of line is padded
jpayne@68 197 with 0 bits so the next line begins on a byte boundary. Default is false.</p>
jpayne@68 198 <p><em class="parameter"><code>EndOfBlock</code></em>
jpayne@68 199 : [optional] If true the data contains an end-of-block pattern. Default is true.</p>
jpayne@68 200 <p><em class="parameter"><code>BlackIs1</code></em>
jpayne@68 201 : [optional] If true 1 bits are black pixels. Default is false.</p>
jpayne@68 202 <p><em class="parameter"><code>DamagedRowsBeforeError</code></em>
jpayne@68 203 : [optional] An integer specifying the
jpayne@68 204 number of damages rows tolerated before an error occurs. Default is 0.</p>
jpayne@68 205 <p>Boolean values may be "true" or "false", or 1 or 0.</p>
jpayne@68 206 <p>These parameters are the same as the CCITTFaxDecode parameters in the
jpayne@68 207 <a class="ulink" href="https://www.adobe.com/products/postscript/pdfs/PLRM.pdf" target="_top">PostScript Language Reference</a>
jpayne@68 208 and <a class="ulink" href="https://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf" target="_top">Portable Document Format (PDF)</a>.
jpayne@68 209 Refer to these documents for further details.</p>
jpayne@68 210 <p>An example <a class="link" href="cairo-cairo-surface-t.html#CAIRO-MIME-TYPE-CCITT-FAX-PARAMS:CAPS" title="CAIRO_MIME_TYPE_CCITT_FAX_PARAMS"><code class="literal">CAIRO_MIME_TYPE_CCITT_FAX_PARAMS</code></a> string is:</p>
jpayne@68 211 <pre class="programlisting">
jpayne@68 212 "Columns=10230 Rows=40000 K=1 EndOfLine=true EncodedByteAlign=1 BlackIs1=false"
jpayne@68 213 </pre>
jpayne@68 214 </div>
jpayne@68 215 </div>
jpayne@68 216 <div class="refsect1">
jpayne@68 217 <a name="cairo-PDF-Surfaces.functions_details"></a><h2>Functions</h2>
jpayne@68 218 <div class="refsect2">
jpayne@68 219 <a name="cairo-pdf-surface-create"></a><h3>cairo_pdf_surface_create ()</h3>
jpayne@68 220 <pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
jpayne@68 221 cairo_pdf_surface_create (<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>,
jpayne@68 222 <em class="parameter"><code><span class="type">double</span> width_in_points</code></em>,
jpayne@68 223 <em class="parameter"><code><span class="type">double</span> height_in_points</code></em>);</pre>
jpayne@68 224 <p>Creates a PDF surface of the specified size in points to be written
jpayne@68 225 to <em class="parameter"><code>filename</code></em>
jpayne@68 226 .</p>
jpayne@68 227 <div class="refsect3">
jpayne@68 228 <a name="cairo-pdf-surface-create.parameters"></a><h4>Parameters</h4>
jpayne@68 229 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 230 <colgroup>
jpayne@68 231 <col width="150px" class="parameters_name">
jpayne@68 232 <col class="parameters_description">
jpayne@68 233 <col width="200px" class="parameters_annotations">
jpayne@68 234 </colgroup>
jpayne@68 235 <tbody>
jpayne@68 236 <tr>
jpayne@68 237 <td class="parameter_name"><p>filename</p></td>
jpayne@68 238 <td class="parameter_description"><p>a filename for the PDF output (must be writable), <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> may be
jpayne@68 239 used to specify no output. This will generate a PDF surface that
jpayne@68 240 may be queried and used as a source, without generating a
jpayne@68 241 temporary file.</p></td>
jpayne@68 242 <td class="parameter_annotations"> </td>
jpayne@68 243 </tr>
jpayne@68 244 <tr>
jpayne@68 245 <td class="parameter_name"><p>width_in_points</p></td>
jpayne@68 246 <td class="parameter_description"><p>width of the surface, in points (1 point == 1/72.0 inch)</p></td>
jpayne@68 247 <td class="parameter_annotations"> </td>
jpayne@68 248 </tr>
jpayne@68 249 <tr>
jpayne@68 250 <td class="parameter_name"><p>height_in_points</p></td>
jpayne@68 251 <td class="parameter_description"><p>height of the surface, in points (1 point == 1/72.0 inch)</p></td>
jpayne@68 252 <td class="parameter_annotations"> </td>
jpayne@68 253 </tr>
jpayne@68 254 </tbody>
jpayne@68 255 </table></div>
jpayne@68 256 </div>
jpayne@68 257 <div class="refsect3">
jpayne@68 258 <a name="cairo-pdf-surface-create.returns"></a><h4>Returns</h4>
jpayne@68 259 <p> a pointer to the newly created surface. The caller
jpayne@68 260 owns the surface and should call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
jpayne@68 261 with it.</p>
jpayne@68 262 <p>This function always returns a valid pointer, but it will return a
jpayne@68 263 pointer to a "nil" surface if an error such as out of memory
jpayne@68 264 occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a> to check for this.</p>
jpayne@68 265 </div>
jpayne@68 266 <p class="since">Since: 1.2</p>
jpayne@68 267 </div>
jpayne@68 268 <hr>
jpayne@68 269 <div class="refsect2">
jpayne@68 270 <a name="cairo-pdf-surface-create-for-stream"></a><h3>cairo_pdf_surface_create_for_stream ()</h3>
jpayne@68 271 <pre class="programlisting"><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="returnvalue">cairo_surface_t</span></a> *
jpayne@68 272 cairo_pdf_surface_create_for_stream (<em class="parameter"><code><a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> write_func</code></em>,
jpayne@68 273 <em class="parameter"><code><span class="type">void</span> *closure</code></em>,
jpayne@68 274 <em class="parameter"><code><span class="type">double</span> width_in_points</code></em>,
jpayne@68 275 <em class="parameter"><code><span class="type">double</span> height_in_points</code></em>);</pre>
jpayne@68 276 <p>Creates a PDF surface of the specified size in points to be written
jpayne@68 277 incrementally to the stream represented by <em class="parameter"><code>write_func</code></em>
jpayne@68 278 and <em class="parameter"><code>closure</code></em>
jpayne@68 279 .</p>
jpayne@68 280 <div class="refsect3">
jpayne@68 281 <a name="cairo-pdf-surface-create-for-stream.parameters"></a><h4>Parameters</h4>
jpayne@68 282 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 283 <colgroup>
jpayne@68 284 <col width="150px" class="parameters_name">
jpayne@68 285 <col class="parameters_description">
jpayne@68 286 <col width="200px" class="parameters_annotations">
jpayne@68 287 </colgroup>
jpayne@68 288 <tbody>
jpayne@68 289 <tr>
jpayne@68 290 <td class="parameter_name"><p>write_func</p></td>
jpayne@68 291 <td class="parameter_description"><p>a <a class="link" href="cairo-PNG-Support.html#cairo-write-func-t" title="cairo_write_func_t ()"><span class="type">cairo_write_func_t</span></a> to accept the output data, may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
jpayne@68 292 to indicate a no-op <em class="parameter"><code>write_func</code></em>
jpayne@68 293 . With a no-op <em class="parameter"><code>write_func</code></em>
jpayne@68 294 ,
jpayne@68 295 the surface may be queried or used as a source without
jpayne@68 296 generating any temporary files.</p></td>
jpayne@68 297 <td class="parameter_annotations"> </td>
jpayne@68 298 </tr>
jpayne@68 299 <tr>
jpayne@68 300 <td class="parameter_name"><p>closure</p></td>
jpayne@68 301 <td class="parameter_description"><p>the closure argument for <em class="parameter"><code>write_func</code></em>
jpayne@68 302 </p></td>
jpayne@68 303 <td class="parameter_annotations"> </td>
jpayne@68 304 </tr>
jpayne@68 305 <tr>
jpayne@68 306 <td class="parameter_name"><p>width_in_points</p></td>
jpayne@68 307 <td class="parameter_description"><p>width of the surface, in points (1 point == 1/72.0 inch)</p></td>
jpayne@68 308 <td class="parameter_annotations"> </td>
jpayne@68 309 </tr>
jpayne@68 310 <tr>
jpayne@68 311 <td class="parameter_name"><p>height_in_points</p></td>
jpayne@68 312 <td class="parameter_description"><p>height of the surface, in points (1 point == 1/72.0 inch)</p></td>
jpayne@68 313 <td class="parameter_annotations"> </td>
jpayne@68 314 </tr>
jpayne@68 315 </tbody>
jpayne@68 316 </table></div>
jpayne@68 317 </div>
jpayne@68 318 <div class="refsect3">
jpayne@68 319 <a name="cairo-pdf-surface-create-for-stream.returns"></a><h4>Returns</h4>
jpayne@68 320 <p> a pointer to the newly created surface. The caller
jpayne@68 321 owns the surface and should call <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-destroy" title="cairo_surface_destroy ()"><code class="function">cairo_surface_destroy()</code></a> when done
jpayne@68 322 with it.</p>
jpayne@68 323 <p>This function always returns a valid pointer, but it will return a
jpayne@68 324 pointer to a "nil" surface if an error such as out of memory
jpayne@68 325 occurs. You can use <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-status" title="cairo_surface_status ()"><code class="function">cairo_surface_status()</code></a> to check for this.</p>
jpayne@68 326 </div>
jpayne@68 327 <p class="since">Since: 1.2</p>
jpayne@68 328 </div>
jpayne@68 329 <hr>
jpayne@68 330 <div class="refsect2">
jpayne@68 331 <a name="cairo-pdf-surface-restrict-to-version"></a><h3>cairo_pdf_surface_restrict_to_version ()</h3>
jpayne@68 332 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 333 cairo_pdf_surface_restrict_to_version (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
jpayne@68 334 <em class="parameter"><code><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-version-t" title="enum cairo_pdf_version_t"><span class="type">cairo_pdf_version_t</span></a> version</code></em>);</pre>
jpayne@68 335 <p>Restricts the generated PDF file to <em class="parameter"><code>version</code></em>
jpayne@68 336 . See <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-get-versions" title="cairo_pdf_get_versions ()"><code class="function">cairo_pdf_get_versions()</code></a>
jpayne@68 337 for a list of available version values that can be used here.</p>
jpayne@68 338 <p>This function should only be called before any drawing operations
jpayne@68 339 have been performed on the given surface. The simplest way to do
jpayne@68 340 this is to call this function immediately after creating the
jpayne@68 341 surface.</p>
jpayne@68 342 <div class="refsect3">
jpayne@68 343 <a name="cairo-pdf-surface-restrict-to-version.parameters"></a><h4>Parameters</h4>
jpayne@68 344 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 345 <colgroup>
jpayne@68 346 <col width="150px" class="parameters_name">
jpayne@68 347 <col class="parameters_description">
jpayne@68 348 <col width="200px" class="parameters_annotations">
jpayne@68 349 </colgroup>
jpayne@68 350 <tbody>
jpayne@68 351 <tr>
jpayne@68 352 <td class="parameter_name"><p>surface</p></td>
jpayne@68 353 <td class="parameter_description"><p>a PDF <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p></td>
jpayne@68 354 <td class="parameter_annotations"> </td>
jpayne@68 355 </tr>
jpayne@68 356 <tr>
jpayne@68 357 <td class="parameter_name"><p>version</p></td>
jpayne@68 358 <td class="parameter_description"><p>PDF version</p></td>
jpayne@68 359 <td class="parameter_annotations"> </td>
jpayne@68 360 </tr>
jpayne@68 361 </tbody>
jpayne@68 362 </table></div>
jpayne@68 363 </div>
jpayne@68 364 <p class="since">Since: 1.10</p>
jpayne@68 365 </div>
jpayne@68 366 <hr>
jpayne@68 367 <div class="refsect2">
jpayne@68 368 <a name="cairo-pdf-get-versions"></a><h3>cairo_pdf_get_versions ()</h3>
jpayne@68 369 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 370 cairo_pdf_get_versions (<em class="parameter"><code><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-version-t" title="enum cairo_pdf_version_t"><span class="type">cairo_pdf_version_t</span></a> const **versions</code></em>,
jpayne@68 371 <em class="parameter"><code><span class="type">int</span> *num_versions</code></em>);</pre>
jpayne@68 372 <p>Used to retrieve the list of supported versions. See
jpayne@68 373 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-restrict-to-version" title="cairo_pdf_surface_restrict_to_version ()"><code class="function">cairo_pdf_surface_restrict_to_version()</code></a>.</p>
jpayne@68 374 <div class="refsect3">
jpayne@68 375 <a name="cairo-pdf-get-versions.parameters"></a><h4>Parameters</h4>
jpayne@68 376 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 377 <colgroup>
jpayne@68 378 <col width="150px" class="parameters_name">
jpayne@68 379 <col class="parameters_description">
jpayne@68 380 <col width="200px" class="parameters_annotations">
jpayne@68 381 </colgroup>
jpayne@68 382 <tbody>
jpayne@68 383 <tr>
jpayne@68 384 <td class="parameter_name"><p>versions</p></td>
jpayne@68 385 <td class="parameter_description"><p>supported version list</p></td>
jpayne@68 386 <td class="parameter_annotations"> </td>
jpayne@68 387 </tr>
jpayne@68 388 <tr>
jpayne@68 389 <td class="parameter_name"><p>num_versions</p></td>
jpayne@68 390 <td class="parameter_description"><p>list length</p></td>
jpayne@68 391 <td class="parameter_annotations"> </td>
jpayne@68 392 </tr>
jpayne@68 393 </tbody>
jpayne@68 394 </table></div>
jpayne@68 395 </div>
jpayne@68 396 <p class="since">Since: 1.10</p>
jpayne@68 397 </div>
jpayne@68 398 <hr>
jpayne@68 399 <div class="refsect2">
jpayne@68 400 <a name="cairo-pdf-version-to-string"></a><h3>cairo_pdf_version_to_string ()</h3>
jpayne@68 401 <pre class="programlisting">const <span class="returnvalue">char</span> *
jpayne@68 402 cairo_pdf_version_to_string (<em class="parameter"><code><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-version-t" title="enum cairo_pdf_version_t"><span class="type">cairo_pdf_version_t</span></a> version</code></em>);</pre>
jpayne@68 403 <p>Get the string representation of the given <em class="parameter"><code>version</code></em>
jpayne@68 404 id. This function
jpayne@68 405 will return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>version</code></em>
jpayne@68 406 isn't valid. See <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-get-versions" title="cairo_pdf_get_versions ()"><code class="function">cairo_pdf_get_versions()</code></a>
jpayne@68 407 for a way to get the list of valid version ids.</p>
jpayne@68 408 <div class="refsect3">
jpayne@68 409 <a name="cairo-pdf-version-to-string.parameters"></a><h4>Parameters</h4>
jpayne@68 410 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 411 <colgroup>
jpayne@68 412 <col width="150px" class="parameters_name">
jpayne@68 413 <col class="parameters_description">
jpayne@68 414 <col width="200px" class="parameters_annotations">
jpayne@68 415 </colgroup>
jpayne@68 416 <tbody><tr>
jpayne@68 417 <td class="parameter_name"><p>version</p></td>
jpayne@68 418 <td class="parameter_description"><p>a version id</p></td>
jpayne@68 419 <td class="parameter_annotations"> </td>
jpayne@68 420 </tr></tbody>
jpayne@68 421 </table></div>
jpayne@68 422 </div>
jpayne@68 423 <div class="refsect3">
jpayne@68 424 <a name="cairo-pdf-version-to-string.returns"></a><h4>Returns</h4>
jpayne@68 425 <p> the string associated to given version.</p>
jpayne@68 426 </div>
jpayne@68 427 <p class="since">Since: 1.10</p>
jpayne@68 428 </div>
jpayne@68 429 <hr>
jpayne@68 430 <div class="refsect2">
jpayne@68 431 <a name="cairo-pdf-surface-set-size"></a><h3>cairo_pdf_surface_set_size ()</h3>
jpayne@68 432 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 433 cairo_pdf_surface_set_size (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
jpayne@68 434 <em class="parameter"><code><span class="type">double</span> width_in_points</code></em>,
jpayne@68 435 <em class="parameter"><code><span class="type">double</span> height_in_points</code></em>);</pre>
jpayne@68 436 <p>Changes the size of a PDF surface for the current (and
jpayne@68 437 subsequent) pages.</p>
jpayne@68 438 <p>This function should only be called before any drawing operations
jpayne@68 439 have been performed on the current page. The simplest way to do
jpayne@68 440 this is to call this function immediately after creating the
jpayne@68 441 surface or immediately after completing a page with either
jpayne@68 442 <a class="link" href="cairo-cairo-t.html#cairo-show-page" title="cairo_show_page ()"><code class="function">cairo_show_page()</code></a> or <a class="link" href="cairo-cairo-t.html#cairo-copy-page" title="cairo_copy_page ()"><code class="function">cairo_copy_page()</code></a>.</p>
jpayne@68 443 <div class="refsect3">
jpayne@68 444 <a name="cairo-pdf-surface-set-size.parameters"></a><h4>Parameters</h4>
jpayne@68 445 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 446 <colgroup>
jpayne@68 447 <col width="150px" class="parameters_name">
jpayne@68 448 <col class="parameters_description">
jpayne@68 449 <col width="200px" class="parameters_annotations">
jpayne@68 450 </colgroup>
jpayne@68 451 <tbody>
jpayne@68 452 <tr>
jpayne@68 453 <td class="parameter_name"><p>surface</p></td>
jpayne@68 454 <td class="parameter_description"><p>a PDF <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p></td>
jpayne@68 455 <td class="parameter_annotations"> </td>
jpayne@68 456 </tr>
jpayne@68 457 <tr>
jpayne@68 458 <td class="parameter_name"><p>width_in_points</p></td>
jpayne@68 459 <td class="parameter_description"><p>new surface width, in points (1 point == 1/72.0 inch)</p></td>
jpayne@68 460 <td class="parameter_annotations"> </td>
jpayne@68 461 </tr>
jpayne@68 462 <tr>
jpayne@68 463 <td class="parameter_name"><p>height_in_points</p></td>
jpayne@68 464 <td class="parameter_description"><p>new surface height, in points (1 point == 1/72.0 inch)</p></td>
jpayne@68 465 <td class="parameter_annotations"> </td>
jpayne@68 466 </tr>
jpayne@68 467 </tbody>
jpayne@68 468 </table></div>
jpayne@68 469 </div>
jpayne@68 470 <p class="since">Since: 1.2</p>
jpayne@68 471 </div>
jpayne@68 472 <hr>
jpayne@68 473 <div class="refsect2">
jpayne@68 474 <a name="cairo-pdf-surface-add-outline"></a><h3>cairo_pdf_surface_add_outline ()</h3>
jpayne@68 475 <pre class="programlisting"><span class="returnvalue">int</span>
jpayne@68 476 cairo_pdf_surface_add_outline (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
jpayne@68 477 <em class="parameter"><code><span class="type">int</span> parent_id</code></em>,
jpayne@68 478 <em class="parameter"><code>const <span class="type">char</span> *utf8</code></em>,
jpayne@68 479 <em class="parameter"><code>const <span class="type">char</span> *link_attribs</code></em>,
jpayne@68 480 <em class="parameter"><code><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-outline-flags-t" title="enum cairo_pdf_outline_flags_t"><span class="type">cairo_pdf_outline_flags_t</span></a> flags</code></em>);</pre>
jpayne@68 481 <p>Add an item to the document outline hierarchy with the name <em class="parameter"><code>utf8</code></em>
jpayne@68 482
jpayne@68 483 that links to the location specified by <em class="parameter"><code>link_attribs</code></em>
jpayne@68 484 . Link
jpayne@68 485 attributes have the same keys and values as the <a class="link" href="cairo-Tags-and-Links.html#link" title="Link Tags">Link Tag</a>,
jpayne@68 486 excluding the "rect" attribute. The item will be a child of the
jpayne@68 487 item with id <em class="parameter"><code>parent_id</code></em>
jpayne@68 488 . Use <a class="link" href="cairo-PDF-Surfaces.html#CAIRO-PDF-OUTLINE-ROOT:CAPS" title="CAIRO_PDF_OUTLINE_ROOT"><code class="literal">CAIRO_PDF_OUTLINE_ROOT</code></a> as the parent
jpayne@68 489 id of top level items.</p>
jpayne@68 490 <div class="refsect3">
jpayne@68 491 <a name="cairo-pdf-surface-add-outline.parameters"></a><h4>Parameters</h4>
jpayne@68 492 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 493 <colgroup>
jpayne@68 494 <col width="150px" class="parameters_name">
jpayne@68 495 <col class="parameters_description">
jpayne@68 496 <col width="200px" class="parameters_annotations">
jpayne@68 497 </colgroup>
jpayne@68 498 <tbody>
jpayne@68 499 <tr>
jpayne@68 500 <td class="parameter_name"><p>surface</p></td>
jpayne@68 501 <td class="parameter_description"><p>a PDF <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p></td>
jpayne@68 502 <td class="parameter_annotations"> </td>
jpayne@68 503 </tr>
jpayne@68 504 <tr>
jpayne@68 505 <td class="parameter_name"><p>parent_id</p></td>
jpayne@68 506 <td class="parameter_description"><p>the id of the parent item or <a class="link" href="cairo-PDF-Surfaces.html#CAIRO-PDF-OUTLINE-ROOT:CAPS" title="CAIRO_PDF_OUTLINE_ROOT"><code class="literal">CAIRO_PDF_OUTLINE_ROOT</code></a> if this is a top level item.</p></td>
jpayne@68 507 <td class="parameter_annotations"> </td>
jpayne@68 508 </tr>
jpayne@68 509 <tr>
jpayne@68 510 <td class="parameter_name"><p>utf8</p></td>
jpayne@68 511 <td class="parameter_description"><p>the name of the outline</p></td>
jpayne@68 512 <td class="parameter_annotations"> </td>
jpayne@68 513 </tr>
jpayne@68 514 <tr>
jpayne@68 515 <td class="parameter_name"><p>link_attribs</p></td>
jpayne@68 516 <td class="parameter_description"><p>the link attributes specifying where this outline links to</p></td>
jpayne@68 517 <td class="parameter_annotations"> </td>
jpayne@68 518 </tr>
jpayne@68 519 <tr>
jpayne@68 520 <td class="parameter_name"><p>flags</p></td>
jpayne@68 521 <td class="parameter_description"><p>outline item flags</p></td>
jpayne@68 522 <td class="parameter_annotations"> </td>
jpayne@68 523 </tr>
jpayne@68 524 </tbody>
jpayne@68 525 </table></div>
jpayne@68 526 </div>
jpayne@68 527 <div class="refsect3">
jpayne@68 528 <a name="cairo-pdf-surface-add-outline.returns"></a><h4>Returns</h4>
jpayne@68 529 <p> the id for the added item.</p>
jpayne@68 530 </div>
jpayne@68 531 <p class="since">Since: 1.16</p>
jpayne@68 532 </div>
jpayne@68 533 <hr>
jpayne@68 534 <div class="refsect2">
jpayne@68 535 <a name="cairo-pdf-surface-set-metadata"></a><h3>cairo_pdf_surface_set_metadata ()</h3>
jpayne@68 536 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 537 cairo_pdf_surface_set_metadata (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
jpayne@68 538 <em class="parameter"><code><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-metadata-t" title="enum cairo_pdf_metadata_t"><span class="type">cairo_pdf_metadata_t</span></a> metadata</code></em>,
jpayne@68 539 <em class="parameter"><code>const <span class="type">char</span> *utf8</code></em>);</pre>
jpayne@68 540 <p>Set document metadata. The <a class="link" href="cairo-PDF-Surfaces.html#CAIRO-PDF-METADATA-CREATE-DATE:CAPS"><code class="literal">CAIRO_PDF_METADATA_CREATE_DATE</code></a> and
jpayne@68 541 <a class="link" href="cairo-PDF-Surfaces.html#CAIRO-PDF-METADATA-MOD-DATE:CAPS"><code class="literal">CAIRO_PDF_METADATA_MOD_DATE</code></a> values must be in ISO-8601 format:
jpayne@68 542 YYYY-MM-DDThh:mm:ss. An optional timezone of the form "[+/-]hh:mm"
jpayne@68 543 or "Z" for UTC time can be appended. All other metadata values can be any UTF-8
jpayne@68 544 string.</p>
jpayne@68 545 <p>For example:</p>
jpayne@68 546 <div class="informalexample">
jpayne@68 547 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
jpayne@68 548 <tbody>
jpayne@68 549 <tr>
jpayne@68 550 <td class="listing_lines" align="right"><pre>1
jpayne@68 551 2</pre></td>
jpayne@68 552 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="cairo-PDF-Surfaces.html#cairo-pdf-surface-set-metadata">cairo_pdf_surface_set_metadata</a></span> <span class="gtkdoc opt">(</span>surface<span class="gtkdoc opt">,</span> CAIRO_PDF_METADATA_TITLE<span class="gtkdoc opt">,</span> <span class="string">&quot;My Document&quot;</span><span class="gtkdoc opt">);</span>
jpayne@68 553 <span class="function"><a href="cairo-PDF-Surfaces.html#cairo-pdf-surface-set-metadata">cairo_pdf_surface_set_metadata</a></span> <span class="gtkdoc opt">(</span>surface<span class="gtkdoc opt">,</span> CAIRO_PDF_METADATA_CREATE_DATE<span class="gtkdoc opt">,</span> <span class="string">&quot;2015-12-31T23:59+02:00&quot;</span><span class="gtkdoc opt">);</span></pre></td>
jpayne@68 554 </tr>
jpayne@68 555 </tbody>
jpayne@68 556 </table>
jpayne@68 557 </div>
jpayne@68 558
jpayne@68 559 <div class="refsect3">
jpayne@68 560 <a name="cairo-pdf-surface-set-metadata.parameters"></a><h4>Parameters</h4>
jpayne@68 561 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 562 <colgroup>
jpayne@68 563 <col width="150px" class="parameters_name">
jpayne@68 564 <col class="parameters_description">
jpayne@68 565 <col width="200px" class="parameters_annotations">
jpayne@68 566 </colgroup>
jpayne@68 567 <tbody>
jpayne@68 568 <tr>
jpayne@68 569 <td class="parameter_name"><p>surface</p></td>
jpayne@68 570 <td class="parameter_description"><p>a PDF <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p></td>
jpayne@68 571 <td class="parameter_annotations"> </td>
jpayne@68 572 </tr>
jpayne@68 573 <tr>
jpayne@68 574 <td class="parameter_name"><p>metadata</p></td>
jpayne@68 575 <td class="parameter_description"><p>The metadata item to set.</p></td>
jpayne@68 576 <td class="parameter_annotations"> </td>
jpayne@68 577 </tr>
jpayne@68 578 <tr>
jpayne@68 579 <td class="parameter_name"><p>utf8</p></td>
jpayne@68 580 <td class="parameter_description"><p>metadata value</p></td>
jpayne@68 581 <td class="parameter_annotations"> </td>
jpayne@68 582 </tr>
jpayne@68 583 </tbody>
jpayne@68 584 </table></div>
jpayne@68 585 </div>
jpayne@68 586 <p class="since">Since: 1.16</p>
jpayne@68 587 </div>
jpayne@68 588 <hr>
jpayne@68 589 <div class="refsect2">
jpayne@68 590 <a name="cairo-pdf-surface-set-page-label"></a><h3>cairo_pdf_surface_set_page_label ()</h3>
jpayne@68 591 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 592 cairo_pdf_surface_set_page_label (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
jpayne@68 593 <em class="parameter"><code>const <span class="type">char</span> *utf8</code></em>);</pre>
jpayne@68 594 <p>Set page label for the current page.</p>
jpayne@68 595 <div class="refsect3">
jpayne@68 596 <a name="cairo-pdf-surface-set-page-label.parameters"></a><h4>Parameters</h4>
jpayne@68 597 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 598 <colgroup>
jpayne@68 599 <col width="150px" class="parameters_name">
jpayne@68 600 <col class="parameters_description">
jpayne@68 601 <col width="200px" class="parameters_annotations">
jpayne@68 602 </colgroup>
jpayne@68 603 <tbody>
jpayne@68 604 <tr>
jpayne@68 605 <td class="parameter_name"><p>surface</p></td>
jpayne@68 606 <td class="parameter_description"><p>a PDF <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p></td>
jpayne@68 607 <td class="parameter_annotations"> </td>
jpayne@68 608 </tr>
jpayne@68 609 <tr>
jpayne@68 610 <td class="parameter_name"><p>utf8</p></td>
jpayne@68 611 <td class="parameter_description"><p>The page label.</p></td>
jpayne@68 612 <td class="parameter_annotations"> </td>
jpayne@68 613 </tr>
jpayne@68 614 </tbody>
jpayne@68 615 </table></div>
jpayne@68 616 </div>
jpayne@68 617 <p class="since">Since: 1.16</p>
jpayne@68 618 </div>
jpayne@68 619 <hr>
jpayne@68 620 <div class="refsect2">
jpayne@68 621 <a name="cairo-pdf-surface-set-thumbnail-size"></a><h3>cairo_pdf_surface_set_thumbnail_size ()</h3>
jpayne@68 622 <pre class="programlisting"><span class="returnvalue">void</span>
jpayne@68 623 cairo_pdf_surface_set_thumbnail_size (<em class="parameter"><code><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a> *surface</code></em>,
jpayne@68 624 <em class="parameter"><code><span class="type">int</span> width</code></em>,
jpayne@68 625 <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
jpayne@68 626 <p>Set the thumbnail image size for the current and all subsequent
jpayne@68 627 pages. Setting a width or height of 0 disables thumbnails for the
jpayne@68 628 current and subsequent pages.</p>
jpayne@68 629 <div class="refsect3">
jpayne@68 630 <a name="cairo-pdf-surface-set-thumbnail-size.parameters"></a><h4>Parameters</h4>
jpayne@68 631 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 632 <colgroup>
jpayne@68 633 <col width="150px" class="parameters_name">
jpayne@68 634 <col class="parameters_description">
jpayne@68 635 <col width="200px" class="parameters_annotations">
jpayne@68 636 </colgroup>
jpayne@68 637 <tbody>
jpayne@68 638 <tr>
jpayne@68 639 <td class="parameter_name"><p>surface</p></td>
jpayne@68 640 <td class="parameter_description"><p>a PDF <a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p></td>
jpayne@68 641 <td class="parameter_annotations"> </td>
jpayne@68 642 </tr>
jpayne@68 643 <tr>
jpayne@68 644 <td class="parameter_name"><p>width</p></td>
jpayne@68 645 <td class="parameter_description"><p>Thumbnail width.</p></td>
jpayne@68 646 <td class="parameter_annotations"> </td>
jpayne@68 647 </tr>
jpayne@68 648 <tr>
jpayne@68 649 <td class="parameter_name"><p>height</p></td>
jpayne@68 650 <td class="parameter_description"><p>Thumbnail height</p></td>
jpayne@68 651 <td class="parameter_annotations"> </td>
jpayne@68 652 </tr>
jpayne@68 653 </tbody>
jpayne@68 654 </table></div>
jpayne@68 655 </div>
jpayne@68 656 <p class="since">Since: 1.16</p>
jpayne@68 657 </div>
jpayne@68 658 </div>
jpayne@68 659 <div class="refsect1">
jpayne@68 660 <a name="cairo-PDF-Surfaces.other_details"></a><h2>Types and Values</h2>
jpayne@68 661 <div class="refsect2">
jpayne@68 662 <a name="CAIRO-HAS-PDF-SURFACE:CAPS"></a><h3>CAIRO_HAS_PDF_SURFACE</h3>
jpayne@68 663 <pre class="programlisting">#define CAIRO_HAS_PDF_SURFACE 1
jpayne@68 664 </pre>
jpayne@68 665 <p>Defined if the PDF surface backend is available.
jpayne@68 666 This macro can be used to conditionally compile backend-specific code.</p>
jpayne@68 667 <p class="since">Since: 1.2</p>
jpayne@68 668 </div>
jpayne@68 669 <hr>
jpayne@68 670 <div class="refsect2">
jpayne@68 671 <a name="CAIRO-PDF-OUTLINE-ROOT:CAPS"></a><h3>CAIRO_PDF_OUTLINE_ROOT</h3>
jpayne@68 672 <pre class="programlisting">#define CAIRO_PDF_OUTLINE_ROOT 0
jpayne@68 673 </pre>
jpayne@68 674 <p>The root outline item in <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-add-outline" title="cairo_pdf_surface_add_outline ()"><code class="function">cairo_pdf_surface_add_outline()</code></a>.</p>
jpayne@68 675 <p class="since">Since: 1.16</p>
jpayne@68 676 </div>
jpayne@68 677 <hr>
jpayne@68 678 <div class="refsect2">
jpayne@68 679 <a name="cairo-pdf-outline-flags-t"></a><h3>enum cairo_pdf_outline_flags_t</h3>
jpayne@68 680 <p><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-outline-flags-t" title="enum cairo_pdf_outline_flags_t"><span class="type">cairo_pdf_outline_flags_t</span></a> is used by the
jpayne@68 681 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-add-outline" title="cairo_pdf_surface_add_outline ()"><code class="function">cairo_pdf_surface_add_outline()</code></a> function specify the attributes of
jpayne@68 682 an outline item. These flags may be bitwise-or'd to produce any
jpayne@68 683 combination of flags.</p>
jpayne@68 684 <div class="refsect3">
jpayne@68 685 <a name="cairo-pdf-outline-flags-t.members"></a><h4>Members</h4>
jpayne@68 686 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 687 <colgroup>
jpayne@68 688 <col width="300px" class="enum_members_name">
jpayne@68 689 <col class="enum_members_description">
jpayne@68 690 <col width="200px" class="enum_members_annotations">
jpayne@68 691 </colgroup>
jpayne@68 692 <tbody>
jpayne@68 693 <tr>
jpayne@68 694 <td class="enum_member_name"><p><a name="CAIRO-PDF-OUTLINE-FLAG-OPEN:CAPS"></a>CAIRO_PDF_OUTLINE_FLAG_OPEN</p></td>
jpayne@68 695 <td class="enum_member_description">
jpayne@68 696 <p>The outline item defaults to open in the PDF viewer (Since 1.16)</p>
jpayne@68 697 </td>
jpayne@68 698 <td class="enum_member_annotations"> </td>
jpayne@68 699 </tr>
jpayne@68 700 <tr>
jpayne@68 701 <td class="enum_member_name"><p><a name="CAIRO-PDF-OUTLINE-FLAG-BOLD:CAPS"></a>CAIRO_PDF_OUTLINE_FLAG_BOLD</p></td>
jpayne@68 702 <td class="enum_member_description">
jpayne@68 703 <p>The outline item is displayed by the viewer in bold text (Since 1.16)</p>
jpayne@68 704 </td>
jpayne@68 705 <td class="enum_member_annotations"> </td>
jpayne@68 706 </tr>
jpayne@68 707 <tr>
jpayne@68 708 <td class="enum_member_name"><p><a name="CAIRO-PDF-OUTLINE-FLAG-ITALIC:CAPS"></a>CAIRO_PDF_OUTLINE_FLAG_ITALIC</p></td>
jpayne@68 709 <td class="enum_member_description">
jpayne@68 710 <p>The outline item is displayed by the viewer in italic text (Since 1.16)</p>
jpayne@68 711 </td>
jpayne@68 712 <td class="enum_member_annotations"> </td>
jpayne@68 713 </tr>
jpayne@68 714 </tbody>
jpayne@68 715 </table></div>
jpayne@68 716 </div>
jpayne@68 717 <p class="since">Since: 1.16</p>
jpayne@68 718 </div>
jpayne@68 719 <hr>
jpayne@68 720 <div class="refsect2">
jpayne@68 721 <a name="cairo-pdf-metadata-t"></a><h3>enum cairo_pdf_metadata_t</h3>
jpayne@68 722 <p><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-metadata-t" title="enum cairo_pdf_metadata_t"><span class="type">cairo_pdf_metadata_t</span></a> is used by the
jpayne@68 723 <a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-surface-set-metadata" title="cairo_pdf_surface_set_metadata ()"><code class="function">cairo_pdf_surface_set_metadata()</code></a> function specify the metadata to set.</p>
jpayne@68 724 <div class="refsect3">
jpayne@68 725 <a name="cairo-pdf-metadata-t.members"></a><h4>Members</h4>
jpayne@68 726 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 727 <colgroup>
jpayne@68 728 <col width="300px" class="enum_members_name">
jpayne@68 729 <col class="enum_members_description">
jpayne@68 730 <col width="200px" class="enum_members_annotations">
jpayne@68 731 </colgroup>
jpayne@68 732 <tbody>
jpayne@68 733 <tr>
jpayne@68 734 <td class="enum_member_name"><p><a name="CAIRO-PDF-METADATA-TITLE:CAPS"></a>CAIRO_PDF_METADATA_TITLE</p></td>
jpayne@68 735 <td class="enum_member_description">
jpayne@68 736 <p>The document title (Since 1.16)</p>
jpayne@68 737 </td>
jpayne@68 738 <td class="enum_member_annotations"> </td>
jpayne@68 739 </tr>
jpayne@68 740 <tr>
jpayne@68 741 <td class="enum_member_name"><p><a name="CAIRO-PDF-METADATA-AUTHOR:CAPS"></a>CAIRO_PDF_METADATA_AUTHOR</p></td>
jpayne@68 742 <td class="enum_member_description">
jpayne@68 743 <p>The document author (Since 1.16)</p>
jpayne@68 744 </td>
jpayne@68 745 <td class="enum_member_annotations"> </td>
jpayne@68 746 </tr>
jpayne@68 747 <tr>
jpayne@68 748 <td class="enum_member_name"><p><a name="CAIRO-PDF-METADATA-SUBJECT:CAPS"></a>CAIRO_PDF_METADATA_SUBJECT</p></td>
jpayne@68 749 <td class="enum_member_description">
jpayne@68 750 <p>The document subject (Since 1.16)</p>
jpayne@68 751 </td>
jpayne@68 752 <td class="enum_member_annotations"> </td>
jpayne@68 753 </tr>
jpayne@68 754 <tr>
jpayne@68 755 <td class="enum_member_name"><p><a name="CAIRO-PDF-METADATA-KEYWORDS:CAPS"></a>CAIRO_PDF_METADATA_KEYWORDS</p></td>
jpayne@68 756 <td class="enum_member_description">
jpayne@68 757 <p>The document keywords (Since 1.16)</p>
jpayne@68 758 </td>
jpayne@68 759 <td class="enum_member_annotations"> </td>
jpayne@68 760 </tr>
jpayne@68 761 <tr>
jpayne@68 762 <td class="enum_member_name"><p><a name="CAIRO-PDF-METADATA-CREATOR:CAPS"></a>CAIRO_PDF_METADATA_CREATOR</p></td>
jpayne@68 763 <td class="enum_member_description">
jpayne@68 764 <p>The document creator (Since 1.16)</p>
jpayne@68 765 </td>
jpayne@68 766 <td class="enum_member_annotations"> </td>
jpayne@68 767 </tr>
jpayne@68 768 <tr>
jpayne@68 769 <td class="enum_member_name"><p><a name="CAIRO-PDF-METADATA-CREATE-DATE:CAPS"></a>CAIRO_PDF_METADATA_CREATE_DATE</p></td>
jpayne@68 770 <td class="enum_member_description">
jpayne@68 771 <p>The document creation date (Since 1.16)</p>
jpayne@68 772 </td>
jpayne@68 773 <td class="enum_member_annotations"> </td>
jpayne@68 774 </tr>
jpayne@68 775 <tr>
jpayne@68 776 <td class="enum_member_name"><p><a name="CAIRO-PDF-METADATA-MOD-DATE:CAPS"></a>CAIRO_PDF_METADATA_MOD_DATE</p></td>
jpayne@68 777 <td class="enum_member_description">
jpayne@68 778 <p>The document modification date (Since 1.16)</p>
jpayne@68 779 </td>
jpayne@68 780 <td class="enum_member_annotations"> </td>
jpayne@68 781 </tr>
jpayne@68 782 </tbody>
jpayne@68 783 </table></div>
jpayne@68 784 </div>
jpayne@68 785 <p class="since">Since: 1.16</p>
jpayne@68 786 </div>
jpayne@68 787 <hr>
jpayne@68 788 <div class="refsect2">
jpayne@68 789 <a name="cairo-pdf-version-t"></a><h3>enum cairo_pdf_version_t</h3>
jpayne@68 790 <p><a class="link" href="cairo-PDF-Surfaces.html#cairo-pdf-version-t" title="enum cairo_pdf_version_t"><span class="type">cairo_pdf_version_t</span></a> is used to describe the version number of the PDF
jpayne@68 791 specification that a generated PDF file will conform to.</p>
jpayne@68 792 <div class="refsect3">
jpayne@68 793 <a name="cairo-pdf-version-t.members"></a><h4>Members</h4>
jpayne@68 794 <div class="informaltable"><table class="informaltable" width="100%" border="0">
jpayne@68 795 <colgroup>
jpayne@68 796 <col width="300px" class="enum_members_name">
jpayne@68 797 <col class="enum_members_description">
jpayne@68 798 <col width="200px" class="enum_members_annotations">
jpayne@68 799 </colgroup>
jpayne@68 800 <tbody>
jpayne@68 801 <tr>
jpayne@68 802 <td class="enum_member_name"><p><a name="CAIRO-PDF-VERSION-1-4:CAPS"></a>CAIRO_PDF_VERSION_1_4</p></td>
jpayne@68 803 <td class="enum_member_description">
jpayne@68 804 <p>The version 1.4 of the PDF specification. (Since 1.10)</p>
jpayne@68 805 </td>
jpayne@68 806 <td class="enum_member_annotations"> </td>
jpayne@68 807 </tr>
jpayne@68 808 <tr>
jpayne@68 809 <td class="enum_member_name"><p><a name="CAIRO-PDF-VERSION-1-5:CAPS"></a>CAIRO_PDF_VERSION_1_5</p></td>
jpayne@68 810 <td class="enum_member_description">
jpayne@68 811 <p>The version 1.5 of the PDF specification. (Since 1.10)</p>
jpayne@68 812 </td>
jpayne@68 813 <td class="enum_member_annotations"> </td>
jpayne@68 814 </tr>
jpayne@68 815 </tbody>
jpayne@68 816 </table></div>
jpayne@68 817 </div>
jpayne@68 818 <p class="since">Since: 1.10</p>
jpayne@68 819 </div>
jpayne@68 820 </div>
jpayne@68 821 <div class="refsect1">
jpayne@68 822 <a name="cairo-PDF-Surfaces.see-also"></a><h2>See Also</h2>
jpayne@68 823 <p><a class="link" href="cairo-cairo-surface-t.html#cairo-surface-t" title="cairo_surface_t"><span class="type">cairo_surface_t</span></a></p>
jpayne@68 824 </div>
jpayne@68 825 </div>
jpayne@68 826 <div class="footer">
jpayne@68 827 <hr>Generated by GTK-Doc V1.27</div>
jpayne@68 828 </body>
jpayne@68 829 </html>