Pdftools SDK
Loading...
Searching...
No Matches
Macros | Functions
PdfTools_PdfToolsOptimizationProfiles.h File Reference
#include "PdfTools_Types.h"
#include "PdfTools_PdfToolsSys.h"

Go to the source code of this file.

Macros

#define PDFTOOLS_CALL
 

Functions

PDFTOOLS_EXPORT TPdfToolsOptimization_ImageRecompressionOptions *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_GetImageRecompressionOptions (TPdfToolsOptimizationProfiles_Profile *pProfile)
 The image recompression options.
 
PDFTOOLS_EXPORT TPdfToolsOptimization_FontOptions *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_GetFontOptions (TPdfToolsOptimizationProfiles_Profile *pProfile)
 The font optimization options.
 
PDFTOOLS_EXPORT TPdfToolsOptimization_RemovalOptions *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_GetRemovalOptions (TPdfToolsOptimizationProfiles_Profile *pProfile)
 The parameters defining the optional data to remove or flatten.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_GetCopyMetadata (TPdfToolsOptimizationProfiles_Profile *pProfile)
 Whether to copy metadata Copy document information dictionary and XMP metadata. Default: TRUE.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_SetCopyMetadata (TPdfToolsOptimizationProfiles_Profile *pProfile, BOOL bCopyMetadata)
 Whether to copy metadata Copy document information dictionary and XMP metadata. Default: TRUE.
 
PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_ProfileType PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_GetType (TPdfToolsOptimizationProfiles_Profile *pProfile)
 Get actual derived type of base type TPdfToolsOptimizationProfiles_Profile.
 
PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_Web *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Web_New (void)
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Web_GetResolutionDPI (TPdfToolsOptimizationProfiles_Web *pWeb, double *pResolutionDPI)
 The target resolution of images in DPI.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Web_SetResolutionDPI (TPdfToolsOptimizationProfiles_Web *pWeb, const double *pResolutionDPI)
 The target resolution of images in DPI.
 
PDFTOOLS_EXPORT double PDFTOOLS_CALL PdfToolsOptimizationProfiles_Web_GetThresholdDPI (TPdfToolsOptimizationProfiles_Web *pWeb)
 The threshold resolution of images in DPI.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Web_SetThresholdDPI (TPdfToolsOptimizationProfiles_Web *pWeb, double dThresholdDPI)
 The threshold resolution of images in DPI.
 
PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_Print *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Print_New (void)
 
PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_Archive *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Archive_New (void)
 
PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_MinimalFileSize *PDFTOOLS_CALL PdfToolsOptimizationProfiles_MinimalFileSize_New (void)
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_MinimalFileSize_GetResolutionDPI (TPdfToolsOptimizationProfiles_MinimalFileSize *pMinimalFileSize, double *pResolutionDPI)
 The target resolution of images in DPI.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_MinimalFileSize_SetResolutionDPI (TPdfToolsOptimizationProfiles_MinimalFileSize *pMinimalFileSize, const double *pResolutionDPI)
 The target resolution of images in DPI.
 
PDFTOOLS_EXPORT double PDFTOOLS_CALL PdfToolsOptimizationProfiles_MinimalFileSize_GetThresholdDPI (TPdfToolsOptimizationProfiles_MinimalFileSize *pMinimalFileSize)
 The threshold resolution of images in DPI.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_MinimalFileSize_SetThresholdDPI (TPdfToolsOptimizationProfiles_MinimalFileSize *pMinimalFileSize, double dThresholdDPI)
 The threshold resolution of images in DPI.
 
PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_Mrc *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_New (void)
 
