CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
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
 
virtual OdPdfImport::ImportResult fillFontsInfo (std::map< OdAnsiString, OdAnsiString > &font_map)=0
 
virtual void setPreferableFontCallback (PreferableFontCallback callback)=0
 
virtual OdPdfImport::ImportResult extractEmbededFonts (OdStringArray &font_list) const =0
 
virtual ImportResult import ()=0
 
virtual OdRxDictionaryPtr properties ()=0
 
virtual void setPreferableFontCallback (PreferableFontCallback callback)=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 , font_file_error
}
 
- 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 the upper level of the PDF import manager. <group OdPdfImport_Classes>

Definition at line 48 of file PdfImportEx.h.

Member Function Documentation

◆ clearUnderlayInfo()

virtual void PdfImporterEx::clearUnderlayInfo ( )
pure virtual

Clears underlay information.

◆ extractEmbededFonts()

virtual OdPdfImport::ImportResult PdfImporterEx::extractEmbededFonts ( OdStringArray font_list) const
pure virtual

Extracts embedded TrueType fonts from a .pdf document and returns the list of font files.

Parameters
font_list[out] A placeholder for the OdStringArray that contains names for extracted fonts.
Returns
The value of the <link OdPdfImport::ImportResult, ImportResult> enumeration that contains the result of the filler operation.
Remarks
Fonts are extracted for the objects that can be exported with the specified properties. Installation of the extracted fonts is performed on the application side depending on the platform. It is recommended to use this function before calling import() to be able to set the extracted fonts.

◆ fillFontsInfo()

virtual OdPdfImport::ImportResult PdfImporterEx::fillFontsInfo ( std::map< OdAnsiString, OdAnsiString > &  font_map)
pure virtual

Retrieves font information from the current page of the .pdf document.

Parameters
font_map[out]Placeholder for the STL map object that contains font information.
Returns
The value of the <link OdPdfImport::ImportResult, ImportResult> enumeration that contains the result of the filler operation.
Remarks
The font information contains a set of key-value pairs. Each pair contains the font name as the key and FontFamily of the font as the value. The set of key-value pairs is stored in the STL map object. The method fills the passed map object with the current font information extracted from the current page of the PDF document and returns it to the calling subroutine.

◆ fillLayersInfo()

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

Retrieves the layer information from the .pdf document.

Parameters
layers_info[out] A placeholder for an STL map object that contains layer 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 is stored in an STL map object. The method fills the passed map object with current layer 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 coefficient of the .pdf document.

Returns
A double value that contains the current measuring coefficient.
Remarks
If the .pdf document contains only one viewport the method returns the page or viewport measuring coefficient depending on which coefficient is bigger. If the .pdf document contains more than one viewport, the method returns the page measuring coefficient.

◆ 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 the 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 boundary 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 equal to true) or not (if equal to false).

◆ setLayersInfo()

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

Sets layer information.

Parameters
layers_info[in] An STL map object that contains layer 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 is stored in an STL map object that is passed to the method. Using this map object, you can change the visibility of each layer that was previously retrieved from the .pdf document by calling the fillLayersInfo() method.

◆ setPreferableFontCallback()

virtual void PdfImporterEx::setPreferableFontCallback ( PreferableFontCallback  callback)
pure virtual

Sets a function to select the preferred font.

Parameters
callback[in] A pointer to the function for selecting the preferred font.
Remarks
If the font name is changed using PreferableFontCallback, this takes precedence over the Type3TextDefaultFont option.

Implements OdPdfImport.


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