LayerCOS_Layer
ObjectGeneral

General Cos layer objects.



Define Summary
 Define
 cosDocCreateInfoDict
 CosError
 _CosHFT_IS_BETA
 _CosHFT_LAST_BETA_COMPATIBLE_VERSION
 _CosHFT_LATEST_VERSION
 CosHFT_LATEST_VERSION
 CosHFT_VERSION_2
 CosHFT_VERSION_3
 CosHFT_VERSION_4
 CosHFT_VERSION_4_5
 CosHFT_VERSION_5
 CosHFT_VERSION_5_1
 CosHFT_VERSION_6
 CosHFT_VERSION_7
 CosHFT_VERSION_8
 CosHFT_VERSION_9
 cosSaveBinaryOK
It is ok to store binary data in the file.
 cosSaveConcealObjStreams
If there are any object streams, write them in a way that is hidden from PDF 1.4 (and earlier) viewers. This is used for hybrid files, for example.
 cosSaveCopy
Do NOT use the newly saved file as new store, stay with the current one
 cosSaveFullSave
Write all objects, not just changes.
 cosSaveGarbageCollect
Delete unreferenced objects before save.
 cosSaveWriteXref
Flags for CosDocSave saveFlags parameter. This is specific to the PDF Library.
 include
Typedef Summary
 Typedef
 ASFileOffset
A file offset value for use in callback procedures.
 ASFileOffset64
 CosByte
Used for an array of bytes in CosDocGetID().
 CosByteMax
-1 for none, error, or other special meaning
 CosGeneration
 CosHashCode
0 is not valid.
 CosID
Enumeration Summary
 Enumeration
  AdobePDFVersion
  CosType
Constants that specify a Cos object's type (string, number, dictionary, and so on).
Method Summary
 Method
 
Gets the value of obj as a double-precision floating-point real number.
 
Gets the value of obj as a single-precision floating-point real number.
 
CosObj CosNewDouble(CosDoc dP, ASBool indirect, double value)
Creates a new real-number object from a double-precision floating-point number associated with the specified document.
 
CosObj CosNewDoubleEx(CosDoc dP, ASBool indirect, double value, ASUns8 numSigDigs)
Creates a new real-number object from a double-precision floating-point number associated with the specified document.
 
CosObj CosNewFloat(CosDoc dP, ASBool indirect, float value)
Creates a new real-number object from a single-precision floating-point number associated with the specified document.
 
Tests whether the value of a Cos number is inside the range of ASFixed numbers, [-32768.0, +32768.0).
 
Tests whether the value of a Cos number is inside the range of 32-bit integers, [-2147483648, +2147483647].
 
 
Puts a limit on the amount of memory (RAM) that can be used to store Cos objects per doc. The default, minimum and maximum values of this limit are 30 MB, 512 KB and 40 MB respectively. This method can be used to increase or decrease the amount of memory reserved for Cos objects within this limit. Beyond the limit, Cos objects may be stored on disk.
Defines Detail
_CosHFT_IS_BETA 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define _CosHFT_IS_BETA 0

File: CosCalls.h
Line: 91
_CosHFT_LAST_BETA_COMPATIBLE_VERSION 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define _CosHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000

File: CosCalls.h
Line: 90
_CosHFT_LATEST_VERSION 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define _CosHFT_LATEST_VERSION 0x00090000

File: CosCalls.h
Line: 89
cosDocCreateInfoDict 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define cosDocCreateInfoDict 0x01

File: CosExpT.h
Line: 186
CosError 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosError ErrBuildCode(ErrSuppressable, ErrSysCos, e)

File: AcroErr.h
Line: 295
CosHFT_LATEST_VERSION 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_LATEST_VERSION _CosHFT_LATEST_VERSION)

File: CosCalls.h
Line: 94
CosHFT_VERSION_2 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_VERSION_2 0x00020000

File: CosCalls.h
Line: 96
CosHFT_VERSION_3 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_VERSION_3 0x00020002

File: CosCalls.h
Line: 97
CosHFT_VERSION_4 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_VERSION_4 0x00040000

File: CosCalls.h
Line: 98
CosHFT_VERSION_4_5 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_VERSION_4_5 0x00040005

File: CosCalls.h
Line: 99
CosHFT_VERSION_5 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_VERSION_5 0x00050000

File: CosCalls.h
Line: 100
CosHFT_VERSION_5_1 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_VERSION_5_1 0x00050001

File: CosCalls.h
Line: 101
CosHFT_VERSION_6 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_VERSION_6 0x00060000

File: CosCalls.h
Line: 102
CosHFT_VERSION_7 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_VERSION_7 0x00070000

File: CosCalls.h
Line: 103
CosHFT_VERSION_8 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_VERSION_8 0x00080000

File: CosCalls.h
Line: 104
CosHFT_VERSION_9 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosHFT_VERSION_9 CosHFT_LATEST_VERSION

