CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OdPdf2ImageConverter Class Referenceabstract

#include <RxPdfToRasterServices.h>

Inheritance diagram for OdPdf2ImageConverter:
OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdPdf2ImageConverter)
 
virtual OdResult loadPdf (const OdString &filename, const OdString &password="")=0
 
virtual OdResult loadPdf (OdStreamBufPtr &pBuf, const OdString &password="")=0
 
virtual bool isLoaded ()=0
 
virtual OdString getFilename ()=0
 
virtual OdUInt16 getPagesCount ()=0
 
virtual OdResult setActivePage (OdUInt16 pageNum=1)=0
 
virtual OdUInt16 getActivePage ()=0
 
virtual OdResult getLayers (OdPdfLayerArray &layers)=0
 
virtual OdResult getPageSize (OdGsDCRect &rect)=0
 
virtual OdGiRasterImagePtr convertPdf (const OdPdf2ImageConversionParams *params=0)=0
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class is the base class for classes that provide platform-dependent loading and converting of PDF files for ODA SDK. Library: TD_Db <group OdRx_Classes>

Definition at line 117 of file RxPdfToRasterServices.h.

Member Function Documentation

◆ convertPdf()

virtual OdGiRasterImagePtr OdPdf2ImageConverter::convertPdf ( const OdPdf2ImageConversionParams params = 0)
pure virtual

Converts the active page of the PDF file to the raster image using specified parameters.

Parameters
params[out] conversion params.
Returns
The pointer to the resulting raster image object.

◆ getActivePage()

virtual OdUInt16 OdPdf2ImageConverter::getActivePage ( )
pure virtual

Gets the active page of the PDF file.

Returns
The index of the active page.

◆ getFilename()

virtual OdString OdPdf2ImageConverter::getFilename ( )
pure virtual

Gets the name of the PDF file, if it was loaded from disk. Otherwise returns an empty string.

Returns
Name of the loaded PDF file. If no file is loaded, returns an empty string.

◆ getLayers()

virtual OdResult OdPdf2ImageConverter::getLayers ( OdPdfLayerArray layers)
pure virtual

Gets the layers of the active page in the PDF file.

Parameters
layers[out] Layers array.
Returns
eOk if successful; eNullPtr if no PDF file is loaded; eWrongObjectType if the source file has wrong format; eInvalidIndex if the active page index is invalid; eNullIterator if the page iterator is not set; eExtendedError if layers can't be got from the active page; eNotHandled if PDFium module is not enabled.

◆ getPagesCount()

virtual OdUInt16 OdPdf2ImageConverter::getPagesCount ( )
pure virtual

Gets the page count of the PDF file.

Returns
The number of pages of the loaded PDF file.

◆ getPageSize()

virtual OdResult OdPdf2ImageConverter::getPageSize ( OdGsDCRect rect)
pure virtual

Gets the image size on the active page of the PDF file (in pixels for default PDF resolution 72dpi).

Parameters
rect[out] Image size.
Returns
eOk if successful; eNullPtr if no PDF file is loaded; eWrongObjectType if the source file has wrong format; eInvalidIndex if the active page index is invalid; eNullIterator if the page iterator is not set; eNotHandled if PDFium module is not enabled.

◆ isLoaded()

virtual bool OdPdf2ImageConverter::isLoaded ( )
pure virtual

Checks if a PDF file is loaded into the converter.

Returns
True if a PDF file is loaded, false otherwise.

◆ loadPdf() [1/2]

virtual OdResult OdPdf2ImageConverter::loadPdf ( const OdString filename,
const OdString password = "" 
)
pure virtual

Loads the specified PDF file.

Parameters
filename[in] Filename of the file to be read.
password[in] Optional password.
Returns
eOk if successful, eCantOpenFile or eNotHandled otherwise.

◆ loadPdf() [2/2]

virtual OdResult OdPdf2ImageConverter::loadPdf ( OdStreamBufPtr pBuf,
const OdString password = "" 
)
pure virtual

Loads the specified PDF file.

Parameters
pBuf[in] Pointer to the StreamBuf object the data are to be read from.
password[in] Optional password.
Returns
eOk if successful, eCantOpenFile or eNotHandled otherwise.

◆ ODRX_DECLARE_MEMBERS()

OdPdf2ImageConverter::ODRX_DECLARE_MEMBERS ( OdPdf2ImageConverter  )

◆ setActivePage()

virtual OdResult OdPdf2ImageConverter::setActivePage ( OdUInt16  pageNum = 1)
pure virtual

Sets the page of the PDF file to work with.

Parameters
pageNum[in] Page number. The first page has number 1.
Returns
eOk if successful; eNullPtr if no PDF file is loaded; eWrongObjectType if the source file has wrong format; eInvalidIndex if no page with specified index was found in the source PDF file; eNotHandled if PDFium module is not enabled.

The documentation for this class was generated from the following file: