![]() |
|
|||
File indexing completed on 2025-09-18 09:08:47
0001 /* cairo - a vector graphics library with display and print output 0002 * 0003 * Copyright © 2002 University of Southern California 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it either under the terms of the GNU Lesser General Public 0007 * License version 2.1 as published by the Free Software Foundation 0008 * (the "LGPL") or, at your option, under the terms of the Mozilla 0009 * Public License Version 1.1 (the "MPL"). If you do not alter this 0010 * notice, a recipient may use your version of this file under either 0011 * the MPL or the LGPL. 0012 * 0013 * You should have received a copy of the LGPL along with this library 0014 * in the file COPYING-LGPL-2.1; if not, write to the Free Software 0015 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA 0016 * You should have received a copy of the MPL along with this library 0017 * in the file COPYING-MPL-1.1 0018 * 0019 * The contents of this file are subject to the Mozilla Public License 0020 * Version 1.1 (the "License"); you may not use this file except in 0021 * compliance with the License. You may obtain a copy of the License at 0022 * http://www.mozilla.org/MPL/ 0023 * 0024 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY 0025 * OF ANY KIND, either express or implied. See the LGPL or the MPL for 0026 * the specific language governing rights and limitations. 0027 * 0028 * The Original Code is the cairo graphics library. 0029 * 0030 * The Initial Developer of the Original Code is University of Southern 0031 * California. 0032 * 0033 * Contributor(s): 0034 * Carl D. Worth <cworth@cworth.org> 0035 */ 0036 0037 #ifndef CAIRO_PDF_H 0038 #define CAIRO_PDF_H 0039 0040 #include "cairo.h" 0041 0042 #if CAIRO_HAS_PDF_SURFACE 0043 0044 CAIRO_BEGIN_DECLS 0045 0046 /** 0047 * cairo_pdf_version_t: 0048 * @CAIRO_PDF_VERSION_1_4: The version 1.4 of the PDF specification. (Since 1.10) 0049 * @CAIRO_PDF_VERSION_1_5: The version 1.5 of the PDF specification. (Since 1.10) 0050 * @CAIRO_PDF_VERSION_1_6: The version 1.6 of the PDF specification. (Since 1.18) 0051 * @CAIRO_PDF_VERSION_1_7: The version 1.7 of the PDF specification. (Since 1.18) 0052 * 0053 * #cairo_pdf_version_t is used to describe the version number of the PDF 0054 * specification that a generated PDF file will conform to. 0055 * 0056 * Since: 1.10 0057 **/ 0058 typedef enum _cairo_pdf_version { 0059 CAIRO_PDF_VERSION_1_4, 0060 CAIRO_PDF_VERSION_1_5, 0061 CAIRO_PDF_VERSION_1_6, 0062 CAIRO_PDF_VERSION_1_7 0063 } cairo_pdf_version_t; 0064 0065 cairo_public cairo_surface_t * 0066 cairo_pdf_surface_create (const char *filename, 0067 double width_in_points, 0068 double height_in_points); 0069 0070 cairo_public cairo_surface_t * 0071 cairo_pdf_surface_create_for_stream (cairo_write_func_t write_func, 0072 void *closure, 0073 double width_in_points, 0074 double height_in_points); 0075 0076 cairo_public void 0077 cairo_pdf_surface_restrict_to_version (cairo_surface_t *surface, 0078 cairo_pdf_version_t version); 0079 0080 cairo_public void 0081 cairo_pdf_get_versions (cairo_pdf_version_t const **versions, 0082 int *num_versions); 0083 0084 cairo_public const char * 0085 cairo_pdf_version_to_string (cairo_pdf_version_t version); 0086 0087 cairo_public void 0088 cairo_pdf_surface_set_size (cairo_surface_t *surface, 0089 double width_in_points, 0090 double height_in_points); 0091 0092 /** 0093 * cairo_pdf_outline_flags_t: 0094 * @CAIRO_PDF_OUTLINE_FLAG_OPEN: The outline item defaults to open in the PDF viewer (Since 1.16) 0095 * @CAIRO_PDF_OUTLINE_FLAG_BOLD: The outline item is displayed by the viewer in bold text (Since 1.16) 0096 * @CAIRO_PDF_OUTLINE_FLAG_ITALIC: The outline item is displayed by the viewer in italic text (Since 1.16) 0097 * 0098 * #cairo_pdf_outline_flags_t is used by the 0099 * cairo_pdf_surface_add_outline() function specify the attributes of 0100 * an outline item. These flags may be bitwise-or'd to produce any 0101 * combination of flags. 0102 * 0103 * Since: 1.16 0104 **/ 0105 typedef enum _cairo_pdf_outline_flags { 0106 CAIRO_PDF_OUTLINE_FLAG_OPEN = 0x1, 0107 CAIRO_PDF_OUTLINE_FLAG_BOLD = 0x2, 0108 CAIRO_PDF_OUTLINE_FLAG_ITALIC = 0x4, 0109 } cairo_pdf_outline_flags_t; 0110 0111 #define CAIRO_PDF_OUTLINE_ROOT 0 0112 0113 cairo_public int 0114 cairo_pdf_surface_add_outline (cairo_surface_t *surface, 0115 int parent_id, 0116 const char *utf8, 0117 const char *link_attribs, 0118 cairo_pdf_outline_flags_t flags); 0119 0120 /** 0121 * cairo_pdf_metadata_t: 0122 * @CAIRO_PDF_METADATA_TITLE: The document title (Since 1.16) 0123 * @CAIRO_PDF_METADATA_AUTHOR: The document author (Since 1.16) 0124 * @CAIRO_PDF_METADATA_SUBJECT: The document subject (Since 1.16) 0125 * @CAIRO_PDF_METADATA_KEYWORDS: The document keywords (Since 1.16) 0126 * @CAIRO_PDF_METADATA_CREATOR: The document creator (Since 1.16) 0127 * @CAIRO_PDF_METADATA_CREATE_DATE: The document creation date (Since 1.16) 0128 * @CAIRO_PDF_METADATA_MOD_DATE: The document modification date (Since 1.16) 0129 * 0130 * #cairo_pdf_metadata_t is used by the 0131 * cairo_pdf_surface_set_metadata() function specify the metadata to set. 0132 * 0133 * Since: 1.16 0134 **/ 0135 typedef enum _cairo_pdf_metadata { 0136 CAIRO_PDF_METADATA_TITLE, 0137 CAIRO_PDF_METADATA_AUTHOR, 0138 CAIRO_PDF_METADATA_SUBJECT, 0139 CAIRO_PDF_METADATA_KEYWORDS, 0140 CAIRO_PDF_METADATA_CREATOR, 0141 CAIRO_PDF_METADATA_CREATE_DATE, 0142 CAIRO_PDF_METADATA_MOD_DATE, 0143 } cairo_pdf_metadata_t; 0144 0145 cairo_public void 0146 cairo_pdf_surface_set_metadata (cairo_surface_t *surface, 0147 cairo_pdf_metadata_t metadata, 0148 const char *utf8); 0149 0150 cairo_public void 0151 cairo_pdf_surface_set_custom_metadata (cairo_surface_t *surface, 0152 const char *name, 0153 const char *value); 0154 0155 cairo_public void 0156 cairo_pdf_surface_set_page_label (cairo_surface_t *surface, 0157 const char *utf8); 0158 0159 cairo_public void 0160 cairo_pdf_surface_set_thumbnail_size (cairo_surface_t *surface, 0161 int width, 0162 int height); 0163 0164 CAIRO_END_DECLS 0165 0166 #else /* CAIRO_HAS_PDF_SURFACE */ 0167 # error Cairo was not compiled with support for the pdf backend 0168 #endif /* CAIRO_HAS_PDF_SURFACE */ 0169 0170 #endif /* CAIRO_PDF_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |