CFx SDK Documentation  2020SP3
Public Member Functions | List of all members
PdfImporterEx Class Referenceabstract

#include <PdfImportEx.h>

Inheritance diagram for PdfImporterEx:
OdPdfImport OdRxObject

Public Member Functions

virtual OdRxDictionaryPtr properties ()=0
 
virtual ImportResult import ()=0
 
virtual ImportResult loadDocument ()=0
 
virtual bool isDocumentLoaded () const =0
 
virtual ImportResult loadPage ()=0
 
virtual bool isPageLoaded () const =0
 
virtual OdUInt32 getPageCount () const =0
 
virtual double getMeasureDictInfo ()=0
 
virtual OdPdfImport::ImportResult fillLayersInfo (std::map< std::wstring, bool > &layers_info)=0
 
virtual double getPageWidth () const =0
 
virtual double getPageHeight () const =0
 
virtual void setClipBoundary (const OdGePoint2dArray &clipBoundary, const bool is_clip_boundary_inverted)=0
 
virtual void setLayersInfo (std::map< std::wstring, bool > &layers_info)=0
 
virtual void clearUnderlayInfo ()=0
 
virtual int preview (int pic_width, int pic_height, OdGiRasterImagePtr &pImage)=0
 
virtual void getImportedObjectsInfo (size_t &object_count, size_t &error_count)=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

- Public Types inherited from OdPdfImport
enum  ImportResult {
  success, fail, bad_password, bad_file,
  bad_database, encrypted_file, invalid_page_number, image_file_error,
  no_objects_imported
}
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

An abstract class that provides the interface for upper level of the PDF import manager. <group OdPdfImport_Classes>

Definition at line 41 of file PdfImportEx.h.

Member Function Documentation

◆ clearUnderlayInfo()

virtual void PdfImporterEx::clearUnderlayInfo ( )
pure virtual

Clears underlay information.

◆ fillLayersInfo()

virtual OdPdfImport::ImportResult PdfImporterEx::fillLayersInfo ( std::map< std::wstring, bool > &  layers_info)
pure virtual

Retrieves the layers information from the PDF document.

Parameters
layers_info[out] A placeholder for an STL map object that contains layers information.
Returns
Returns a value of the <link OdPdfImport::ImportResult, ImportResult> enumeration that contains the result of the filling operation.
Remarks
The layer information contains a set of key-value pairs. Each pair contains a layer name as a key and a boolean flag that determines the visibility of the layer as a value. The set of key-value pairs a stored in an STL map object. The method fills the passed map object with current layers information retrieved from the PDF document and returns it to a calling subroutine.

◆ getImportedObjectsInfo()

virtual void PdfImporterEx::getImportedObjectsInfo ( size_t &  object_count,
size_t &  error_count 
)
pure virtual

Retrieves information about import results .

Parameters
object_count[out] A placeholder for the number of PDF objects to be imported.
error_count[out] A placeholder for the number of PDF objects imported with an error.

◆ getMeasureDictInfo()

virtual double PdfImporterEx::getMeasureDictInfo ( )
pure virtual

Retrieves the current measuring unit of the PDF document.

Returns
Returns the current measuring unit.

◆ getPageCount()

virtual OdUInt32 PdfImporterEx::getPageCount ( ) const
pure virtual

Retrieves the quantity of pages in the PDF document.

Returns
Returns the current page quantity.

◆ getPageHeight()

virtual double PdfImporterEx::getPageHeight ( ) const
pure virtual

Retrieves the current page height of the PDF document.

Returns
Returns the current page height in measure units.

◆ getPageWidth()

virtual double PdfImporterEx::getPageWidth ( ) const
pure virtual

Retrieves the current page width of the PDF document.

Returns
Returns the current page width in measure units.

◆ import()

virtual ImportResult PdfImporterEx::import ( )
pure virtual

Imports the data from a specified PDF file to a drawing database.

Returns
Returns a value of the <link OdPdfImport::ImportResult, ImportResult> enumeration that contains the result of the import operation.

Implements OdPdfImport.

◆ isDocumentLoaded()

virtual bool PdfImporterEx::isDocumentLoaded ( ) const
pure virtual

Retrieves whether the PDF document is successfully loaded.

Returns
Returns true if the document content is loaded; otherwise, the method returns false.

◆ isPageLoaded()

virtual bool PdfImporterEx::isPageLoaded ( ) const
pure virtual

Retrieves whether the page from the PDF document is successfully loaded.

Returns
Returns true if the page content is loaded; otherwise, the method returns false.

◆ loadDocument()

virtual ImportResult PdfImporterEx::loadDocument ( )
pure virtual

Loads the content of a specified PDF document.

Returns
Returns a value of the <link OdPdfImport::ImportResult, ImportResult> enumeration that contains the result of the loading operation.

◆ loadPage()

virtual ImportResult PdfImporterEx::loadPage ( )
pure virtual

Loads the content of a specified page from the PDF document.

Returns
Returns a value of the <link OdPdfImport::ImportResult, ImportResult> enumeration that contains the result of the loading operation.

◆ preview()

virtual int PdfImporterEx::preview ( int  pic_width,
int  pic_height,
OdGiRasterImagePtr pImage 
)
pure virtual

◆ properties()

virtual OdRxDictionaryPtr PdfImporterEx::properties ( )
pure virtual

Retrieves current set of the PDF import properties.

Returns
Returns a smart pointer to a dictionary object that contains import properties.

Implements OdPdfImport.

◆ setClipBoundary()

virtual void PdfImporterEx::setClipBoundary ( const OdGePoint2dArray clipBoundary,
const bool  is_clip_boundary_inverted 
)
pure virtual

Sets a new clipping boundaries for the PDF document content.

Parameters
clipBoundary[in] A point array that defines the boundary of clipping.
is_clip_boundary_inverted[in] A boolean value that determines whether the boundary is inverted (if is equal to true) or not (if is equal to false).

◆ setLayersInfo()

virtual void PdfImporterEx::setLayersInfo ( std::map< std::wstring, bool > &  layers_info)
pure virtual

Sets layers information.

Parameters
layers_info[in] An STL map object that contains layers information.
Remarks
The layer information contains a set of key-value pairs. Each pair contains a layer name as a key and a boolean flag that determines the visibility of the layer as a value. The set of key-value pairs a stored in an STL map object that is passed to the method. Using this map object you can change the visibility of each layer, previously retrieved from the PDF document through calling the fillLayersInfo() method.

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