File: CosCalls.h
Line: 105
cosSaveBinaryOK 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define cosSaveBinaryOK 0x08

Description

It is ok to store binary data in the file.


File: CosExpT.h
Line: 196
cosSaveConcealObjStreams 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define cosSaveConcealObjStreams 0x10

Description

If there are any object streams, write them in a way that is hidden from PDF 1.4 (and earlier) viewers. This is used for hybrid files, for example.


File: CosExpT.h
Line: 201
cosSaveCopy 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define cosSaveCopy 0x04

Description

Do NOT use the newly saved file as new store, stay with the current one


File: CosExpT.h
Line: 194
cosSaveFullSave 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define cosSaveFullSave 0x02

Description

Write all objects, not just changes.


File: CosExpT.h
Line: 192
cosSaveGarbageCollect 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define cosSaveGarbageCollect 0x01

Description

Delete unreferenced objects before save.


File: CosExpT.h
Line: 190
cosSaveWriteXref 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define cosSaveWriteXref 0x20

Description

Flags for CosDocSave saveFlags parameter. This is specific to the PDF Library.


File: PDFLExpT.h
Line: 2401
include 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define include h"

File: CosCalls.h
Line: 123

Typedefs Detail
ASFileOffset 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASInt32 ASFileOffset;

A file offset value for use in callback procedures.

See Also


File: ASExpT.h
Line: 82
ASFileOffset64 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASInt64 ASFileOffset64;

File: ASExpT.h
Line: 83
CosByte 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASUns8 CosByte;

Used for an array of bytes in CosDocGetID().

See Also


File: CosExpT.h
Line: 46
CosByteMax 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASInt32 CosByteMax;

-1 for none, error, or other special meaning


File: CosExpT.h
Line: 41
CosGeneration 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASUns16 CosGeneration;

File: CosExpT.h
Line: 33
CosHashCode 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASUns32 CosHashCode;

0 is not valid.


File: CosExpT.h
Line: 37
CosID 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASUns32 CosID;

File: CosExpT.h
Line: 35

Enumeration Detail
AdobePDFVersion
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AdobePDFVersion {
 kNullPDFVersion = 0x00000000,
 
 kMinPDFVersion = 0x00010000,
 
 kAdobeAcrobat4Version = 0x00010300,
 
 kAdobeAcrobat5Version = 0x00010400,
 
 kAdobeAcrobat6Version = 0x00010500,
 
 kAdobeAcrobat7Version = 0x00010600,
 
 kAdobeAcrobat8Version = 0x00010700,
 
 kAdobeAcrobat9Version = 0x00010703,
 
 kAdobeAcrobat9_1Version = 0x00010705,
 
 kAdobeAcrobat10Version = 0x00010708,
 
 kAdobeAcrobat11Version = 0x0001070B,
 
 kMinSaveVersion = kAdobeAcrobat4Version,
 
 kMinXRefStreamVersion = kAdobeAcrobat6Version,
 
 kDefaultPDFVersion = kAdobeAcrobat7Version,
 
 kLastAdobe1XVersionWithoutExt = 0x00010700,
 
 kLastAdobe1XVersionWithExt = kAdobeAcrobat11Version,
 
 kMinPDFNextVersion = 0x00020000,
 
 kCurrentPDFVersion = 0x00020000
}

File: CosExpT.h
Line: 329

CosType 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

enum CosType {
 CosNull = 0,
 
 CosInteger = 1,
 
 CosFixed = 2,
 
 CosReal = 2,
 
 CosBoolean = 3,
 
 CosName = 4,
 
 CosString = 5,
 
 CosDict = 6,
 
 CosArray = 7,
 
 CosStream = 8
}

See Also

Examples

go to source arrowstatic ASBool CosObjIsValid(CosObj co, CosType ct);
go to source arrowstatic ASBool CosObjIsValid(CosObj obj, CosType objType)

File: CosExpT.h
Line: 50

Elements
CosNull  

A NULL object or an invalid object.

 
CosInteger  

An integer object.

 
CosFixed  

A fixed number object. It is a deprecated type-name for real numbers.

 
CosReal  

A preferred type-name for real numbers.

 
CosBoolean  

An ASBool object.

 
CosName  

A name object.

 
CosString  

A string object.

 
CosDict  

A dictionary object.

 
CosArray  

An array object.

 
CosStream  

A stream object.



Method Detail
CosDoubleValue()
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

double CosDoubleValue(CosObj obj)

Gets the value of obj as a double-precision floating-point real number.

An exception is raised if the given object has the wrong Cos type.

Parameters

obj — 

The object whose value is obtained. It must have type CosInteger or CosReal (CosFixed). The result is undefined if the real value is outside the range of floating-point numbers.

Returns

The numeric value of obj, represented as a floating-point number.

See Also

Since

PI_COS_VERSION >= 0x00090000

