Extended .NET SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
PDFDocument.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.Core {
12
13using System;
14using System.Runtime.InteropServices;
15
16public class PDFDocument : global::System.IDisposable {
17 private Object locker = new Object();
18 private HandleRef swigCPtr;
19 protected bool swigCMemOwn;
20 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
21 public PDFDocument(IntPtr cPtr, bool cMemoryOwn) {
22 swigCMemOwn = cMemoryOwn;
23 swigCPtr = new HandleRef(this, cPtr);
24 }
25 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
26 public static HandleRef getCPtr(PDFDocument obj) {
27 return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
28 }
29
30 ~PDFDocument() {
31 Dispose(false);
32 }
33
34 public void Dispose() {
35 Dispose(true);
36 global::System.GC.SuppressFinalize(this);
37 }
38
39 protected virtual void Dispose(bool disposing) {
40 lock(this) {
41 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
42 if (swigCMemOwn) {
43 swigCMemOwn = false;
45 }
46 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
47 }
48 }
49 }
50
51 public PDFDocument() : this(GlobalsPINVOKE.new_PDFDocument(), true) {
53 }
54
55 public void clearDictionaries() {
58 }
59
61 string ret = GlobalsPINVOKE.PDFDocument_getUniqueTempPath(swigCPtr);
63 return ret;
64}
65
67 string ret = GlobalsPINVOKE.PDFDocument_getUniqueKey(swigCPtr);
69 return ret;
70}
71
72 public void setTmpStream(OdStreamBuf pTmpStream) {
75 }
76
77 public bool encodingEnabled() {
80 return ret;
81 }
82
83 public void enableEncoding(bool bEnable) {
86 }
87
88 public bool encodingFlateEnabled() {
91 return ret;
92 }
93
94 public void enableFlateEncoding(bool bEnable) {
97 }
98
99 public bool encodingTIFFEnabled() {
102 return ret;
103 }
104
105 public void enableTIFFEncoding(bool bEnable) {
108 }
109
113 return ret;
114 }
115
116 public void enableEncodingASCIIHEX(bool bEnable) {
119 }
120
121 public bool encodingDCTEnabled() {
124 return ret;
125 }
126
127 public void enableEncodingDCT(bool bEnable) {
130 }
131
132 public bool isPdfA() {
133 bool ret = GlobalsPINVOKE.PDFDocument_isPdfA(swigCPtr);
135 return ret;
136 }
137
138 public void setPdfA(bool bEnable) {
139 GlobalsPINVOKE.PDFDocument_setPdfA(swigCPtr, bEnable);
141 }
142
143 public bool useQPDF() {
144 bool ret = GlobalsPINVOKE.PDFDocument_useQPDF(swigCPtr);
146 return ret;
147 }
148
149 public void setUseQPDF(bool bEnable) {
150 GlobalsPINVOKE.PDFDocument_setUseQPDF(swigCPtr, bEnable);
152 }
153
157 return ret;
158 }
159
160 public virtual bool Export(PDFIStream pStream, PDFVersion ver) {
161 bool ret = GlobalsPINVOKE.PDFDocument_Export(swigCPtr, PDFIStream.getCPtr(pStream), PDFVersion.getCPtr(ver));
163 return ret;
164 }
165
166 public bool AddObject(PDFObject pObj) {
167 bool ret = GlobalsPINVOKE.PDFDocument_AddObject(swigCPtr, PDFObject.getCPtr(pObj));
169 return ret;
170 }
171
172 public void RemoveObject(PDFObject pObj) {
175 }
176
177 public bool setRoot(PDFCatalogDictionary pObj) {
180 return ret;
181 }
182
184 MemoryManager mMan = MemoryManager.GetMemoryManager();
185 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #25
186 IntPtr ptr = GlobalsPINVOKE.PDFDocument_Root(swigCPtr);
187
188 PDFCatalogDictionary ret = null;
189 if (null != mTrans)
190 {
191 mTrans.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<PDFCatalogDictionary>(typeof(PDFCatalogDictionary), ptr, true));
192 ret = Teigha.Core.Helpers.odCreateObjectInternal<PDFCatalogDictionary>(typeof(PDFCatalogDictionary), ptr, false);
193 }
194 else
195 {
196 ret = Teigha.Core.Helpers.odCreateObjectInternal<PDFCatalogDictionary>(typeof(PDFCatalogDictionary), ptr, true);
197 }
198
200 return ret;
201}
202
206 return ret;
207 }
208
210 MemoryManager mMan = MemoryManager.GetMemoryManager();
211 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #25
213
214 PDFDocumentInformation ret = null;
215 if (null != mTrans)
216 {
217 mTrans.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<PDFDocumentInformation>(typeof(PDFDocumentInformation), ptr, true));
218 ret = Teigha.Core.Helpers.odCreateObjectInternal<PDFDocumentInformation>(typeof(PDFDocumentInformation), ptr, false);
219 }
220 else
221 {
222 ret = Teigha.Core.Helpers.odCreateObjectInternal<PDFDocumentInformation>(typeof(PDFDocumentInformation), ptr, true);
223 }
224
226 return ret;
227}
228
232 return ret;
233 }
234
238 return ret;
239 }
240
241 public bool RegistryFilter(PDFStreamFilter pFilter) {
244 return ret;
245 }
246
247 public bool HasFilter(String FilterName) {
248 bool ret = GlobalsPINVOKE.PDFDocument_HasFilter(swigCPtr, FilterName);
250 return ret;
251 }
252
253 public PDFStreamFilter GetFilter(String FilterName) {
254 MemoryManager mMan = MemoryManager.GetMemoryManager();
255 MemoryTransaction mTrans = mMan.GetCurrentTransaction(); // MemoryTransaction #25
256 IntPtr ptr = GlobalsPINVOKE.PDFDocument_GetFilter(swigCPtr, FilterName);
257
258 PDFStreamFilter ret = null;
259 if (null != mTrans)
260 {
261 mTrans.AddObject(Teigha.Core.Helpers.odCreateObjectInternal<PDFStreamFilter>(typeof(PDFStreamFilter), ptr, true));
262 ret = Teigha.Core.Helpers.odCreateObjectInternal<PDFStreamFilter>(typeof(PDFStreamFilter), ptr, false);
263 }
264 else
265 {
266 ret = Teigha.Core.Helpers.odCreateObjectInternal<PDFStreamFilter>(typeof(PDFStreamFilter), ptr, true);
267 }
268
270 return ret;
271}
272
273}
274
275}
static global::System.Exception Retrieve()
static void PDFDocument_setUseQPDF(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2)
static void PDFDocument_setTmpStream(global::System.Runtime.InteropServices.HandleRef jarg1, HandleRef jarg2)
static IntPtr PDFDocument_GetFilter(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static bool PDFDocument_setDocumentInformation(global::System.Runtime.InteropServices.HandleRef jarg1, HandleRef jarg2)
static bool PDFDocument_Export(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static bool PDFDocument_HasFilter(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static void PDFDocument_setPdfA(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2)
static bool PDFDocument_isPdfA(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PDFDocument_useQPDF(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PDFDocument_encodingFlateEnabled(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PDFDocument_enableFlateEncoding(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2)
static void PDFDocument_enableEncodingASCIIHEX(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2)
static bool PDFDocument_encodingTIFFEnabled(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PDFDocument_encodingEnabled(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PDFDocument_encodingDCTEnabled(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool PDFDocument_AddObject(global::System.Runtime.InteropServices.HandleRef jarg1, HandleRef jarg2)
static bool PDFDocument_encodingASCIIHEXEnabled(global::System.Runtime.InteropServices.HandleRef jarg1)
static String PDFDocument_getUniqueTempPath(global::System.Runtime.InteropServices.HandleRef jarg1)
static IntPtr PDFDocument_Root(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PDFDocument_enableEncoding(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2)
static bool PDFDocument_RegistryFilter(global::System.Runtime.InteropServices.HandleRef jarg1, HandleRef jarg2)
static global::System.IntPtr PDFDocument_getNextObjectID(global::System.Runtime.InteropServices.HandleRef jarg1)
static void delete_PDFDocument(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PDFDocument_enableEncodingDCT(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2)
static global::System.IntPtr PDFDocument_getVersion(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PDFDocument_clearDictionaries(global::System.Runtime.InteropServices.HandleRef jarg1)
static String PDFDocument_getUniqueKey(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PDFDocument_enableTIFFEncoding(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2)
static bool PDFDocument_setRoot(global::System.Runtime.InteropServices.HandleRef jarg1, HandleRef jarg2)
static IntPtr PDFDocument_getDocumentInformation(global::System.Runtime.InteropServices.HandleRef jarg1)
static void PDFDocument_RemoveObject(global::System.Runtime.InteropServices.HandleRef jarg1, HandleRef jarg2)
static global::System.IntPtr PDFDocument_getLastObjectID(global::System.Runtime.InteropServices.HandleRef jarg1)
static HandleRef getCPtr(OdStreamBuf obj)
Definition: OdStreamBuf.cs:25
static HandleRef getCPtr(PDFCatalogDictionary obj)
virtual bool Export(PDFIStream pStream, PDFVersion ver)
Definition: PDFDocument.cs:160
static HandleRef getCPtr(PDFDocument obj)
Definition: PDFDocument.cs:26
void setTmpStream(OdStreamBuf pTmpStream)
Definition: PDFDocument.cs:72
bool setRoot(PDFCatalogDictionary pObj)
Definition: PDFDocument.cs:177
PDFDocument(IntPtr cPtr, bool cMemoryOwn)
Definition: PDFDocument.cs:21
bool setDocumentInformation(PDFDocumentInformation pDI)
Definition: PDFDocument.cs:203
void RemoveObject(PDFObject pObj)
Definition: PDFDocument.cs:172
void enableEncodingDCT(bool bEnable)
Definition: PDFDocument.cs:127
PDFStreamFilter GetFilter(String FilterName)
Definition: PDFDocument.cs:253
void enableEncoding(bool bEnable)
Definition: PDFDocument.cs:83
bool HasFilter(String FilterName)
Definition: PDFDocument.cs:247
bool AddObject(PDFObject pObj)
Definition: PDFDocument.cs:166
PDFCatalogDictionary Root()
Definition: PDFDocument.cs:183
PDFDocumentInformation getDocumentInformation()
Definition: PDFDocument.cs:209
bool RegistryFilter(PDFStreamFilter pFilter)
Definition: PDFDocument.cs:241
virtual void Dispose(bool disposing)
Definition: PDFDocument.cs:39
PDFObjectID getNextObjectID()
Definition: PDFDocument.cs:229
void setUseQPDF(bool bEnable)
Definition: PDFDocument.cs:149
void setPdfA(bool bEnable)
Definition: PDFDocument.cs:138
void enableFlateEncoding(bool bEnable)
Definition: PDFDocument.cs:94
void enableTIFFEncoding(bool bEnable)
Definition: PDFDocument.cs:105
PDFVersion getVersion()
Definition: PDFDocument.cs:154
void enableEncodingASCIIHEX(bool bEnable)
Definition: PDFDocument.cs:116
PDFObjectID getLastObjectID()
Definition: PDFDocument.cs:235
static HandleRef getCPtr(PDFDocumentInformation obj)
static HandleRef getCPtr(PDFIStream obj)
Definition: PDFIStream.cs:25
static HandleRef getCPtr(PDFObject obj)
Definition: PDFObject.cs:25
static HandleRef getCPtr(PDFStreamFilter obj)
static HandleRef getCPtr(PDFVersion obj)
Definition: PDFVersion.cs:26