LayerCOS_Layer
ObjectGeneral

General Cos layer objects.



Define Summary
 Define
 CosCallMacro
 cosDocCreateInfoDict
 CosDoubleValue
 CosError
 CosFloatValue
 _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
 CosNewDouble
 CosNewDoubleEx
 CosNewFloat
 CosNumberIsWithinASFixedRange
 CosNumberIsWithinASInt32Range
 COSNUMSELECTORS
 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
 include
 name
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
  CosType
Constants that specify a Cos object's type (string, number, dictionary, and so on).
Variable Summary
 Variable
 cosDoc
 gCosHFT
 gCosVersion
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. The default limit is 2 MB, and this method can be used only to increase the limit. Beyond the limit, Cos objects may be stored on disk.
Defines Detail
_CosHFT_IS_BETA 
Product availability: All
Platform availability: All

Syntax

#define _CosHFT_IS_BETA 0

File: CosCalls.h
Line: 91
_CosHFT_LAST_BETA_COMPATIBLE_VERSION 
Product availability: All
Platform availability: All

Syntax

#define _CosHFT_LAST_BETA_COMPATIBLE_VERSION 0x00090000

File: CosCalls.h
Line: 90
_CosHFT_LATEST_VERSION 
Product availability: All
Platform availability: All

Syntax

#define _CosHFT_LATEST_VERSION 0x00090000

