Pdftools SDK
Loading...
Searching...
No Matches
Macros | Functions
PdfTools_PdfToolsImage.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 BOOL PDFTOOLS_CALL PdfToolsImage_Page_GetSize (TPdfToolsImage_Page *pPage, TPdfToolsGeomInt_Size *pSize)
 The size of the page in number of pixels.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsImage_Page_GetResolution (TPdfToolsImage_Page *pPage, TPdfToolsGeomUnits_Resolution *pResolution)
 The resolution of the page The resolution can be NULL if the image does not specify a resolution.
 
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfToolsImage_PageList_GetCount (TPdfToolsImage_PageList *pPageList)
 Get the number of elements in the list.
 
PDFTOOLS_EXPORT TPdfToolsImage_Page *PDFTOOLS_CALL PdfToolsImage_PageList_Get (TPdfToolsImage_PageList *pPageList, int iIndex)
 Returns the element at the specified position in the given list.
 
PDFTOOLS_EXPORT TPdfToolsImage_Document *PDFTOOLS_CALL PdfToolsImage_Document_Open (const TPdfToolsSys_StreamDescriptor *pStreamDesc)
 Open an image document Documents opened with this method are read-only and cannot be modified.
 
PDFTOOLS_EXPORT TPdfToolsImage_DocumentType PDFTOOLS_CALL PdfToolsImage_Document_GetType (TPdfToolsImage_Document *pDocument)
 Get actual derived type of base type TPdfToolsImage_Document.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsImage_Document_Close (TPdfToolsImage_Document *pObject)
 Close object.
 
PDFTOOLS_EXPORT TPdfToolsImage_Page *PDFTOOLS_CALL PdfToolsImage_SinglePageDocument_GetPage (TPdfToolsImage_SinglePageDocument *pSinglePageDocument)
 The page of the image.
 
PDFTOOLS_EXPORT TPdfToolsImage_PageList *PDFTOOLS_CALL PdfToolsImage_MultiPageDocument_GetPages (TPdfToolsImage_MultiPageDocument *pMultiPageDocument)
 The pages of the image.
 
PDFTOOLS_EXPORT TPdfToolsImage_DocumentList *PDFTOOLS_CALL PdfToolsImage_DocumentList_New (void)
 
PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfToolsImage_DocumentList_GetCount (TPdfToolsImage_DocumentList *pDocumentList)
 Get the number of elements in the list.
 
PDFTOOLS_EXPORT TPdfToolsImage_Document *PDFTOOLS_CALL PdfToolsImage_DocumentList_Get (TPdfToolsImage_DocumentList *pDocumentList, int iIndex)
 Returns the element at the specified position in the given list.
 
PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsImage_DocumentList_Add (TPdfToolsImage_DocumentList *pDocumentList, TPdfToolsImage_Document *pDocument)
 Add an element to the end of the list.
 

Macro Definition Documentation

◆ PDFTOOLS_CALL

#define PDFTOOLS_CALL

Function Documentation

◆ PdfToolsImage_Document_Close()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsImage_Document_Close ( TPdfToolsImage_Document * pObject)

Close object.

Disposable objects that have an associated close method must be closed by invoking this function.

Parameters
[in]pObjectDisposable object.
Returns
TRUE if the object was closed successfully; FALSE if an error occured while closing the object. Retrieve the error code by calling PdfTools_GetLastError .

◆ PdfToolsImage_Document_GetType()

Get actual derived type of base type TPdfToolsImage_Document.

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

Parameters
[in,out]pDocumentActs as a handle to a native object.
Returns
The item of the enumeration TPdfToolsImage_DocumentType 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.

◆ PdfToolsImage_Document_Open()

PDFTOOLS_EXPORT TPdfToolsImage_Document *PDFTOOLS_CALL PdfToolsImage_Document_Open ( const TPdfToolsSys_StreamDescriptor * pStreamDesc)

Open an image document Documents opened with this method are read-only and cannot be modified.

Parameters
[in]pStreamDescThe stream from which the image is read.
Returns
The newly created document instance

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. Possible error codes:

