1 /**
2  *
3  * License:
4  * $(TABLE
5  *   $(TR $(TD cairoD wrapper/bindings)
6  *     $(TD $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)))
7  *   $(TR $(TD $(LINK2 http://cgit.freedesktop.org/cairo/tree/COPYING, _cairo))
8  *     $(TD $(LINK2 http://cgit.freedesktop.org/cairo/tree/COPYING-LGPL-2.1, LGPL 2.1) /
9  *     $(LINK2 http://cgit.freedesktop.org/cairo/plain/COPYING-MPL-1.1, MPL 1.1)))
10  * )
11  * Authors:
12  * $(TABLE
13  *   $(TR $(TD Johannes Pfau) $(TD cairoD))
14  *   $(TR $(TD $(LINK2 http://cairographics.org, _cairo team)) $(TD _cairo))
15  * )
16  */
17 /*
18  * Distributed under the Boost Software License, Version 1.0.
19  *    (See accompanying file LICENSE_1_0.txt or copy at
20  *          http://www.boost.org/LICENSE_1_0.txt)
21  */
22 module cairo.c.pdf;
23 
24 import cairo.c.cairo;
25 
26 static if(CAIRO_HAS_PDF_SURFACE)
27 {
28     extern(C)
29     {
30         /**
31          * $(D cairo_pdf_version_t) is used to describe the version number of the PDF
32          * specification that a generated PDF file will conform to.
33          *
34          * Since 1.10
35          */
36         enum cairo_pdf_version_t
37         {
38             CAIRO_PDF_VERSION_1_4, ///The version 1.4 of the PDF specification.
39             CAIRO_PDF_VERSION_1_5 ///The version 1.5 of the PDF specification.
40         }
41         ///
42         cairo_surface_t *
43         cairo_pdf_surface_create (const char		*filename,
44                       double		 width_in_points,
45                       double		 height_in_points);
46         ///
47         cairo_surface_t *
48         cairo_pdf_surface_create_for_stream (cairo_write_func_t	write_func,
49                              void	       *closure,
50                              double		width_in_points,
51                              double		height_in_points);
52         ///
53         void
54         cairo_pdf_surface_restrict_to_version (cairo_surface_t 		*surface,
55                                cairo_pdf_version_t  	 ver);
56         ///
57         void
58         cairo_pdf_get_versions (immutable(cairo_pdf_version_t*)* versions,
59                                 int                      	 *num_versions);
60         ///
61         immutable(char)*
62         cairo_pdf_version_to_string (cairo_pdf_version_t ver);
63         ///
64         void
65         cairo_pdf_surface_set_size (cairo_surface_t	*surface,
66                         double		 width_in_points,
67                         double		 height_in_points);
68     }
69 }
70 else
71 {
72     //static assert(false, "CairoD was not compiled with support for the pdf backend");
73 }