File: CosCalls.h
Line: 89
CosCallMacro 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosCallMacro (ACROASSERT(gCosVersion >=CosHFT_VERSION_##version), *((fname##SELPROTO)(gCosHFT[fname##SEL])))

File: CosCalls.h
Line: 419
cosDocCreateInfoDict 
Product availability: All
Platform availability: All

Syntax

#define cosDocCreateInfoDict 0x01

File: CosExpT.h
Line: 186
CosDoubleValue 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosDoubleValue CosCallMacro(CosDoubleValue, 9)

File: CosCalls.h
Line: 473
CosError 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosError ErrBuildCode(ErrSuppressable, ErrSysCos, e)

File: AcroErr.h
Line: 295
CosFloatValue 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosFloatValue CosCallMacro(CosFloatValue, 7)

File: CosCalls.h
Line: 427
CosHFT_LATEST_VERSION 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_LATEST_VERSION _CosHFT_LATEST_VERSION)

File: CosCalls.h
Line: 94
CosHFT_VERSION_2 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_VERSION_2 0x00020000

File: CosCalls.h
Line: 96
CosHFT_VERSION_3 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_VERSION_3 0x00020002

File: CosCalls.h
Line: 97
CosHFT_VERSION_4 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_VERSION_4 0x00040000

File: CosCalls.h
Line: 98
CosHFT_VERSION_4_5 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_VERSION_4_5 0x00040005

File: CosCalls.h
Line: 99
CosHFT_VERSION_5 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_VERSION_5 0x00050000

File: CosCalls.h
Line: 100
CosHFT_VERSION_5_1 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_VERSION_5_1 0x00050001

File: CosCalls.h
Line: 101
CosHFT_VERSION_6 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_VERSION_6 0x00060000

File: CosCalls.h
Line: 102
CosHFT_VERSION_7 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_VERSION_7 0x00070000

File: CosCalls.h
Line: 103
CosHFT_VERSION_8 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_VERSION_8 0x00080000

File: CosCalls.h
Line: 104
CosHFT_VERSION_9 
Product availability: All
Platform availability: All

Syntax

#define CosHFT_VERSION_9 CosHFT_LATEST_VERSION

File: CosCalls.h
Line: 105
CosNewDouble 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosNewDouble CosCallMacro(CosNewDouble, 9)

File: CosCalls.h
Line: 471
CosNewDoubleEx 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosNewDoubleEx CosCallMacro(CosNewDoubleEx, 9)

File: CosCalls.h
Line: 472
CosNewFloat 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosNewFloat CosCallMacro(CosNewFloat, 7)

File: CosCalls.h
Line: 426
CosNumberIsWithinASFixedRange 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosNumberIsWithinASFixedRange CosCallMacro(CosNumberIsWithinASFixedRange, 7)

File: CosCalls.h
Line: 461
CosNumberIsWithinASInt32Range 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define CosNumberIsWithinASInt32Range CosCallMacro(CosNumberIsWithinASInt32Range, 7)

File: CosCalls.h
Line: 460
COSNUMSELECTORS 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define COSNUMSELECTORS (COSNUMSELECTORSplusOne - 1)

File: CosCalls.h
Line: 145
cosSaveBinaryOK 
Product availability: All
Platform availability: All

Syntax

#define cosSaveBinaryOK 0x08

Description

It is ok to store binary data in the file.


File: CosExpT.h
Line: 196
cosSaveConcealObjStreams 
Product availability: All
Platform availability: All

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: All
Platform availability: All

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: All
Platform availability: All

Syntax

#define cosSaveFullSave 0x02

Description

Write all objects, not just changes.


File: CosExpT.h
Line: 192
cosSaveGarbageCollect 
Product availability: All
Platform availability: All

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: 2371
include 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define include h"

File: CosCalls.h
Line: 153
include 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

#define include h"

File: CosCalls.h
Line: 123
name 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define name ##SEL,

File: CosCalls.h
Line: 138

Typedefs Detail
ASFileOffset 
Product availability: All
Platform availability: All

Syntax

typedef ASInt32 ASFileOffset;

A file offset value for use in callback procedures.

See Also


File: ASExpT.h
Line: 82
ASFileOffset64 
Product availability: All
Platform availability: All

Syntax

typedef ASInt64 ASFileOffset64;

File: ASExpT.h
Line: 83
CosByte 
Product availability: All
Platform availability: All

Syntax

typedef ASUns8 CosByte;

Used for an array of bytes in CosDocGetID().

See Also


File: CosExpT.h
Line: 46
CosByteMax 
Product availability: All
Platform availability: All

Syntax

typedef ASInt32 CosByteMax;

-1 for none, error, or other special meaning


File: CosExpT.h
Line: 41
CosGeneration 
Product availability: All
Platform availability: All

Syntax

typedef ASUns16 CosGeneration;

File: CosExpT.h
Line: 33
CosHashCode 
Product availability: All
Platform availability: All

Syntax

typedef ASUns32 CosHashCode;

0 is not valid.


File: CosExpT.h
Line: 37
CosID 
Product availability: All
Platform availability: All

Syntax

typedef ASUns32 CosID;

File: CosExpT.h
Line: 35

Enumeration Detail
CosType
Product availability: All
Platform availability: All

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


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.

Variables Detail
cosDoc 
Product availability: Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

INPDEContentAttrsPINASUns32INCosDoc cosDoc;

File: PEWProcs.h
Line: 105
gCosHFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

HFT gCosHFT;

File: CosCalls.h
Line: 165
gCosVersion 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 gCosVersion;

File: CosCalls.h
Line: 166


Method Detail
CosDoubleValue()
Product availability: All
Platform availability: All

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: 2378
CosFloatValue() 
Product availability: All
Platform availability: All

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: 1866
CosNewDouble() 
Product availability: All
Platform availability: All

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: 2336
CosNewDoubleEx() 
Product availability: All
Platform availability: All

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: 2359
CosNewFloat() 
Product availability: All
Platform availability: All

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: 1849
CosNumberIsWithinASFixedRange() 
Product availability: All
Platform availability: All

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: 2209
CosNumberIsWithinASInt32Range() 
Product availability: All
Platform availability: All

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: 2192
CosSetExternalFilePermissionProc() 
Product availability: PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void CosSetExternalFilePermissionProc(ExternalFilePermissionProc proc)

Parameters

proc


File: PDFLProcs.h
Line: 804
CosSetMaxDocStorage() 
Product availability: All
Platform availability: All

Syntax

void CosSetMaxDocStorage(ASInt32 maxMemory)

Puts a limit on the amount of memory (RAM) that can be used to store Cos objects. The default limit is 2 MB, and this method can be used only to increase the 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: 1522