1 { CoreGraphics - CGPDFContext.h
2 Copyright (c) 2000-2011 Apple Inc.
3 All rights reserved. }
4 { Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
5 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2009 }
6 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2012 }
7 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, August 2015 }
8 {
9 Modified for use with Free Pascal
10 Version 308
11 Please report any bugs to <gpc@microbizz.nl>
12 }
13
14 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
15 {$mode macpas}
16 {$modeswitch cblocks}
17 {$packenum 1}
18 {$macro on}
19 {$inline on}
20 {$calling mwpascal}
21
22 unit CGPDFContext;
23 interface
24 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
25 {$setc GAP_INTERFACES_VERSION := $0308}
26
27 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
28 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
29 {$endc}
30
31 {$ifc defined CPUPOWERPC and defined CPUI386}
32 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
33 {$endc}
34 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
35 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
36 {$endc}
37
38 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
39 {$setc __ppc__ := 1}
40 {$elsec}
41 {$setc __ppc__ := 0}
42 {$endc}
43 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
44 {$setc __ppc64__ := 1}
45 {$elsec}
46 {$setc __ppc64__ := 0}
47 {$endc}
48 {$ifc not defined __i386__ and defined CPUI386}
49 {$setc __i386__ := 1}
50 {$elsec}
51 {$setc __i386__ := 0}
52 {$endc}
53 {$ifc not defined __x86_64__ and defined CPUX86_64}
54 {$setc __x86_64__ := 1}
55 {$elsec}
56 {$setc __x86_64__ := 0}
57 {$endc}
58 {$ifc not defined __arm__ and defined CPUARM}
59 {$setc __arm__ := 1}
60 {$elsec}
61 {$setc __arm__ := 0}
62 {$endc}
63 {$ifc not defined __arm64__ and defined CPUAARCH64}
64 {$setc __arm64__ := 1}
65 {$elsec}
66 {$setc __arm64__ := 0}
67 {$endc}
68
69 {$ifc defined cpu64}
70 {$setc __LP64__ := 1}
71 {$elsec}
72 {$setc __LP64__ := 0}
73 {$endc}
74
75
76 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
77 {$error Conflicting definitions for __ppc__ and __i386__}
78 {$endc}
79
80 {$ifc defined __ppc__ and __ppc__}
81 {$setc TARGET_CPU_PPC := TRUE}
82 {$setc TARGET_CPU_PPC64 := FALSE}
83 {$setc TARGET_CPU_X86 := FALSE}
84 {$setc TARGET_CPU_X86_64 := FALSE}
85 {$setc TARGET_CPU_ARM := FALSE}
86 {$setc TARGET_CPU_ARM64 := FALSE}
87 {$setc TARGET_OS_MAC := TRUE}
88 {$setc TARGET_OS_IPHONE := FALSE}
89 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
90 {$setc TARGET_OS_EMBEDDED := FALSE}
91 {$elifc defined __ppc64__ and __ppc64__}
92 {$setc TARGET_CPU_PPC := FALSE}
93 {$setc TARGET_CPU_PPC64 := TRUE}
94 {$setc TARGET_CPU_X86 := FALSE}
95 {$setc TARGET_CPU_X86_64 := FALSE}
96 {$setc TARGET_CPU_ARM := FALSE}
97 {$setc TARGET_CPU_ARM64 := FALSE}
98 {$setc TARGET_OS_MAC := TRUE}
99 {$setc TARGET_OS_IPHONE := FALSE}
100 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
101 {$setc TARGET_OS_EMBEDDED := FALSE}
102 {$elifc defined __i386__ and __i386__}
103 {$setc TARGET_CPU_PPC := FALSE}
104 {$setc TARGET_CPU_PPC64 := FALSE}
105 {$setc TARGET_CPU_X86 := TRUE}
106 {$setc TARGET_CPU_X86_64 := FALSE}
107 {$setc TARGET_CPU_ARM := FALSE}
108 {$setc TARGET_CPU_ARM64 := FALSE}
109 {$ifc defined iphonesim}
110 {$setc TARGET_OS_MAC := FALSE}
111 {$setc TARGET_OS_IPHONE := TRUE}
112 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
113 {$elsec}
114 {$setc TARGET_OS_MAC := TRUE}
115 {$setc TARGET_OS_IPHONE := FALSE}
116 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
117 {$endc}
118 {$setc TARGET_OS_EMBEDDED := FALSE}
119 {$elifc defined __x86_64__ and __x86_64__}
120 {$setc TARGET_CPU_PPC := FALSE}
121 {$setc TARGET_CPU_PPC64 := FALSE}
122 {$setc TARGET_CPU_X86 := FALSE}
123 {$setc TARGET_CPU_X86_64 := TRUE}
124 {$setc TARGET_CPU_ARM := FALSE}
125 {$setc TARGET_CPU_ARM64 := FALSE}
126 {$ifc defined iphonesim}
127 {$setc TARGET_OS_MAC := FALSE}
128 {$setc TARGET_OS_IPHONE := TRUE}
129 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
130 {$elsec}
131 {$setc TARGET_OS_MAC := TRUE}
132 {$setc TARGET_OS_IPHONE := FALSE}
133 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
134 {$endc}
135 {$setc TARGET_OS_EMBEDDED := FALSE}
136 {$elifc defined __arm__ and __arm__}
137 {$setc TARGET_CPU_PPC := FALSE}
138 {$setc TARGET_CPU_PPC64 := FALSE}
139 {$setc TARGET_CPU_X86 := FALSE}
140 {$setc TARGET_CPU_X86_64 := FALSE}
141 {$setc TARGET_CPU_ARM := TRUE}
142 {$setc TARGET_CPU_ARM64 := FALSE}
143 {$setc TARGET_OS_MAC := FALSE}
144 {$setc TARGET_OS_IPHONE := TRUE}
145 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
146 {$setc TARGET_OS_EMBEDDED := TRUE}
147 {$elifc defined __arm64__ and __arm64__}
148 {$setc TARGET_CPU_PPC := FALSE}
149 {$setc TARGET_CPU_PPC64 := FALSE}
150 {$setc TARGET_CPU_X86 := FALSE}
151 {$setc TARGET_CPU_X86_64 := FALSE}
152 {$setc TARGET_CPU_ARM := FALSE}
153 {$setc TARGET_CPU_ARM64 := TRUE}
154 {$ifc defined ios}
155 {$setc TARGET_OS_MAC := FALSE}
156 {$setc TARGET_OS_IPHONE := TRUE}
157 {$setc TARGET_OS_EMBEDDED := TRUE}
158 {$elsec}
159 {$setc TARGET_OS_MAC := TRUE}
160 {$setc TARGET_OS_IPHONE := FALSE}
161 {$setc TARGET_OS_EMBEDDED := FALSE}
162 {$endc}
163 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
164 {$elsec}
165 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
166 {$endc}
167
168 {$ifc defined __LP64__ and __LP64__ }
169 {$setc TARGET_CPU_64 := TRUE}
170 {$elsec}
171 {$setc TARGET_CPU_64 := FALSE}
172 {$endc}
173
174 {$ifc defined FPC_BIG_ENDIAN}
175 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
176 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
177 {$elifc defined FPC_LITTLE_ENDIAN}
178 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
179 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
180 {$elsec}
181 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
182 {$endc}
183 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
184 {$setc CALL_NOT_IN_CARBON := FALSE}
185 {$setc OLDROUTINENAMES := FALSE}
186 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
187 {$setc OPAQUE_UPP_TYPES := TRUE}
188 {$setc OTCARBONAPPLICATION := TRUE}
189 {$setc OTKERNEL := FALSE}
190 {$setc PM_USE_SESSION_APIS := TRUE}
191 {$setc TARGET_API_MAC_CARBON := TRUE}
192 {$setc TARGET_API_MAC_OS8 := FALSE}
193 {$setc TARGET_API_MAC_OSX := TRUE}
194 {$setc TARGET_CARBON := TRUE}
195 {$setc TARGET_CPU_68K := FALSE}
196 {$setc TARGET_CPU_MIPS := FALSE}
197 {$setc TARGET_CPU_SPARC := FALSE}
198 {$setc TARGET_OS_UNIX := FALSE}
199 {$setc TARGET_OS_WIN32 := FALSE}
200 {$setc TARGET_RT_MAC_68881 := FALSE}
201 {$setc TARGET_RT_MAC_CFM := FALSE}
202 {$setc TARGET_RT_MAC_MACHO := TRUE}
203 {$setc TYPED_FUNCTION_POINTERS := TRUE}
204 {$setc TYPE_BOOL := FALSE}
205 {$setc TYPE_EXTENDED := FALSE}
206 {$setc TYPE_LONGLONG := TRUE}
207 uses MacTypes,CGGeometry,CFBase,CFData,CFDictionary,CFURL,CGBase,CGContext,CGDataConsumer;
208 {$endc} {not MACOSALLINCLUDE}
209
210 {$ALIGN POWER}
211
212
213 { Create a PDF context, using `consumer' for output. `mediaBox' is the
214 default page media bounding box; if NULL, then a default page size is
215 used. `auxiliaryInfo' specifies additional information used by the PDF
216 context when generating the PDF file. The keys and values in
217 `auxiliaryInfo' are described below. If `mediaBox' is non-NULL, then its
218 value overrides the value of `kCGPDFContextMediaBox' if specified in the
219 `auxiliaryInfo' dictionary. }
220
CGPDFContextCreatenull221 function CGPDFContextCreate( consumer: CGDataConsumerRef; const (*var*) mediaBox: CGRect; auxiliaryInfo: CFDictionaryRef ): CGContextRef; external name '_CGPDFContextCreate';
222 (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0) *)
223
224 { Create a PDF context for writing to `url'. This function behaves in the
225 same manner as the above function, except that the output data will be
226 written to `url'. }
227
CGPDFContextCreateWithURLnull228 function CGPDFContextCreateWithURL( url: CFURLRef; const (*var*) mediaBox: CGRect; auxiliaryInfo: CFDictionaryRef ): CGContextRef; external name '_CGPDFContextCreateWithURL';
229 (* CG_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_2_0) *)
230
231 { Close a PDF context. After closing the context, all pending data is
232 written to the context's destination, and the PDF file is completed. No
233 additional data will be written to the context's destionation after
234 closing. }
235
236 procedure CGPDFContextClose( context: CGContextRef ); external name '_CGPDFContextClose';
237 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
238
239 { Begin a new page in the PDF context `context'. }
240
241 procedure CGPDFContextBeginPage( context: CGContextRef; pageInfo: CFDictionaryRef ); external name '_CGPDFContextBeginPage';
242 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
243
244 { End the current page in the PDF context `context'. }
245
246 procedure CGPDFContextEndPage( context: CGContextRef ); external name '_CGPDFContextEndPage';
247 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
248
249 { Add the metadata stream specified by `metadata' to the document catalog
250 of `context', as described in Table 3.25, "Entries in the catalog
251 dictionary", of the PDF 1.7 specification. The contents of metadata must
252 be XML formatted according to the Extensible Metadata Platform, as
253 described in section 10.2.2, "Metadata Streams", of the PDF 1.7
254 specification. }
255
256 procedure CGPDFContextAddDocumentMetadata( context: CGContextRef; metadata: CFDataRef ); external name '_CGPDFContextAddDocumentMetadata';
257 (* CG_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_0) *)
258
259 { Set the URL associated with `rect' to `url' in the PDF context
260 `context'. }
261
262 procedure CGPDFContextSetURLForRect( context: CGContextRef; url: CFURLRef; rect: CGRect ); external name '_CGPDFContextSetURLForRect';
263 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
264
265 { Create a PDF destination named `name' at `point' in the current page of
266 the PDF context `context'. }
267
268 procedure CGPDFContextAddDestinationAtPoint( context: CGContextRef; name: CFStringRef; point: CGPoint ); external name '_CGPDFContextAddDestinationAtPoint';
269 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
270
271 { Specify a destination named `name' to jump to when clicking in `rect' of
272 the current page of the PDF context `context'. }
273
274 procedure CGPDFContextSetDestinationForRect( context: CGContextRef; name: CFStringRef; rect: CGRect ); external name '_CGPDFContextSetDestinationForRect';
275 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
276
277 {** Keys for the auxiliary info dictionary or the page info dictionary. **}
278
279 { The media box for the document or for a given page. Optional; if present,
280 the value of this key must be a CFData containing a CGRect (stored by
281 value, not by reference). }
282
283 var kCGPDFContextMediaBox: CFStringRef; external name '_kCGPDFContextMediaBox'; (* attribute const *)
284 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
285
286 { The crop box for the document or for a given page. Optional; if present,
287 the value of this key must be a CFData containing a CGRect (stored by
288 value, not by reference). }
289
290 var kCGPDFContextCropBox: CFStringRef; external name '_kCGPDFContextCropBox'; (* attribute const *)
291 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
292
293 { The bleed box for the document or for a given page. Optional; if present,
294 the value of this key must be a CFData containing a CGRect (stored by
295 value, not by reference). }
296
297 var kCGPDFContextBleedBox: CFStringRef; external name '_kCGPDFContextBleedBox'; (* attribute const *)
298 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
299
300 { The trim box for the document or for a given page. Optional; if present,
301 the value of this key must be a CFData containing a CGRect (stored by
302 value, not by reference). }
303
304 var kCGPDFContextTrimBox: CFStringRef; external name '_kCGPDFContextTrimBox'; (* attribute const *)
305 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
306
307 { The art box for the document or for a given page. Optional; if present,
308 the value of this key must be a CFData containing a CGRect (stored by
309 value, not by reference). }
310
311 var kCGPDFContextArtBox: CFStringRef; external name '_kCGPDFContextArtBox'; (* attribute const *)
312 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
313
314 {** Keys for auxiliary info dictionary. **}
315
316 { The document's title. Optional; if present, the value of this key must be
317 a CFString. }
318
319 //const kCGPDFContextTitle: CFStringRef;
320 //CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
321
322 { The name of the person who created this document. Optional; if present,
323 the value of this key must be a CFString. }
324
325 //const kCGPDFContextAuthor: CFStringRef;
326 //CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
327
328 { The subject of a document. Optional; if present, the value of this key
329 must be a CFString. }
330
331 var kCGPDFContextSubject: CFStringRef; external name '_kCGPDFContextSubject'; (* attribute const *)
332 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
333
334 { The keywords for this document. This key is optional. If the value of
335 this key is a CFString, the /Keywords entry will be the specified string.
336 If the value of this key is a CFArray, then it must be an array of
337 CFStrings. The /Keywords entry will in this case be the concatenation of
338 the specified strings separated by commas (","). In addition, an entry
339 with the key "/AAPL:Keywords" will be stored in the document information
340 dictionary; its value is an array consisting of each of the specified
341 strings. The value of this key must be in one of the above forms;
342 otherwise, this key is ignored. }
343
344 var kCGPDFContextKeywords: CFStringRef; external name '_kCGPDFContextKeywords'; (* attribute const *)
345 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
346
347 { The name of the application that created the original data used to create
348 this document. Optional; if present, the value of this key must be a
349 CFString. }
350
351 //const kCGPDFContextCreator: CFStringRef;
352 //CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0);
353
354 { The "owner password" of the PDF document. If this key is specified, the
355 document will be encrypted using the value as the owner password;
356 otherwise, the document will not be encrypted. The value of this key must
357 be a CFStringRef which can be represented in ASCII encoding; only the
358 first 32 bytes will be used for the password. There is no default value
359 for this key.
360
361 If the value of this key cannot be represented in ASCII, the document
362 will not be created and the creation function will return NULL. }
363
364 var kCGPDFContextOwnerPassword: CFStringRef; external name '_kCGPDFContextOwnerPassword'; (* attribute const *)
365 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
366
367 { The "user password" of the PDF document. If the document is encrypted,
368 then the value of this key will be the user password for the document; if
369 unspecified, the user password will be the empty string. The value of
370 this key must be a CFStringRef which can be represented in ASCII
371 encoding; only the first 32 bytes will be used for the password.
372
373 If the value of this key cannot be represented in ASCII, the document
374 will not be created and the creation function will return NULL. }
375
376 var kCGPDFContextUserPassword: CFStringRef; external name '_kCGPDFContextUserPassword'; (* attribute const *)
377 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
378
379 { Specifies the encryption key length in bits; see Table 3.18 "Entries
380 common to all encryption dictionaries", PDF Reference: Adobe PDF version
381 1.5 (4th ed.) for more info. Optional; if present, the value of this key
382 must be a CFNumber with value which is a multiple of 8 between 40 and
383 128, inclusive. If this key is absent or invalid, the encryption key
384 length defaults to 40 bits. }
385
386 var kCGPDFContextEncryptionKeyLength: CFStringRef; external name '_kCGPDFContextEncryptionKeyLength'; (* attribute const *)
387 (* CG_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0) *)
388
389 { Used to specify whether the document allows printing when unlocked with
390 the user password. The value of this key must be a CFBooleanRef. The
391 default value of this key is "kCFBooleanTrue". }
392
393 var kCGPDFContextAllowsPrinting: CFStringRef; external name '_kCGPDFContextAllowsPrinting'; (* attribute const *)
394 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
395
396 { Used to specify whether the document allows copying when unlocked with
397 the user password. The value of this key must be a CFBooleanRef. The
398 default value of this key is "kCFBooleanTrue". }
399
400 var kCGPDFContextAllowsCopying: CFStringRef; external name '_kCGPDFContextAllowsCopying'; (* attribute const *)
401 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_2_0) *)
402
403 {$ifc TARGET_OS_MAC}
404 { The document's PDF/X output intent. Optional; if present, the value of
405 this key must be a CFDictionaryRef. The dictionary is added to the
406 /OutputIntents entry in the PDF file's document catalog. The keys and
407 values contained in the dictionary must match those specified in section
408 9.10.4 of the PDF 1.4 specification, ISO/DIS 15930-3 document published
409 by ISO/TC 130, and Adobe Technical Note #5413. }
410
411 //const kCGPDFContextOutputIntent: CFStringRef;
412 //CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA);
413
414 { The following keys are supported in the output intent dictionary:
415
416 kCGPDFXOutputIntentSubtype ("S"): The output intent subtype. This key is
417 required; the value of this key must be a CFString equal to "GTS_PDFX";
418 otherwise, the dictionary is ignored. }
419
420 var kCGPDFXOutputIntentSubtype: CFStringRef; external name '_kCGPDFXOutputIntentSubtype'; (* attribute const *)
421 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA) *)
422
423 { kCGPDFXOutputConditionIdentifier ("OutputConditionIdentifier"): A string
424 identifying the intended output device or production condition in a
425 human- or machine-readable form. This key is required; the value of this
426 key must be a CFString. For best results, the string should be
427 representable losslessly in ASCII encoding. }
428
429 var kCGPDFXOutputConditionIdentifier: CFStringRef; external name '_kCGPDFXOutputConditionIdentifier'; (* attribute const *)
430 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA) *)
431
432 { kCGPDFXOutputCondition ("OutputCondition"): A text string identifying the
433 intended output device or production condition in a human-readable form.
434 This key is optional; if present, the value of this key must be a
435 CFString. }
436
437 var kCGPDFXOutputCondition: CFStringRef; external name '_kCGPDFXOutputCondition'; (* attribute const *)
438 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA) *)
439
440 { kCGPDFXRegistryName ("RegistryName"): A string identifying the registry
441 in which the condition designated by `kCGPDFXOutputConditionIdentifier'
442 is defined. This key is optional; if present, the value of this key must
443 be a CFString. For best results, the string should be representable
444 losslessly in ASCII encoding. }
445
446 var kCGPDFXRegistryName: CFStringRef; external name '_kCGPDFXRegistryName'; (* attribute const *)
447 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA) *)
448
449 { kCGPDFXInfo ("Info"): A human-readable text string containing additional
450 information about the intended target device or production condition.
451 This key is required if the value of `kCGPDFXOutputConditionIdentifier'
452 does not specify a standard production condition; it is optional
453 otherwise. If present, the value of this key must be a CFString. }
454
455 var kCGPDFXInfo: CFStringRef; external name '_kCGPDFXInfo'; (* attribute const *)
456 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA) *)
457
458 { kCGPDFXDestinationOutputProfile ("DestOutputProfile"): An ICC profile
459 stream defining the transformation from the PDF document's source colors
460 to output device colorants. This key is required if the value of
461 `kCGPDFXOutputConditionIdentifier' does not specify a standard production
462 condition; it is optional otherwise. If present, the value of this key
463 must be a ICC-based CGColorSpaceRef. }
464
465 var kCGPDFXDestinationOutputProfile: CFStringRef; external name '_kCGPDFXDestinationOutputProfile'; (* attribute const *)
466 (* CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA) *)
467
468 {$endc}
469
470 { The document's output intents. Optional; if present, the value must be a
471 CFArrayRef containing one or more CFDictionaryRefs. The array is added to
472 the PDF document in the /OutputIntents entry in the PDF file's document
473 catalog. Each dictionary in the array must be of form specified above for
474 the `kCGPDFContextOutputIntent' key, except that only the first
475 dictionary in the array may contain the `kCGPDFXOutputIntentSubtype'
476 ("S") key with a value of "GTS_PDFX". If both `kCGPDFContextOutputIntent'
477 and `kCGPDFContextOutputIntents' keys are specified, the former is
478 ignored. }
479
480 // const kCGPDFContextOutputIntents: CFStringRef;
481 // CG_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_NA);
482
483
484 { Compatibility with earlier versions of Mac OS X. }
485
486 // #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4
487
488 {
489 PNL comments:
490
491 There is an issue here that these types below are macro defines, and they
492 conflict with the definitions above unless only one or the other is defined.
493
494 This only applies to GPC where GPCMacros.inc contains the macros and
495 is typically read before this Pascal source file.
496 }
497
498 {$ifc USE_CFSTR_CONSTANT_MACROS}
499 {$definec kCGPDFContextTitle CFSTRP('kCGPDFContextTitle')}
500 {$endc}
501 {$ifc USE_CFSTR_CONSTANT_MACROS}
502 {$definec kCGPDFContextAuthor CFSTRP('kCGPDFContextAuthor')}
503 {$endc}
504 {$ifc USE_CFSTR_CONSTANT_MACROS}
505 {$definec kCGPDFContextCreator CFSTRP('kCGPDFContextCreator')}
506 {$endc}
507 {$ifc TARGET_OS_MAC}
508 {$ifc USE_CFSTR_CONSTANT_MACROS}
509 {$definec kCGPDFContextOutputIntent CFSTRP('kCGPDFContextOutputIntent')}
510 {$endc}
511 {$ifc USE_CFSTR_CONSTANT_MACROS}
512 {$definec kCGPDFContextOutputIntents CFSTRP('kCGPDFContextOutputIntents')}
513 {$endc}
514 {$endif}
515
516 // #endif { MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 }
517
518 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
519
520 end.
521 {$endc} {not MACOSALLINCLUDE}
522