DynaPDF Manual - Page 683
Previous Page 682 Index Next Page 684

Function Reference
Page 683 of 860
Return values:
If the function succeeds the return value is zero. If the function fails the return value is a negative
error code.
ReplaceICCProfileEx
Syntax:
SI32 pdfReplaceICCProfileEx(
const PPDF* IPDF,
// Instance pointer
UI32 ColorSpace,
// Color space handle
const void* Buffer, // File buffer of an ICC profile
UI32 BufSize)
// Buffer size in bytes
The function replaces an ICC profile exactly in the same way as ReplaceICCProfile() but accepts a
file buffer as input.
Return values:
If the function succeeds the return value is zero. If the function fails the return value is a negative
error code.
ReplaceImage
Syntax:
LBOOL pdfReplaceImage(
const PPDF* IPDF,
// Instance pointer
const PIMG* Source,
// Pointer of the image object
const char* Image,
// Path of the new image
UI32 Index,
// The first image is denoted by 1
TExtColorSpace CS,
// Image color space
SI32 CSHandle,
// Color space handle or -1 for device spaces
TReplaceImageFlags Flags) // See below.
typedef enum
{
rifDefault
= 0,
// Nothing special to do.
rifDeleteAltImages = 1,
// Delete all alternate images if any.
rifDeleteMetadata
= 2,
// Delete the meta data that was associated with the image.
rifDeleteOCG
= 4,
// Delete the Optional Content Group if any. This changes the visibility
// state of the image. Normally the OCG should be left as is.
rifDeleteSoftMask
= 8
// An image can contain a soft mask that acts as an alpha channel. This
// mask can be deleted or left as is. The mask will always be deleted if
// the new image contains an alpha channel.
}TReplaceImageFlags;
The function replaces an image with another image.
The parameter Source must be a valid pointer of an image object. This pointer is part of the
TPDFImage structure (member ObjectPtr) which is retrieved by functions like GetImageObj() or
ParseContent().
Previous topic: ReplaceFontEx, ReplaceICCProfile
Next topic: ReplaceImageEx