Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
PdfImporterEx.cs
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// <auto-generated />
3//
4// This file was automatically generated by SWIG (http://www.swig.org).
5// Version 4.0.2
6//
7// Do not make changes to this file unless you know what you are doing--modify
8// the SWIG interface file instead.
9//------------------------------------------------------------------------------
10
11namespace Teigha.TD {
12
13using System;
14using System.Runtime.InteropServices;
15using Teigha.Core;
16
17public class PdfImporterEx : OdPdfImport {
18 private Object locker = new Object();
19 private HandleRef swigCPtr;
20 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
21 public PdfImporterEx(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.PdfImporterEx_SWIGUpcast(cPtr), cMemoryOwn) {
22 swigCPtr = new HandleRef(this, cPtr);
23 }
24
25 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
26 public static HandleRef getCPtr(PdfImporterEx obj) {
27 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
28 }
29
30 protected override void Dispose(bool disposing) {
31 lock(this) {
32 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
33 if (swigCMemOwn) {
34 swigCMemOwn = false;
36 }
37 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
38 }
39 base.Dispose(disposing);
40 }
41 }
42
43 public override OdRxDictionary properties() {// OdRxDictionaryPtr
44 MemoryManager mMan = MemoryManager.GetMemoryManager();
45 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #17
46 IntPtr ptr = TD_DbPINVOKE.PdfImporterEx_properties(swigCPtr);
47
48 OdRxDictionary ret = null;
49 if (null != mTrans)
50 {
51 mTrans.AddObject((OdRxDictionary)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxDictionary),ptr, true));
52 ret = (OdRxDictionary)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxDictionary),ptr, false);
53 }
54 else
55 {
56 ret = (OdRxDictionary)Teigha.Core.Helpers.odrxCreateObjectInternalUniversal(typeof(OdRxDictionary),ptr, true);
57 }
58
60 return ret;
61}
62
63 public override OdPdfImport.ImportResult import() {
66 return ret;
67 }
68
72 return ret;
73 }
74
75 public virtual bool isDocumentLoaded() {
78 return ret;
79 }
80
84 return ret;
85 }
86
87 public virtual bool isPageLoaded() {
88 bool ret = TD_DbPINVOKE.PdfImporterEx_isPageLoaded(swigCPtr);
90 return ret;
91 }
92
93 public virtual UInt32 getPageCount() {
94// test csout
95 /*SIMPLETYPE*/
96 UInt32 ret = TD_DbPINVOKE.PdfImporterEx_getPageCount(swigCPtr);
98 return ret;
99 }
100
101 public virtual double getMeasureDictInfo() {
102 double ret = TD_DbPINVOKE.PdfImporterEx_getMeasureDictInfo(swigCPtr);
104 return ret;
105 }
106
110 return ret;
111 }
112
113 public virtual double getPageWidth() {
114 double ret = TD_DbPINVOKE.PdfImporterEx_getPageWidth(swigCPtr);
116 return ret;
117 }
118
119 public virtual double getPageHeight() {
120 double ret = TD_DbPINVOKE.PdfImporterEx_getPageHeight(swigCPtr);
122 return ret;
123 }
124
125 public virtual void setClipBoundary(OdGePoint2dArray clipBoundary, bool is_clip_boundary_inverted) {
126 TD_DbPINVOKE.PdfImporterEx_setClipBoundary(swigCPtr, OdGePoint2dArray.getCPtr(clipBoundary).Handle, is_clip_boundary_inverted);
128 }
129
130 public virtual void setLayersInfo(StringToBoolMap layers_info) {
133 }
134
135 public virtual void clearUnderlayInfo() {
138 }
139
140 public virtual int preview(int pic_width, int pic_height, ref OdGiRasterImage /*OUT_PARAM for SMARTPTR*/ pImage) {
141 /*OUT_PARAM for SMARTPTR pre*/ IntPtr tmp_pImage = pImage == null ? IntPtr.Zero : OdGiRasterImage.getCPtr(pImage).Handle;
142 IntPtr saved_pImage = tmp_pImage;
143 /*OUT_PARAM for SMARTPTR pre*/
144 try {
145 int ret = TD_DbPINVOKE.PdfImporterEx_preview(swigCPtr, pic_width, pic_height, ref tmp_pImage /*OUT_PARAM for SMARTPTR*/);
147 return ret;
148 } finally {
149if(tmp_pImage == IntPtr.Zero) pImage = null;
150 if(tmp_pImage != IntPtr.Zero && tmp_pImage != saved_pImage)
151 {
152 MemoryTransaction mTrans_pImage = MemoryManager.GetMemoryManager().GetCurrentTransaction();
153 if(mTrans_pImage != null)
154 mTrans_pImage.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<OdGiRasterImage>(typeof(OdGiRasterImage), tmp_pImage, true));
155 pImage = Teigha.Core.Helpers.odCreateObjectInternal<OdGiRasterImage>(typeof(OdGiRasterImage), tmp_pImage, mTrans_pImage == null);
156 /*OUT_PARAM for SMARTPTR*/
157 }
158 }
159 }
160
161 public virtual void getImportedObjectsInfo(out uint object_count, out uint error_count) {
162 TD_DbPINVOKE.PdfImporterEx_getImportedObjectsInfo(swigCPtr, out object_count, out error_count);
164 }
165
169 return ret;
170 }
171
175 }
176
180 return ret;
181 }
182
183 protected static string getRealClassName(IntPtr /*SIMPLETYPE*/ ptr) {
184 string ret = TD_DbPINVOKE.PdfImporterEx_getRealClassName(ptr /*SIMPLETYPE*/);
186 return ret;
187 }
188
193 public override Teigha.Core.OdRxDictionary vb_properties() { return this.properties(); }
194
195}
196
197}
static HandleRef getCPtr(OdGePoint2dArray obj)
static HandleRef getCPtr(OdGiRasterImage obj)
static HandleRef getCPtr(OdStringArray obj)
virtual OdPdfImport.ImportResult extractEmbededFonts(OdStringArray font_list)
PdfImporterEx(IntPtr cPtr, bool cMemoryOwn)
virtual bool isDocumentLoaded()
override OdRxDictionary properties()
virtual OdPdfImport.ImportResult loadDocument()
override Teigha.Core.OdRxDictionary vb_properties()
virtual void getImportedObjectsInfo(out uint object_count, out uint error_count)
virtual void setClipBoundary(OdGePoint2dArray clipBoundary, bool is_clip_boundary_inverted)
override void Dispose(bool disposing)
virtual OdPdfImport.ImportResult fillLayersInfo(StringToBoolMap layers_info)
virtual double getPageWidth()
virtual OdPdfImport.ImportResult loadPage()
virtual OdPdfImport.ImportResult fillFontsInfo(SWIGTYPE_p_std__mapT_OdAnsiString_OdAnsiString_std__lessT_OdAnsiString_t_t font_map)
virtual UInt32 getPageCount()
static HandleRef getCPtr(PdfImporterEx obj)
virtual double getMeasureDictInfo()
virtual double getPageHeight()
virtual bool isPageLoaded()
virtual int preview(int pic_width, int pic_height, ref OdGiRasterImage pImage)
virtual void clearUnderlayInfo()
override void setPreferableFontCallback(SWIGTYPE_p_std__functionT_OdAnsiString_fchar_const_p_char_const_p_bool_constF_t callback)
static string getRealClassName(IntPtr ptr)
virtual void setLayersInfo(StringToBoolMap layers_info)
static HandleRef getCPtr(StringToBoolMap obj)
static global::System.Exception Retrieve()
static string PdfImporterEx_getRealClassName(IntPtr jarg1)
static double PdfImporterEx_getPageWidth(HandleRef jarg1)
static int PdfImporterEx_import(HandleRef jarg1)
static IntPtr PdfImporterEx_properties(HandleRef jarg1)
static void PdfImporterEx_getImportedObjectsInfo(HandleRef jarg1, out uint jarg2, out uint jarg3)
static bool PdfImporterEx_isDocumentLoaded(HandleRef jarg1)
static int PdfImporterEx_loadPage(HandleRef jarg1)
static void PdfImporterEx_clearUnderlayInfo(HandleRef jarg1)
static double PdfImporterEx_getPageHeight(HandleRef jarg1)
static void delete_PdfImporterEx(HandleRef jarg1)
static UInt32 PdfImporterEx_getPageCount(HandleRef jarg1)
static int PdfImporterEx_extractEmbededFonts(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool PdfImporterEx_isPageLoaded(HandleRef jarg1)
static int PdfImporterEx_fillLayersInfo(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void PdfImporterEx_setLayersInfo(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void PdfImporterEx_setPreferableFontCallback(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int PdfImporterEx_loadDocument(HandleRef jarg1)
static int PdfImporterEx_fillFontsInfo(HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int PdfImporterEx_preview(HandleRef jarg1, int jarg2, int jarg3, ref IntPtr jarg4)
static void PdfImporterEx_setClipBoundary(HandleRef jarg1, IntPtr jarg2, bool jarg3)
static double PdfImporterEx_getMeasureDictInfo(HandleRef jarg1)