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 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.
 

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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling 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 a threshold of 1.4 times the target resolution are down-sampled.

Valid values are 1.0, or 10000, or in between.

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 is returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ 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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling 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 a threshold of 1.4 times the target resolution are down-sampled.

Valid values are 1.0, or 10000, or in between.

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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling 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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling 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 is returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. The error message can be obtained by calling 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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling 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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling 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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling 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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling 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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling 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 a threshold of 1.4 times the target resolution are down-sampled.

Valid values are 1.0, or 10000, or in between.

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 is returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. The error message can be obtained by calling PdfTools_GetLastErrorMessage.

◆ 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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling 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 a threshold of 1.4 times the target resolution are down-sampled.

Valid values are 1.0, or 10000, or in between.

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 is returned. The specific error code can be retrieved by calling PdfTools_GetLastError. The error message can be obtained by calling PdfTools_GetLastErrorMessage.