File: CosProcs.h
Line: 2377
CosFloatValue() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

float CosFloatValue(CosObj obj)

Gets the value of obj as a single-precision floating-point real number.

An exception is raised if the given object has the wrong Cos type.

Parameters

obj — 

The object whose value is obtained. It must have type CosInteger or CosReal (CosFixed). The result is undefined if the real value is outside the range of floating-point numbers.

Returns

The numeric value of obj, represented as a floating-point number.

See Also

Since

PI_COS_VERSION >= 0x00070000

File: CosProcs.h
Line: 1865
CosNewDouble() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

CosObj CosNewDouble(CosDoc dP, ASBool indirect, double value)

Creates a new real-number object from a double-precision floating-point number associated with the specified document.

Parameters

dP — 

The document in which the number is used.

 
indirect — 

If true, it creates the real-number object as an indirect object, and sets the document dP object's PDDocNeedsSave flag (see PDDocFlags). If false, it creates the number as a direct object.

 
value — 

The real number, represented as a double-precision floating-point number.

Returns

A Cos object of type CosReal (CosFixed).

See Also

Since

PI_COS_VERSION >= 0x00090000

File: CosProcs.h
Line: 2335
CosNewDoubleEx() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

CosObj CosNewDoubleEx(CosDoc dP, ASBool indirect, double value, ASUns8 numSigDigs)

Creates a new real-number object from a double-precision floating-point number associated with the specified document.

Parameters

dP — 

The document in which the number is used.

 
indirect — 

If true, it creates the real-number object as an indirect object, and sets the document dP object's PDDocNeedsSave flag (see PDDocFlags). If false, it creates the number as a direct object.

 
value — 

The real number, represented as a double-precision floating-point number.

 
numSigDigs — 

The maximum number of significant digits to use when this object is written to a file. Legal values are 6-13 for direct objects, 6-16 for indirect objects

Returns

A Cos object of type CosReal (CosFixed).

See Also

Since

PI_COS_VERSION >= 0x00090000

File: CosProcs.h
Line: 2358
CosNewFloat() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

CosObj CosNewFloat(CosDoc dP, ASBool indirect, float value)

Creates a new real-number object from a single-precision floating-point number associated with the specified document.

Parameters

dP — 

The document in which the number is used.

 
indirect — 

If true, it creates the real-number object as an indirect object, and sets the document dP object's PDDocNeedsSave flag (see PDDocFlags). If false, it creates the number as a direct object.

 
value — 

The real number, represented as a single-precision floating-point number.

Returns

A Cos object of type CosReal (CosFixed).

See Also

Since

PI_COS_VERSION >= 0x00070000

File: CosProcs.h
Line: 1848
CosNumberIsWithinASFixedRange() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool CosNumberIsWithinASFixedRange(CosObj obj)

Tests whether the value of a Cos number is inside the range of ASFixed numbers, [-32768.0, +32768.0).

If so, the ASFixed value may be obtained by calling CosFixedValue().

If not, the floating-point value may be obtained by calling CosFloatValue().

It raises an exception if obj is not a number (CosInteger or CosReal).

Parameters

obj — 

A Cos integer or real number.

Returns

true if the value of the number is in the range of ASFixed, false otherwise.

See Also

Since

PI_COS_VERSION >= 0x00070000

File: CosProcs.h
Line: 2208
CosNumberIsWithinASInt32Range() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool CosNumberIsWithinASInt32Range(CosObj obj)

Tests whether the value of a Cos number is inside the range of 32-bit integers, [-2147483648, +2147483647].

If so, the 32-bit value may be obtained by calling CosIntegerValue() .

If not, the 64-bit value may be obtained by calling CosIntegerValue64().

It raises an exception if obj is not a number (CosInteger or CosReal).

Parameters

obj — 

A Cos integer or real number.

Returns

true if the value of the number is in the range of 32-bit integers, false otherwise.

See Also

CosIntegerValue
CosIntegervalue64

Since

PI_COS_VERSION >= 0x00070000

File: CosProcs.h
Line: 2191
CosSetExternalFilePermissionProc() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void CosSetExternalFilePermissionProc(ExternalFilePermissionProc proc)

Parameters

proc


File: PDFLProcs.h
Line: 831
CosSetMaxDocStorage() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void CosSetMaxDocStorage(ASInt32 maxMemory)

Puts a limit on the amount of memory (RAM) that can be used to store Cos objects per doc. The default, minimum and maximum values of this limit are 30 MB, 512 KB and 40 MB respectively. This method can be used to increase or decrease the amount of memory reserved for Cos objects within this limit. Beyond the limit, Cos objects may be stored on disk.

Parameters

maxMemory — 

The maximum amount of RAM (in bytes) that will be used to store fixed-size Cos objects.

Since

PI_COS_VERSION >= 0x00050001

File: CosProcs.h
Line: 1521