PDFTOOLS_EXPORT double PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_GetLayerCompressionQuality (TPdfToolsOptimizationProfiles_Mrc *pMrc)
 The image quality for MRC foreground and background layers.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_SetLayerCompressionQuality (TPdfToolsOptimizationProfiles_Mrc *pMrc, double dLayerCompressionQuality)
 The image quality for MRC foreground and background layers.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_GetLayerResolutionDPI (TPdfToolsOptimizationProfiles_Mrc *pMrc, double *pLayerResolutionDPI)
 The target resolution in DPI (dots per inch) for downsampling MRC foreground and background layers.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_SetLayerResolutionDPI (TPdfToolsOptimizationProfiles_Mrc *pMrc, const double *pLayerResolutionDPI)
 The target resolution in DPI (dots per inch) for downsampling MRC foreground and background layers.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_GetRecognizePictures (TPdfToolsOptimizationProfiles_Mrc *pMrc)
 The option to recognize photographic regions when doing MRC.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_SetRecognizePictures (TPdfToolsOptimizationProfiles_Mrc *pMrc, BOOL bRecognizePictures)
 The option to recognize photographic regions when doing MRC.
 

Macro Definition Documentation

◆ PDFTOOLS_CALL

#define PDFTOOLS_CALL

Function Documentation

◆ PdfToolsOptimizationProfiles_Archive_New()

PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_Archive *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Archive_New ( void )
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_MinimalFileSize_GetResolutionDPI()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_MinimalFileSize_GetResolutionDPI ( TPdfToolsOptimizationProfiles_MinimalFileSize * pMinimalFileSize,
double * pResolutionDPI )

The target resolution of images in DPI.

The target resolution in DPI (dots per inch) for color and grayscale images.

Images with a resolution above PdfToolsOptimizationProfiles_MinimalFileSize_GetThresholdDPI are down-sampled.

Valid values are in the range 1.0 to 10000.

If NULL, then resolution setting is disabled.

Default: 130.

Parameters
[in,out]pMinimalFileSizeActs as a handle to the native object of type TPdfToolsOptimizationProfiles_MinimalFileSize.
[out]pResolutionDPIRetrieved value.
Returns
FALSE if either an error occurred or the [out] argument returns NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when FALSE was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_MinimalFileSize_GetThresholdDPI()

PDFTOOLS_EXPORT double PDFTOOLS_CALL PdfToolsOptimizationProfiles_MinimalFileSize_GetThresholdDPI ( TPdfToolsOptimizationProfiles_MinimalFileSize * pMinimalFileSize)

The threshold resolution of images in DPI.

The threshold resolution in DPI (dots per inch) to selectively activate downsampling for color and grayscale images.

Valid values are in the range 1.0 to 10000. To deactivate down-sampling of images set PdfToolsOptimizationProfiles_MinimalFileSize_GetResolutionDPI to NULL.

Default: 1.4 times PdfToolsOptimizationProfiles_MinimalFileSize_GetResolutionDPI.

Parameters
[in,out]pMinimalFileSizeActs as a handle to the native object of type TPdfToolsOptimizationProfiles_MinimalFileSize.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_MinimalFileSize_New()

PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_MinimalFileSize *PDFTOOLS_CALL PdfToolsOptimizationProfiles_MinimalFileSize_New ( void )
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_MinimalFileSize_SetResolutionDPI()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_MinimalFileSize_SetResolutionDPI ( TPdfToolsOptimizationProfiles_MinimalFileSize * pMinimalFileSize,
const double * pResolutionDPI )

The target resolution of images in DPI.

The target resolution in DPI (dots per inch) for color and grayscale images.

Images with a resolution above PdfToolsOptimizationProfiles_MinimalFileSize_GetThresholdDPI are down-sampled.

Valid values are in the range 1.0 to 10000.

If NULL, then resolution setting is disabled.

Default: 130.

Parameters
[in,out]pMinimalFileSizeActs as a handle to the native object of type TPdfToolsOptimizationProfiles_MinimalFileSize.
[in]pResolutionDPISet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_MinimalFileSize_SetThresholdDPI()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_MinimalFileSize_SetThresholdDPI ( TPdfToolsOptimizationProfiles_MinimalFileSize * pMinimalFileSize,
double dThresholdDPI )

The threshold resolution of images in DPI.

The threshold resolution in DPI (dots per inch) to selectively activate downsampling for color and grayscale images.

Valid values are in the range 1.0 to 10000. To deactivate down-sampling of images set PdfToolsOptimizationProfiles_MinimalFileSize_GetResolutionDPI to NULL.

