_ConverterAgentStub.java
9.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.native2pdf.bmc;
import com.adobe.native2pdf.bmc.AppMonData;
import com.adobe.native2pdf.bmc.AppMonDataHelper;
import com.adobe.native2pdf.bmc.ByteArrayHelper;
import com.adobe.native2pdf.bmc.ConverterAgent;
import com.adobe.native2pdf.bmc.ResultStruct;
import com.adobe.native2pdf.bmc.ResultStructHelper;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Properties;
import org.omg.CORBA.MARSHAL;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Object;
import org.omg.CORBA.portable.ApplicationException;
import org.omg.CORBA.portable.Delegate;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.ObjectImpl;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.RemarshalException;
public class _ConverterAgentStub
extends ObjectImpl
implements ConverterAgent {
private static String[] __ids = new String[]{"IDL:com/adobe/native2pdf/bmc/ConverterAgent:1.0"};
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
public ResultStruct convertToPdf(String sourceFilePath, String destFilePath, String appName, int timeoutSeconds, byte[] securityConfig, String distillerJobOptionsName, byte[] appSpecificConfig, AppMonData appMonConfig, boolean applyWatermark, boolean createPDFAOCR, String jobIdentityId, int startPage, int endPage, String ocrlanguageChosen) {
InputStream $in = null;
try {
ResultStruct $result;
OutputStream $out = this._request("convertToPdf", true);
$out.write_wstring(sourceFilePath);
$out.write_wstring(destFilePath);
$out.write_wstring(appName);
$out.write_long(timeoutSeconds);
ByteArrayHelper.write($out, securityConfig);
$out.write_wstring(distillerJobOptionsName);
ByteArrayHelper.write($out, appSpecificConfig);
AppMonDataHelper.write($out, appMonConfig);
$out.write_boolean(applyWatermark);
$out.write_boolean(createPDFAOCR);
$out.write_wstring(jobIdentityId);
$out.write_long(startPage);
$out.write_long(endPage);
$out.write_wstring(ocrlanguageChosen);
$in = this._invoke($out);
ResultStruct resultStruct = $result = ResultStructHelper.read($in);
return resultStruct;
}
catch (ApplicationException $ex) {
$in = $ex.getInputStream();
String _id = $ex.getId();
throw new MARSHAL(_id);
}
catch (RemarshalException $rm) {
ResultStruct _id = this.convertToPdf(sourceFilePath, destFilePath, appName, timeoutSeconds, securityConfig, distillerJobOptionsName, appSpecificConfig, appMonConfig, applyWatermark, createPDFAOCR, jobIdentityId, startPage, endPage, ocrlanguageChosen);
return _id;
}
finally {
this._releaseReply($in);
}
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
public ResultStruct convertToPdfUsingOpenOffice(String sourceFilePath, String destFilePath, byte[] openOfficeData, int timeoutSeconds, String jobIdentityId) {
InputStream $in = null;
try {
ResultStruct $result;
OutputStream $out = this._request("convertToPdfUsingOpenOffice", true);
$out.write_wstring(sourceFilePath);
$out.write_wstring(destFilePath);
ByteArrayHelper.write($out, openOfficeData);
$out.write_long(timeoutSeconds);
$out.write_wstring(jobIdentityId);
$in = this._invoke($out);
ResultStruct resultStruct = $result = ResultStructHelper.read($in);
return resultStruct;
}
catch (ApplicationException $ex) {
$in = $ex.getInputStream();
String _id = $ex.getId();
throw new MARSHAL(_id);
}
catch (RemarshalException $rm) {
ResultStruct _id = this.convertToPdfUsingOpenOffice(sourceFilePath, destFilePath, openOfficeData, timeoutSeconds, jobIdentityId);
return _id;
}
finally {
this._releaseReply($in);
}
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
public ResultStruct convertHtmlToPdf(String url, String destFilePath, int timeoutSeconds, byte[] appSpecificConfig, int spideringLevel, String jobIdentityId) {
InputStream $in = null;
try {
ResultStruct $result;
OutputStream $out = this._request("convertHtmlToPdf", true);
$out.write_wstring(url);
$out.write_wstring(destFilePath);
$out.write_long(timeoutSeconds);
ByteArrayHelper.write($out, appSpecificConfig);
$out.write_long(spideringLevel);
$out.write_wstring(jobIdentityId);
$in = this._invoke($out);
ResultStruct resultStruct = $result = ResultStructHelper.read($in);
return resultStruct;
}
catch (ApplicationException $ex) {
$in = $ex.getInputStream();
String _id = $ex.getId();
throw new MARSHAL(_id);
}
catch (RemarshalException $rm) {
ResultStruct _id = this.convertHtmlToPdf(url, destFilePath, timeoutSeconds, appSpecificConfig, spideringLevel, jobIdentityId);
return _id;
}
finally {
this._releaseReply($in);
}
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
public ResultStruct convertImgToPdf(String sourceFilePath, String destFilePath, int timeoutSeconds, double pdfVersion, String jobIdentityId) {
InputStream $in = null;
try {
ResultStruct $result;
OutputStream $out = this._request("convertImgToPdf", true);
$out.write_wstring(sourceFilePath);
$out.write_wstring(destFilePath);
$out.write_long(timeoutSeconds);
$out.write_double(pdfVersion);
$out.write_wstring(jobIdentityId);
$in = this._invoke($out);
ResultStruct resultStruct = $result = ResultStructHelper.read($in);
return resultStruct;
}
catch (ApplicationException $ex) {
$in = $ex.getInputStream();
String _id = $ex.getId();
throw new MARSHAL(_id);
}
catch (RemarshalException $rm) {
ResultStruct _id = this.convertImgToPdf(sourceFilePath, destFilePath, timeoutSeconds, pdfVersion, jobIdentityId);
return _id;
}
finally {
this._releaseReply($in);
}
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
public boolean cleanUp() {
InputStream $in = null;
try {
boolean $result;
OutputStream $out = this._request("cleanUp", true);
$in = this._invoke($out);
boolean bl = $result = $in.read_boolean();
return bl;
}
catch (ApplicationException $ex) {
$in = $ex.getInputStream();
String _id = $ex.getId();
throw new MARSHAL(_id);
}
catch (RemarshalException $rm) {
boolean _id = this.cleanUp();
return _id;
}
finally {
this._releaseReply($in);
}
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
public ResultStruct convertSwfToPdf(String sourceFilePath, String destFilePath, int dpi, int timeoutSeconds, String jobIdentityId) {
InputStream $in = null;
try {
ResultStruct $result;
OutputStream $out = this._request("convertSwfToPdf", true);
$out.write_wstring(sourceFilePath);
$out.write_wstring(destFilePath);
$out.write_long(dpi);
$out.write_long(timeoutSeconds);
$out.write_wstring(jobIdentityId);
$in = this._invoke($out);
ResultStruct resultStruct = $result = ResultStructHelper.read($in);
return resultStruct;
}
catch (ApplicationException $ex) {
$in = $ex.getInputStream();
String _id = $ex.getId();
throw new MARSHAL(_id);
}
catch (RemarshalException $rm) {
ResultStruct _id = this.convertSwfToPdf(sourceFilePath, destFilePath, dpi, timeoutSeconds, jobIdentityId);
return _id;
}
finally {
this._releaseReply($in);
}
}
public String[] _ids() {
return (String[])__ids.clone();
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
private void readObject(ObjectInputStream s) throws IOException {
String str = s.readUTF();
String[] args = null;
Properties props = null;
ORB orb = ORB.init(args, props);
try {
Object obj = orb.string_to_object(str);
Delegate delegate = ((ObjectImpl)obj)._get_delegate();
this._set_delegate(delegate);
}
finally {
orb.destroy();
}
}
/*
* WARNING - Removed try catching itself - possible behaviour change.
*/
private void writeObject(ObjectOutputStream s) throws IOException {
String[] args = null;
Properties props = null;
ORB orb = ORB.init(args, props);
try {
String str = orb.object_to_string(this);
s.writeUTF(str);
}
finally {
orb.destroy();
}
}
}