CFx SDK Documentation  2023 SP0
Public Types | Public Member Functions | List of all members
OdPdfImport Class Referenceabstract

#include <PdfImport.h>

Inheritance diagram for OdPdfImport:
OdRxObject PdfImporterEx

Public Types

enum  ImportResult {
  success , fail , bad_password , bad_file ,
  bad_database , encrypted_file , invalid_page_number , image_file_error ,
  no_objects_imported
}
 

Public Member Functions

virtual ImportResult import ()=0
 
virtual OdRxDictionaryPtr properties ()=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

<group OdPdfImport_Classes>

This class implements a .pdf importer functionality.

Definition at line 54 of file PdfImport.h.

Member Enumeration Documentation

◆ ImportResult

Contains the list of import result, which are handled with importing module.

Enumerator
success 
fail 
bad_password 
bad_file 
bad_database 
encrypted_file 
invalid_page_number 
image_file_error 
no_objects_imported 

Definition at line 59 of file PdfImport.h.

Member Function Documentation

◆ import()

virtual ImportResult OdPdfImport::import ( )
pure virtual

Imports a .pdf file contents to a drawing database with specified properties. This method should be reimplemented to provide the import from a .pdf file functionality.

Returns
Returns a value of the <link OdPdfImport::ImportResult, ImportResult> enumeration that contains the result of the import process.
Remarks
To specify import properties, use the <link OdPdfImport::properties, properties()> method to get access to the import properties dictionary object.

Implemented in PdfImporterEx.

◆ properties()

virtual OdRxDictionaryPtr OdPdfImport::properties ( )
pure virtual

Retrieves a dictionary object that contains the set of .pdf import properties.

Returns
Returns a smart pointer to the dictionary object that contains properties used for the import of a .pdf file contents to a drawing database.
Remarks
The list of supported properties for the PDF import operation is represented in the table below.
Name Description Database A target database object (an instance of the OdDbDatabase class). The contents of the .pdf file are imported to this database. PdfPath A full path to the imported .pdf file. Password A password for the input .pdf file (empty by default). PageNumber A page number of the input .pdf file. Starts from 1 (by default). LayersUseType A method that determines how imported objects should be assigned to layers in the target database. ImportVectorGeometry A flag that determines whether the PDF geometry data types are imported (true by default). ImportSolidFills A flag that determines whether all solid-filled areas are imported (true by default). ImportTrueTypeText A flag that determines whether text objects that use TrueType fonts should be imported (true by default). Some symbols exported from a .pdf document may display incorrectly because the .pdf document uses symbols that the origin TrueType font does not contain. To correctly display all symbols, switch on the ImportTrueTypeTextAsGeometry option for the import process. ImportRasterImages A flag that determines whether raster images are imported by saving them as .png files and attaching them to the current drawing (true by default). ImportGradientFills A flag that determines whether shaded objects are imported as images by saving them as .png files and attaching them to the current drawing (true by default). ImportAsBlock A flag that determines whether the .pdf file is imported as a block, not as separate objects (false by default). JoinLineAndArcSegments A flag that determines whether contiguous segments are joined into a polyline if it is possible (true by default). ConvertSolidsToHatches A flag that determines whether 2D solid objects are converted into solid-filled hatches (true by default). ApplyLineweight A flag that determines whether lineweight properties of the imported objects remain (if true) or are ignored (if false). By default the property is equal to true. ImportTrueTypeTextAsGeometry A flag that determines whether text objects that use TrueType fonts are imported as polylines and solid-filled hatches (false by default). To import text as geometry, switch on the ImportVectorGeometry and ImportSolidFills import options. Scaling Specifies the scaling factor for imported objects (equal to 1.0 by default). Rotation Specifies the rotation angle for imported objects (equal to 0.0 by default). InsertionPointX An X-coordinate of the imported PDF content location relative to the location of the current UCS (equal to 0.0 by default). InsertionPointY A Y-coordinate of the imported PDF content location relative to the location of the current UCS (equal to 0.0 by default). UseProgressMeter A flag that determines whether a progress meter is used for the import (true by default). Using the progress meter can reduce performance. UseGeometryOptimization A flag that determines whether a geometry optimization algorithm is used for the import (true be default). ImportType3AsTrueTypeText A flag that determines whether text objects that use Type3 fonts are imported as objects that use TrueType fonts (false by default). Some symbols exported from a .pdf document may display incorrectly because the .pdf document uses Type3 font glyphs, which the origin TrueType font does not contain. UseRgbColor A flag that determines whether RGB colors are used or colors are selected from the palette, if possible (false by default). ImportInvalidTTTextAsGeometry A flag that determines whether text objects that use invalid TrueType fonts are imported as polylines and solid-filled hatches (true by default). TakeAddMeasurementFactors A flag that determines whether additional measurement factors are used for the pdf page (true by default). UsePdfTransparency A flag that determines whether transparency for geometric objects is used from a PDF stream (if true) or set to 50% for hatch objects (if false). By default the property is equal to false. PageHasImageData A flag that determines whether PDF page has Image data or not. //FELIX_CHANGE

Implemented in PdfImporterEx.


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