◆ PdfToolsImage_DocumentList_Add()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsImage_DocumentList_Add ( TPdfToolsImage_DocumentList * pDocumentList,
TPdfToolsImage_Document * pDocument )

Add an element to the end of the list.

Parameters
[in,out]pDocumentListActs as a handle to the native object of type TPdfToolsImage_DocumentList.
[in,out]pDocument
Returns
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. Possible error codes:

◆ PdfToolsImage_DocumentList_Get()

PDFTOOLS_EXPORT TPdfToolsImage_Document *PDFTOOLS_CALL PdfToolsImage_DocumentList_Get ( TPdfToolsImage_DocumentList * pDocumentList,
int iIndex )

Returns the element at the specified position in the given list.

Parameters
[in,out]pDocumentListActs as a handle to the native object of type TPdfToolsImage_DocumentList.
[in]iIndex
Returns
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. Possible error codes:

◆ PdfToolsImage_DocumentList_GetCount()

PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfToolsImage_DocumentList_GetCount ( TPdfToolsImage_DocumentList * pDocumentList)

Get the number of elements in the list.

Parameters
[in,out]pDocumentListActs as a handle to the native object of type TPdfToolsImage_DocumentList.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
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. Possible error codes:

◆ PdfToolsImage_DocumentList_New()

PDFTOOLS_EXPORT TPdfToolsImage_DocumentList *PDFTOOLS_CALL PdfToolsImage_DocumentList_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.

◆ PdfToolsImage_MultiPageDocument_GetPages()

PDFTOOLS_EXPORT TPdfToolsImage_PageList *PDFTOOLS_CALL PdfToolsImage_MultiPageDocument_GetPages ( TPdfToolsImage_MultiPageDocument * pMultiPageDocument)

The pages of the image.

Parameters
[in,out]pMultiPageDocumentActs as a handle to the native object of type TPdfToolsImage_MultiPageDocument.
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.

◆ PdfToolsImage_Page_GetResolution()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsImage_Page_GetResolution ( TPdfToolsImage_Page * pPage,
TPdfToolsGeomUnits_Resolution * pResolution )

The resolution of the page The resolution can be NULL if the image does not specify a resolution.

Parameters
[in,out]pPageActs as a handle to the native object of type TPdfToolsImage_Page.
[out]pResolutionRetrieved 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. Possible error codes:

◆ PdfToolsImage_Page_GetSize()

PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsImage_Page_GetSize ( TPdfToolsImage_Page * pPage,
TPdfToolsGeomInt_Size * pSize )

The size of the page in number of pixels.

Parameters
[in,out]pPageActs as a handle to the native object of type TPdfToolsImage_Page.
[out]pSizeRetrieved 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. Possible error codes:

◆ PdfToolsImage_PageList_Get()

PDFTOOLS_EXPORT TPdfToolsImage_Page *PDFTOOLS_CALL PdfToolsImage_PageList_Get ( TPdfToolsImage_PageList * pPageList,
int iIndex )

Returns the element at the specified position in the given list.

Parameters
[in,out]pPageListActs as a handle to the native object of type TPdfToolsImage_PageList.
[in]iIndex
Returns
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. Possible error codes:

◆ PdfToolsImage_PageList_GetCount()

PDFTOOLS_EXPORT int PDFTOOLS_CALL PdfToolsImage_PageList_GetCount ( TPdfToolsImage_PageList * pPageList)

Get the number of elements in the list.

Parameters
[in,out]pPageListActs as a handle to the native object of type TPdfToolsImage_PageList.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
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. Possible error codes:

◆ PdfToolsImage_SinglePageDocument_GetPage()

PDFTOOLS_EXPORT TPdfToolsImage_Page *PDFTOOLS_CALL PdfToolsImage_SinglePageDocument_GetPage ( TPdfToolsImage_SinglePageDocument * pSinglePageDocument)

The page of the image.

Parameters
[in,out]pSinglePageDocumentActs as a handle to the native object of type TPdfToolsImage_SinglePageDocument.
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.