1 package org.kuali.ole.deliver.batch;
2
3 import com.lowagie.text.*;
4 import com.lowagie.text.Font;
5 import com.lowagie.text.pdf.PdfPCell;
6 import com.lowagie.text.pdf.PdfPTable;
7 import com.lowagie.text.pdf.PdfWriter;
8 import org.kuali.ole.PropertyUtil;
9 import java.awt.*;
10 import java.io.FileOutputStream;
11 import java.io.OutputStream;
12 import java.util.Date;
13
14
15
16
17
18
19
20
21 public class OleDeliverNoticeService {
22
23 public boolean createPdf(OleNoticeBo noticeBo){
24 boolean result = false;
25 OutputStream outputStream = null;
26 String fileName = noticeBo.getNoticeName()+"/"+noticeBo.getItemId();
27 String directory = PropertyUtil.getPropertyUtil().getProperty("ole.batch.email.notices");
28 try{
29 Document document = new Document(PageSize.A4);
30 outputStream = new FileOutputStream(directory+"/"+fileName+".pdf");
31 PdfWriter writer = PdfWriter.getInstance(document, outputStream);
32 Font boldFont = new Font(Font.TIMES_ROMAN, 15, Font.BOLD);
33 Font ver_15_normal = FontFactory.getFont("VERDANA", 15, 0);
34 document.open();
35 document.newPage();
36
37
38
39
40 Paragraph paraGraph = new Paragraph();
41 paraGraph.add(new Chunk(noticeBo.getNoticeName(),boldFont));
42 paraGraph.add(Chunk.NEWLINE);
43 document.add(paraGraph);
44 PdfPTable pdfTable =new PdfPTable(3);
45 PdfPCell pdfPCell = new PdfPCell(new Paragraph("Circulation Location / Library Name"));
46 pdfPCell.setBorder(pdfPCell.NO_BORDER);
47 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
48 pdfTable.addCell(pdfPCell);
49 pdfPCell = new PdfPCell(new Paragraph(":"));
50 pdfPCell.setBorder(pdfPCell.NO_BORDER);
51 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
52 pdfTable.addCell(pdfPCell);
53 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getCirculationDeskName())));
54 pdfPCell.setBorder(pdfPCell.NO_BORDER);
55 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
56 pdfTable.addCell(pdfPCell);
57 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Address")));
58 pdfPCell.setBorder(pdfPCell.NO_BORDER);
59 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
60 pdfTable.addCell(pdfPCell);
61 pdfPCell = new PdfPCell(new Paragraph(":"));
62 pdfPCell.setBorder(pdfPCell.NO_BORDER);
63 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
64 pdfTable.addCell(pdfPCell);
65 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getCirculationDeskAddress())));
66 pdfPCell.setBorder(pdfPCell.NO_BORDER);
67 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
68 pdfTable.addCell(pdfPCell);
69 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Email")));
70 pdfPCell.setBorder(pdfPCell.NO_BORDER);
71 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
72 pdfTable.addCell(pdfPCell);
73 pdfPCell = new PdfPCell(new Paragraph(":"));
74 pdfPCell.setBorder(pdfPCell.NO_BORDER);
75 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
76 pdfTable.addCell(pdfPCell);
77 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getCirculationDeskEmailAddress())));
78 pdfPCell.setBorder(pdfPCell.NO_BORDER);
79 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
80 pdfTable.addCell(pdfPCell);
81 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Phone #")));
82 pdfPCell.setBorder(pdfPCell.NO_BORDER);
83 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
84 pdfTable.addCell(pdfPCell);
85 pdfPCell = new PdfPCell(new Paragraph(":"));
86 pdfPCell.setBorder(pdfPCell.NO_BORDER);
87 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
88 pdfTable.addCell(pdfPCell);
89 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getCirculationDeskPhoneNumber())));
90 pdfPCell.setBorder(pdfPCell.NO_BORDER);
91 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
92 pdfTable.addCell(pdfPCell);
93 document.add(pdfTable);
94 paraGraph = new Paragraph();
95 paraGraph.add(Chunk.NEWLINE);
96 document.add(paraGraph);
97
98
99 paraGraph = new Paragraph();
100 paraGraph.add(new Chunk("Addressee",boldFont));
101 paraGraph.add(Chunk.NEWLINE);
102 document.add(paraGraph);
103 pdfTable =new PdfPTable(3);
104 pdfPCell = new PdfPCell(new Paragraph("Borrower Name"));
105 pdfPCell.setBorder(pdfPCell.NO_BORDER);
106 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
107 pdfTable.addCell(pdfPCell);
108 pdfPCell = new PdfPCell(new Paragraph(":"));
109 pdfPCell.setBorder(pdfPCell.NO_BORDER);
110 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
111 pdfTable.addCell(pdfPCell);
112 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getPatronName()==null?"":noticeBo.getPatronName())));
113 pdfPCell.setBorder(pdfPCell.NO_BORDER);
114 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
115 pdfTable.addCell(pdfPCell);
116 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Address")));
117 pdfPCell.setBorder(pdfPCell.NO_BORDER);
118 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
119 pdfTable.addCell(pdfPCell);
120 pdfPCell = new PdfPCell(new Paragraph(":"));
121 pdfPCell.setBorder(pdfPCell.NO_BORDER);
122 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
123 pdfTable.addCell(pdfPCell);
124 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getPatronAddress()==null?"":noticeBo.getPatronAddress())));
125 pdfPCell.setBorder(pdfPCell.NO_BORDER);
126 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
127 pdfTable.addCell(pdfPCell);
128 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Email")));
129 pdfPCell.setBorder(pdfPCell.NO_BORDER);
130 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
131 pdfTable.addCell(pdfPCell);
132 pdfPCell = new PdfPCell(new Paragraph(":"));
133 pdfPCell.setBorder(pdfPCell.NO_BORDER);
134 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
135 pdfTable.addCell(pdfPCell);
136 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getPatronEmailAddress()==null?"":noticeBo.getPatronEmailAddress())));
137 pdfPCell.setBorder(pdfPCell.NO_BORDER);
138 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
139 pdfTable.addCell(pdfPCell);
140 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Phone #")));
141 pdfPCell.setBorder(pdfPCell.NO_BORDER);
142 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
143 pdfTable.addCell(pdfPCell);
144 pdfPCell = new PdfPCell(new Paragraph(":"));
145 pdfPCell.setBorder(pdfPCell.NO_BORDER);
146 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
147 pdfTable.addCell(pdfPCell);
148 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getPatronPhoneNumber()==null?"":noticeBo.getPatronPhoneNumber())));
149 pdfPCell.setBorder(pdfPCell.NO_BORDER);
150 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
151 pdfTable.addCell(pdfPCell);
152 document.add(pdfTable);
153 paraGraph = new Paragraph();
154 paraGraph.add(Chunk.NEWLINE);
155 document.add(paraGraph);
156
157
158 paraGraph = new Paragraph();
159 paraGraph.add(new Chunk(noticeBo.getNoticeName(),boldFont));
160 paraGraph.setAlignment(Element.ALIGN_CENTER);
161 paraGraph.add(Chunk.NEWLINE);
162 document.add(paraGraph);
163
164
165
166 paraGraph = new Paragraph();
167 paraGraph.add(new Chunk(noticeBo.getNoticeSpecificContent(),boldFont));
168 paraGraph.setAlignment(Element.ALIGN_CENTER);
169 paraGraph.add(Chunk.NEWLINE);
170 document.add(paraGraph);
171
172 paraGraph = new Paragraph();
173 paraGraph.add(new Chunk("Title/item information",boldFont));
174 paraGraph.add(Chunk.NEWLINE);
175 document.add(paraGraph);
176 pdfTable =new PdfPTable(3);
177 pdfPCell = new PdfPCell(new Paragraph("Title "));
178 pdfPCell.setBorder(pdfPCell.NO_BORDER);
179 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
180 pdfTable.addCell(pdfPCell);
181 pdfPCell = new PdfPCell(new Paragraph(":"));
182 pdfPCell.setBorder(pdfPCell.NO_BORDER);
183 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
184 pdfTable.addCell(pdfPCell);
185 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getTitle()==null?"":noticeBo.getTitle())));
186 pdfPCell.setBorder(pdfPCell.NO_BORDER);
187 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
188 pdfTable.addCell(pdfPCell);
189 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Author ")));
190 pdfPCell.setBorder(pdfPCell.NO_BORDER);
191 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
192 pdfTable.addCell(pdfPCell);
193 pdfPCell = new PdfPCell(new Paragraph(":"));
194 pdfPCell.setBorder(pdfPCell.NO_BORDER);
195 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
196 pdfTable.addCell(pdfPCell);
197 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getAuthor()==null?"":noticeBo.getAuthor())));
198 pdfPCell.setBorder(pdfPCell.NO_BORDER);
199 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
200 pdfTable.addCell(pdfPCell);
201 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Volume/Issue/Copy # ")));
202 pdfPCell.setBorder(pdfPCell.NO_BORDER);
203 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
204 pdfTable.addCell(pdfPCell);
205 pdfPCell = new PdfPCell(new Paragraph(":"));
206 pdfPCell.setBorder(pdfPCell.NO_BORDER);
207 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
208 pdfTable.addCell(pdfPCell);
209 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getVolumeNumber()==null?"":noticeBo.getVolumeNumber())));
210 pdfPCell.setBorder(pdfPCell.NO_BORDER);
211 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
212 pdfTable.addCell(pdfPCell);
213 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Library shelving location ")));
214 pdfPCell.setBorder(pdfPCell.NO_BORDER);
215 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
216 pdfTable.addCell(pdfPCell);
217 pdfPCell = new PdfPCell(new Paragraph(":"));
218 pdfPCell.setBorder(pdfPCell.NO_BORDER);
219 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
220 pdfTable.addCell(pdfPCell);
221 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getItemShelvingLocation()==null?"":noticeBo.getItemShelvingLocation())));
222 pdfPCell.setBorder(pdfPCell.NO_BORDER);
223 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
224 pdfTable.addCell(pdfPCell);
225 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Call # ")));
226 pdfPCell.setBorder(pdfPCell.NO_BORDER);
227 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
228 pdfTable.addCell(pdfPCell);
229 pdfPCell = new PdfPCell(new Paragraph(":"));
230 pdfPCell.setBorder(pdfPCell.NO_BORDER);
231 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
232 pdfTable.addCell(pdfPCell);
233 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getItemCallNumber()==null?"":noticeBo.getItemCallNumber())));
234 pdfPCell.setBorder(pdfPCell.NO_BORDER);
235 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
236 pdfTable.addCell(pdfPCell);
237 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Item barcode")));
238 pdfPCell.setBorder(pdfPCell.NO_BORDER);
239 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
240 pdfTable.addCell(pdfPCell);
241 pdfPCell = new PdfPCell(new Paragraph(":"));
242 pdfPCell.setBorder(pdfPCell.NO_BORDER);
243 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
244 pdfTable.addCell(pdfPCell);
245 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getItemId()==null?"":noticeBo.getItemId())));
246 pdfPCell.setBorder(pdfPCell.NO_BORDER);
247 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
248 pdfTable.addCell(pdfPCell);
249 document.add(pdfTable);
250 paraGraph = new Paragraph();
251 paraGraph.add(Chunk.NEWLINE);
252 document.add(paraGraph);
253
254
255
256
257
258
259 if(noticeBo.getNoticeName().equals("Recall Notice")){
260 pdfTable =new PdfPTable(3);
261 pdfPCell = new PdfPCell(new Paragraph("Original Due Date"));
262 pdfPCell.setBorder(pdfPCell.NO_BORDER);
263 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
264 pdfTable.addCell(pdfPCell);
265 pdfPCell = new PdfPCell(new Paragraph(":"));
266 pdfPCell.setBorder(pdfPCell.NO_BORDER);
267 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
268 pdfTable.addCell(pdfPCell);
269 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getOriginalDueDate()== null ? "":noticeBo.getOriginalDueDate().toString())));
270 pdfPCell.setBorder(pdfPCell.NO_BORDER);
271 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
272 pdfTable.addCell(pdfPCell);
273 pdfPCell = new PdfPCell(new Paragraph(new Chunk("New Due Date")));
274 pdfPCell.setBorder(pdfPCell.NO_BORDER);
275 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
276 pdfTable.addCell(pdfPCell);
277 pdfPCell = new PdfPCell(new Paragraph(":"));
278 pdfPCell.setBorder(pdfPCell.NO_BORDER);
279 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
280 pdfTable.addCell(pdfPCell);
281 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getNewDueDate()== null ? "":noticeBo.getNewDueDate().toString())));
282 pdfPCell.setBorder(pdfPCell.NO_BORDER);
283 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
284 pdfTable.addCell(pdfPCell);
285 document.add(pdfTable);
286 paraGraph = new Paragraph();
287 paraGraph.add(Chunk.NEWLINE);
288 document.add(paraGraph);
289 } else if(noticeBo.getNoticeName().equals("Hold Notice")){
290 pdfTable =new PdfPTable(3);
291 pdfPCell = new PdfPCell(new Paragraph("Pick Up Location"));
292 pdfPCell.setBorder(pdfPCell.NO_BORDER);
293 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
294 pdfTable.addCell(pdfPCell);
295 pdfPCell = new PdfPCell(new Paragraph(":"));
296 pdfPCell.setBorder(pdfPCell.NO_BORDER);
297 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
298 pdfTable.addCell(pdfPCell);
299 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getPickUpLocation())));
300 pdfPCell.setBorder(pdfPCell.NO_BORDER);
301 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
302 pdfTable.addCell(pdfPCell);
303 pdfPCell = new PdfPCell(new Paragraph("Circulation Location / Library Name"));
304 pdfPCell.setBorder(pdfPCell.NO_BORDER);
305 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
306 pdfTable.addCell(pdfPCell);
307 pdfPCell = new PdfPCell(new Paragraph(":"));
308 pdfPCell.setBorder(pdfPCell.NO_BORDER);
309 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
310 pdfTable.addCell(pdfPCell);
311 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getCirculationDeskName())));
312 pdfPCell.setBorder(pdfPCell.NO_BORDER);
313 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
314 pdfTable.addCell(pdfPCell);
315 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Address")));
316 pdfPCell.setBorder(pdfPCell.NO_BORDER);
317 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
318 pdfTable.addCell(pdfPCell);
319 pdfPCell = new PdfPCell(new Paragraph(":"));
320 pdfPCell.setBorder(pdfPCell.NO_BORDER);
321 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
322 pdfTable.addCell(pdfPCell);
323 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getCirculationDeskAddress())));
324 pdfPCell.setBorder(pdfPCell.NO_BORDER);
325 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
326 pdfTable.addCell(pdfPCell);
327 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Email")));
328 pdfPCell.setBorder(pdfPCell.NO_BORDER);
329 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
330 pdfTable.addCell(pdfPCell);
331 pdfPCell = new PdfPCell(new Paragraph(":"));
332 pdfPCell.setBorder(pdfPCell.NO_BORDER);
333 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
334 pdfTable.addCell(pdfPCell);
335 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getCirculationDeskEmailAddress())));
336 pdfPCell.setBorder(pdfPCell.NO_BORDER);
337 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
338 pdfTable.addCell(pdfPCell);
339 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Phone #")));
340 pdfPCell.setBorder(pdfPCell.NO_BORDER);
341 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
342 pdfTable.addCell(pdfPCell);
343 pdfPCell = new PdfPCell(new Paragraph(":"));
344 pdfPCell.setBorder(pdfPCell.NO_BORDER);
345 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
346 pdfTable.addCell(pdfPCell);
347 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getCirculationDeskPhoneNumber())));
348 pdfPCell.setBorder(pdfPCell.NO_BORDER);
349 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
350 pdfTable.addCell(pdfPCell);
351 document.add(pdfTable);
352 paraGraph = new Paragraph();
353 paraGraph.add(Chunk.NEWLINE);
354 document.add(paraGraph);
355 pdfPCell = new PdfPCell(new Paragraph(new Chunk("Item Will Be Held until")));
356 pdfPCell.setBorder(pdfPCell.NO_BORDER);
357 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
358 pdfTable.addCell(pdfPCell);
359 pdfPCell = new PdfPCell(new Paragraph(":"));
360 pdfPCell.setBorder(pdfPCell.NO_BORDER);
361 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_LEFT);
362 pdfTable.addCell(pdfPCell);
363 pdfPCell = new PdfPCell(new Paragraph(new Chunk(noticeBo.getOnHoldDueDate().toString())));
364 pdfPCell.setBorder(pdfPCell.NO_BORDER);
365 pdfPCell.setHorizontalAlignment(pdfPCell.ALIGN_JUSTIFIED);
366 pdfTable.addCell(pdfPCell);
367 document.add(pdfTable);
368 paraGraph = new Paragraph();
369 paraGraph.add(Chunk.NEWLINE);
370 document.add(paraGraph);
371 }
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387 ver_15_normal.setColor(Color.blue);
388 ver_15_normal.setStyle(Font.UNDERLINE);
389 Anchor anchor = new Anchor("MyAccount", ver_15_normal);
390 anchor.setName("My Account");
391 String url = PropertyUtil.getPropertyUtil().getProperty("ole.rice2.url.base");
392 anchor.setReference(url+"/portal.do?channelTitle=MyAccount&channelUrl="+url+"/kr-krad/myaccountcontroller?viewId=RenewalItemView&methodToCall=start");
393 paraGraph.add(anchor);
394 paraGraph.setAlignment(Element.ALIGN_CENTER);
395 document.add(paraGraph);
396
397
398 outputStream.flush();
399 document.close();
400 outputStream.close();
401 }catch (Exception ex){
402
403 }
404 return result;
405 }
406
407
408
409 }