Default: 1.4 times PdfToolsOptimizationProfiles_MinimalFileSize_GetResolutionDPI.

Parameters
[in,out]pMinimalFileSizeActs as a handle to the native object of type TPdfToolsOptimizationProfiles_MinimalFileSize.
[in]dThresholdDPISet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_Mrc_GetLayerCompressionQuality()

PDFTOOLS_EXPORT double PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_GetLayerCompressionQuality ( TPdfToolsOptimizationProfiles_Mrc * pMrc)

The image quality for MRC foreground and background layers.

This is a value between 0 (lowest quality) and 1 (highest quality).

Default:

Parameters
[in,out]pMrcActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Mrc.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_Mrc_GetLayerResolutionDPI()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_GetLayerResolutionDPI ( TPdfToolsOptimizationProfiles_Mrc * pMrc,
double * pLayerResolutionDPI )

The target resolution in DPI (dots per inch) for downsampling MRC foreground and background layers.

Valid values are 1, or 10000, or in between. Set to NULL to deactivate downsampling of images.

Default: 70.

Parameters
[in,out]pMrcActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Mrc.
[out]pLayerResolutionDPIRetrieved value.
Returns
FALSE if either an error occurred or the [out] argument returns NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when FALSE was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_Mrc_GetRecognizePictures()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_GetRecognizePictures ( TPdfToolsOptimizationProfiles_Mrc * pMrc)

The option to recognize photographic regions when doing MRC.

Regardless of this property’s setting, monochrome (grayscale) images are always treated as entire photographic regions (cut­out pictures) by the MRC algorithm.

Default: FALSE.

Parameters
[in,out]pMrcActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Mrc.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Mrc_New()

PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_Mrc *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_New ( void )
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Mrc_SetLayerCompressionQuality()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_SetLayerCompressionQuality ( TPdfToolsOptimizationProfiles_Mrc * pMrc,
double dLayerCompressionQuality )

The image quality for MRC foreground and background layers.

This is a value between 0 (lowest quality) and 1 (highest quality).

Default:

Parameters
[in,out]pMrcActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Mrc.
[in]dLayerCompressionQualitySet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_Mrc_SetLayerResolutionDPI()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_SetLayerResolutionDPI ( TPdfToolsOptimizationProfiles_Mrc * pMrc,
const double * pLayerResolutionDPI )

The target resolution in DPI (dots per inch) for downsampling MRC foreground and background layers.

Valid values are 1, or 10000, or in between. Set to NULL to deactivate downsampling of images.

Default: 70.

Parameters
[in,out]pMrcActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Mrc.
[in]pLayerResolutionDPISet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_Mrc_SetRecognizePictures()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Mrc_SetRecognizePictures ( TPdfToolsOptimizationProfiles_Mrc * pMrc,
BOOL bRecognizePictures )

The option to recognize photographic regions when doing MRC.

Regardless of this property’s setting, monochrome (grayscale) images are always treated as entire photographic regions (cut­out pictures) by the MRC algorithm.

Default: FALSE.

Parameters
[in,out]pMrcActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Mrc.
[in]bRecognizePicturesSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Print_New()

PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_Print *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Print_New ( void )
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Profile_GetCopyMetadata()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_GetCopyMetadata ( TPdfToolsOptimizationProfiles_Profile * pProfile)

Whether to copy metadata Copy document information dictionary and XMP metadata. Default: TRUE.

Parameters
[in,out]pProfileActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Profile.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when FALSE was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Profile_GetFontOptions()

PDFTOOLS_EXPORT TPdfToolsOptimization_FontOptions *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_GetFontOptions ( TPdfToolsOptimizationProfiles_Profile * pProfile)

The font optimization options.

Parameters
[in,out]pProfileActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Profile.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Profile_GetImageRecompressionOptions()

PDFTOOLS_EXPORT TPdfToolsOptimization_ImageRecompressionOptions *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_GetImageRecompressionOptions ( TPdfToolsOptimizationProfiles_Profile * pProfile)

The image recompression options.

Parameters
[in,out]pProfileActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Profile.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Profile_GetRemovalOptions()

