CFx SDK Documentation  2020SP3
PdfImport.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef _PDFIMPORT_INCLUDED_
25 #define _PDFIMPORT_INCLUDED_
26 
27 #include "RxModule.h"
28 #include "RxDictionary.h"
29 #include "DynamicLinker.h"
30 
32 
33 #include "OdPlatformSettings.h"
34 
35 #ifdef PDFIMPORT_EXPORTS
36  #define PDFIMPORT_TOOLKIT OD_TOOLKIT_EXPORT
37  #define PDFIMPORT_TOOLKIT_STATIC OD_STATIC_EXPORT
38 #else
39  #define PDFIMPORT_TOOLKIT OD_TOOLKIT_IMPORT
40  #define PDFIMPORT_TOOLKIT_STATIC OD_STATIC_IMPORT
41 #endif
42 
44 
45 class OdDbDatabase;
46 
47 //DD:EXPORT_ON
48 
54 class OdPdfImport : public OdRxObject
55 {
56 public:
60  {
61  success, // The import process is successfully finished.
62  fail, // The import process is failed.
63  bad_password, // The import process is failed because of an incorrect password.
64  bad_file, // The import process is failed because of an incorrect input .pdf file.
65  bad_database, // The import process is failed because of an incorrect destination database object.
66  encrypted_file, // The import process is failed because of an encrypted input .pdf file.
67  invalid_page_number, // The import process is failed because of an invalid page number of the input .pdf file.
68  image_file_error, // The import process is failed because of an error during the image file saving (the possible reason is an invalid directory for saving).
69  no_objects_imported // The import process is failed because no objects were imported.
70  };
71 
79  virtual ImportResult import() = 0;
80 
120 };
121 
126 
132 {
133 public:
134 
139  virtual OdPdfImportPtr create () = 0;
140 
141 };
142 
147 
148 
155 {
157  if ( !pModule.isNull() ) return pModule->create ();
158  return (OdPdfImport*)0;
159 }
160 
161 //DD:EXPORT_OFF
162 
163 #endif // _PDFIMPORT_INCLUDED_
OdPdfImport::bad_password
@ bad_password
Definition: PdfImport.h:63
OdDbDatabase
Definition: DbDatabase.h:421
OdPdfImport::ImportResult
ImportResult
Definition: PdfImport.h:60
createImporter
OdPdfImportPtr createImporter()
Definition: PdfImport.h:154
odrxDynamicLinker
FIRSTDLL_EXPORT OdRxDynamicLinker * odrxDynamicLinker()
OdPdfImportModule::create
virtual OdPdfImportPtr create()=0
OdPdfImportModule
Definition: PdfImport.h:132
RxModule.h
OdPdfImport::fail
@ fail
Definition: PdfImport.h:62
OdRxObject
Definition: RxObject.h:564
OdPdfImport::bad_database
@ bad_database
Definition: PdfImport.h:65
OdPdfImport::properties
virtual OdRxDictionaryPtr properties()=0
OdPdfImport::success
@ success
Definition: PdfImport.h:61
OdPdfImportModuleName
#define OdPdfImportModuleName
Definition: OdModuleNames.h:139
OdPdfImportModulePtr
OdSmartPtr< OdPdfImportModule > OdPdfImportModulePtr
Definition: PdfImport.h:146
OdSmartPtr< OdRxDictionary >
DynamicLinker.h
OdPlatformSettings.h
OdRxDynamicLinker::loadApp
virtual OdRxModulePtr loadApp(const OdString &applicationName, bool silent=true)=0
OdPdfImport
Definition: PdfImport.h:55
OdPdfImport::encrypted_file
@ encrypted_file
Definition: PdfImport.h:66
OdRxModule
Definition: RxModule.h:45
OdPdfImport::image_file_error
@ image_file_error
Definition: PdfImport.h:68
OdPdfImport::bad_file
@ bad_file
Definition: PdfImport.h:64
OdPdfImport::no_objects_imported
@ no_objects_imported
Definition: PdfImport.h:69
OdPdfImportPtr
OdSmartPtr< OdPdfImport > OdPdfImportPtr
Definition: PdfImport.h:125
OdPdfImport::invalid_page_number
@ invalid_page_number
Definition: PdfImport.h:67
RxDictionary.h