Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
cairo-pdf.h
Go to the documentation of this file.
1/* cairo - a vector graphics library with display and print output
2 *
3 * Copyright © 2002 University of Southern California
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it either under the terms of the GNU Lesser General Public
7 * License version 2.1 as published by the Free Software Foundation
8 * (the "LGPL") or, at your option, under the terms of the Mozilla
9 * Public License Version 1.1 (the "MPL"). If you do not alter this
10 * notice, a recipient may use your version of this file under either
11 * the MPL or the LGPL.
12 *
13 * You should have received a copy of the LGPL along with this library
14 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
16 * You should have received a copy of the MPL along with this library
17 * in the file COPYING-MPL-1.1
18 *
19 * The contents of this file are subject to the Mozilla Public License
20 * Version 1.1 (the "License"); you may not use this file except in
21 * compliance with the License. You may obtain a copy of the License at
22 * http://www.mozilla.org/MPL/
23 *
24 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
25 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
26 * the specific language governing rights and limitations.
27 *
28 * The Original Code is the cairo graphics library.
29 *
30 * The Initial Developer of the Original Code is University of Southern
31 * California.
32 *
33 * Contributor(s):
34 * Carl D. Worth <cworth@cworth.org>
35 */
36
37#ifndef CAIRO_PDF_H
38#define CAIRO_PDF_H
39
40#include "cairo.h"
41
42#if CAIRO_HAS_PDF_SURFACE
43
45
46/**
47 * cairo_pdf_version_t:
48 * @CAIRO_PDF_VERSION_1_4: The version 1.4 of the PDF specification. (Since 1.10)
49 * @CAIRO_PDF_VERSION_1_5: The version 1.5 of the PDF specification. (Since 1.10)
50 * @CAIRO_PDF_VERSION_1_6: The version 1.6 of the PDF specification. (Since 1.18)
51 * @CAIRO_PDF_VERSION_1_7: The version 1.7 of the PDF specification. (Since 1.18)
52 *
53 * #cairo_pdf_version_t is used to describe the version number of the PDF
54 * specification that a generated PDF file will conform to.
55 *
56 * Since: 1.10
57 **/
64
66cairo_pdf_surface_create (const char *filename,
67 double width_in_points,
68 double height_in_points);
69
72 void *closure,
73 double width_in_points,
74 double height_in_points);
75
76cairo_public void
78 cairo_pdf_version_t version);
79
80cairo_public void
82 int *num_versions);
83
84cairo_public const char *
86
87cairo_public void
89 double width_in_points,
90 double height_in_points);
91
92/**
93 * cairo_pdf_outline_flags_t:
94 * @CAIRO_PDF_OUTLINE_FLAG_OPEN: The outline item defaults to open in the PDF viewer (Since 1.16)
95 * @CAIRO_PDF_OUTLINE_FLAG_BOLD: The outline item is displayed by the viewer in bold text (Since 1.16)
96 * @CAIRO_PDF_OUTLINE_FLAG_ITALIC: The outline item is displayed by the viewer in italic text (Since 1.16)
97 *
98 * #cairo_pdf_outline_flags_t is used by the
99 * cairo_pdf_surface_add_outline() function specify the attributes of
100 * an outline item. These flags may be bitwise-or'd to produce any
101 * combination of flags.
102 *
103 * Since: 1.16
104 **/
110
111#define CAIRO_PDF_OUTLINE_ROOT 0
112
113cairo_public int
115 int parent_id,
116 const char *utf8,
117 const char *link_attribs,
119
120/**
121 * cairo_pdf_metadata_t:
122 * @CAIRO_PDF_METADATA_TITLE: The document title (Since 1.16)
123 * @CAIRO_PDF_METADATA_AUTHOR: The document author (Since 1.16)
124 * @CAIRO_PDF_METADATA_SUBJECT: The document subject (Since 1.16)
125 * @CAIRO_PDF_METADATA_KEYWORDS: The document keywords (Since 1.16)
126 * @CAIRO_PDF_METADATA_CREATOR: The document creator (Since 1.16)
127 * @CAIRO_PDF_METADATA_CREATE_DATE: The document creation date (Since 1.16)
128 * @CAIRO_PDF_METADATA_MOD_DATE: The document modification date (Since 1.16)
129 *
130 * #cairo_pdf_metadata_t is used by the
131 * cairo_pdf_surface_set_metadata() function specify the metadata to set.
132 *
133 * Since: 1.16
134 **/
144
145cairo_public void
147 cairo_pdf_metadata_t metadata,
148 const char *utf8);
149
150cairo_public void
152 const char *name,
153 const char *value);
154
155cairo_public void
157 const char *utf8);
158
159cairo_public void
161 int width,
162 int height);
163
165
166#else /* CAIRO_HAS_PDF_SURFACE */
167# error Cairo was not compiled with support for the pdf backend
168#endif /* CAIRO_HAS_PDF_SURFACE */
169
170#endif /* CAIRO_PDF_H */
enum _cairo_pdf_outline_flags cairo_pdf_outline_flags_t
cairo_public void cairo_pdf_surface_set_page_label(cairo_surface_t *surface, const char *utf8)
_cairo_pdf_version
Definition cairo-pdf.h:58
@ CAIRO_PDF_VERSION_1_7
Definition cairo-pdf.h:62
@ CAIRO_PDF_VERSION_1_5
Definition cairo-pdf.h:60
@ CAIRO_PDF_VERSION_1_4
Definition cairo-pdf.h:59
@ CAIRO_PDF_VERSION_1_6
Definition cairo-pdf.h:61
cairo_public void cairo_pdf_surface_set_thumbnail_size(cairo_surface_t *surface, int width, int height)
cairo_public void cairo_pdf_get_versions(cairo_pdf_version_t const **versions, int *num_versions)
enum _cairo_pdf_metadata cairo_pdf_metadata_t
_cairo_pdf_outline_flags
Definition cairo-pdf.h:105
@ CAIRO_PDF_OUTLINE_FLAG_ITALIC
Definition cairo-pdf.h:108
@ CAIRO_PDF_OUTLINE_FLAG_BOLD
Definition cairo-pdf.h:107
@ CAIRO_PDF_OUTLINE_FLAG_OPEN
Definition cairo-pdf.h:106
cairo_public cairo_surface_t * cairo_pdf_surface_create_for_stream(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points)
cairo_public int cairo_pdf_surface_add_outline(cairo_surface_t *surface, int parent_id, const char *utf8, const char *link_attribs, cairo_pdf_outline_flags_t flags)
cairo_public void cairo_pdf_surface_set_custom_metadata(cairo_surface_t *surface, const char *name, const char *value)
cairo_public cairo_surface_t * cairo_pdf_surface_create(const char *filename, double width_in_points, double height_in_points)
_cairo_pdf_metadata
Definition cairo-pdf.h:135
@ CAIRO_PDF_METADATA_SUBJECT
Definition cairo-pdf.h:138
@ CAIRO_PDF_METADATA_CREATOR
Definition cairo-pdf.h:140
@ CAIRO_PDF_METADATA_AUTHOR
Definition cairo-pdf.h:137
@ CAIRO_PDF_METADATA_KEYWORDS
Definition cairo-pdf.h:139
@ CAIRO_PDF_METADATA_TITLE
Definition cairo-pdf.h:136
@ CAIRO_PDF_METADATA_CREATE_DATE
Definition cairo-pdf.h:141
@ CAIRO_PDF_METADATA_MOD_DATE
Definition cairo-pdf.h:142
CAIRO_BEGIN_DECLS enum _cairo_pdf_version cairo_pdf_version_t
cairo_public void cairo_pdf_surface_set_metadata(cairo_surface_t *surface, cairo_pdf_metadata_t metadata, const char *utf8)
cairo_public const char * cairo_pdf_version_to_string(cairo_pdf_version_t version)
cairo_public void cairo_pdf_surface_restrict_to_version(cairo_surface_t *surface, cairo_pdf_version_t version)
cairo_public void cairo_pdf_surface_set_size(cairo_surface_t *surface, double width_in_points, double height_in_points)
#define CAIRO_BEGIN_DECLS
Definition cairo.h:49
struct _cairo_surface cairo_surface_t
Definition cairo.h:164
#define CAIRO_END_DECLS
Definition cairo.h:50
#define cairo_public
Definition cairo.h:70
cairo_status_t(* cairo_write_func_t)(void *closure, const unsigned char *data, unsigned int length)
Definition cairo.h:494
const char * name
Definition lsqlite3.c:2154
int value
Definition lsqlite3.c:2155