PDFTOOLS_EXPORT TPdfToolsOptimization_RemovalOptions *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_GetRemovalOptions ( TPdfToolsOptimizationProfiles_Profile * pProfile)

The parameters defining the optional data to remove or flatten.

Parameters
[in,out]pProfileActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Profile.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Profile_GetType()

Get actual derived type of base type TPdfToolsOptimizationProfiles_Profile.

This function is invoked prior to downcasting to ascertain the derived object type.

Parameters
[in,out]pProfileActs as a handle to a native object.
Returns
The item of the enumeration TPdfToolsOptimizationProfiles_ProfileType that refers to the actual derived type. 0 in case of an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Profile_SetCopyMetadata()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Profile_SetCopyMetadata ( TPdfToolsOptimizationProfiles_Profile * pProfile,
BOOL bCopyMetadata )

Whether to copy metadata Copy document information dictionary and XMP metadata. Default: TRUE.

Parameters
[in,out]pProfileActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Profile.
[in]bCopyMetadataSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Web_GetResolutionDPI()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Web_GetResolutionDPI ( TPdfToolsOptimizationProfiles_Web * pWeb,
double * pResolutionDPI )

The target resolution of images in DPI.

The target resolution in DPI (dots per inch) for color and grayscale images.

Images with a resolution above PdfToolsOptimizationProfiles_Web_GetThresholdDPI are down-sampled.

Valid values are in the range 1.0 to 10000.

Set to NULL to deactivate down-sampling of images.

Default: 150.

Parameters
[in,out]pWebActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Web.
[out]pResolutionDPIRetrieved value.
Returns
FALSE if either an error occurred or the [out] argument returns NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when FALSE was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_Web_GetThresholdDPI()

PDFTOOLS_EXPORT double PDFTOOLS_CALL PdfToolsOptimizationProfiles_Web_GetThresholdDPI ( TPdfToolsOptimizationProfiles_Web * pWeb)

The threshold resolution of images in DPI.

The threshold resolution in DPI (dots per inch) to selectively activate downsampling for color and grayscale images.

Valid values are in the range 1.0 to 10000. To deactivate down-sampling of images set PdfToolsOptimizationProfiles_Web_GetResolutionDPI to NULL.

Default: 1.4 times PdfToolsOptimizationProfiles_Web_GetResolutionDPI.

Parameters
[in,out]pWebActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Web.
Returns
Retrieved value.

May indicate an error in certain scenarios. For further information see the note section below.

Note
An error occurred when 0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_Web_New()

PDFTOOLS_EXPORT TPdfToolsOptimizationProfiles_Web *PDFTOOLS_CALL PdfToolsOptimizationProfiles_Web_New ( void )
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage.

◆ PdfToolsOptimizationProfiles_Web_SetResolutionDPI()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Web_SetResolutionDPI ( TPdfToolsOptimizationProfiles_Web * pWeb,
const double * pResolutionDPI )

The target resolution of images in DPI.

The target resolution in DPI (dots per inch) for color and grayscale images.

Images with a resolution above PdfToolsOptimizationProfiles_Web_GetThresholdDPI are down-sampled.

Valid values are in the range 1.0 to 10000.

Set to NULL to deactivate down-sampling of images.

Default: 150.

Parameters
[in,out]pWebActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Web.
[in]pResolutionDPISet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:

◆ PdfToolsOptimizationProfiles_Web_SetThresholdDPI()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOptimizationProfiles_Web_SetThresholdDPI ( TPdfToolsOptimizationProfiles_Web * pWeb,
double dThresholdDPI )

The threshold resolution of images in DPI.

The threshold resolution in DPI (dots per inch) to selectively activate downsampling for color and grayscale images.

Valid values are in the range 1.0 to 10000. To deactivate down-sampling of images set PdfToolsOptimizationProfiles_Web_GetResolutionDPI to NULL.

Default: 1.4 times PdfToolsOptimizationProfiles_Web_GetResolutionDPI.

Parameters
[in,out]pWebActs as a handle to the native object of type TPdfToolsOptimizationProfiles_Web.
[in]dThresholdDPISet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes: