Preface |
|
xix | |
Acknowledgments |
|
xxi | |
about this book |
|
xxiii | |
|
|
1 | (96) |
|
|
3 | (27) |
|
|
5 | (5) |
|
|
5 | (2) |
|
|
7 | (2) |
|
|
9 | (1) |
|
|
10 | (4) |
|
Running the examples in the book |
|
|
11 | (1) |
|
Experimenting with the iText toolbox |
|
|
12 | (2) |
|
|
14 | (15) |
|
|
15 | (1) |
|
|
16 | (2) |
|
|
18 | (5) |
|
Producing and processing interactive documents |
|
|
23 | (5) |
|
Making the dream come true |
|
|
28 | (1) |
|
|
29 | (1) |
|
|
30 | (43) |
|
Generating a PDF document in five steps |
|
|
31 | (17) |
|
Creating a new document object |
|
|
32 | (3) |
|
Getting a DocWriter instance |
|
|
35 | (2) |
|
|
37 | (5) |
|
|
42 | (4) |
|
|
46 | (2) |
|
Manipulating existing PDF files |
|
|
48 | (20) |
|
Reading an existing PDF file |
|
|
49 | (5) |
|
Using PdfStamper to change document properties |
|
|
54 | (1) |
|
Using PdfStamper to add content |
|
|
55 | (5) |
|
Introducing imported pages |
|
|
60 | (1) |
|
Using imported pages with PdfWriter |
|
|
61 | (3) |
|
Manipulating existing PDF files with PdfCopy |
|
|
64 | (2) |
|
Concatenating forms with PdfCopyFields |
|
|
66 | (1) |
|
Summary of the manipulation classes |
|
|
67 | (1) |
|
Creating PDF in multiple passes |
|
|
68 | (4) |
|
|
69 | (1) |
|
|
70 | (1) |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
73 | (24) |
|
|
74 | (5) |
|
|
75 | (2) |
|
|
77 | (1) |
|
The intellectual property of the PDF specification |
|
|
78 | (1) |
|
|
79 | (6) |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
81 | (1) |
|
PDFs preserving native editing capabilities |
|
|
81 | (1) |
|
PDF types that became an ISO standard |
|
|
81 | (2) |
|
|
83 | (1) |
|
|
84 | (1) |
|
|
84 | (1) |
|
|
85 | (10) |
|
|
86 | (2) |
|
PDF content and compression |
|
|
88 | (2) |
|
|
90 | (5) |
|
|
95 | (2) |
|
Part 2 Basic Building Blocks |
|
|
97 | (124) |
|
|
99 | (36) |
|
Wrapping Strings in text elements |
|
|
100 | (5) |
|
The atomic building block: com.lowagie.text.Chunk |
|
|
101 | (2) |
|
An ArrayList of Chunks: com.lowagie.text.Phrase |
|
|
103 | (1) |
|
A sequence of Phrases: com.lowagie.text.Paragraph |
|
|
104 | (1) |
|
Adding extra functionality to text elements |
|
|
105 | (6) |
|
External and internal links: com.lowagie.text.Anchor |
|
|
106 | (1) |
|
Lists and ListItems: com.lowagie.text.List/ListItem |
|
|
107 | (2) |
|
Automatic bookmarking: com.lowagie.text.Chapter/Section |
|
|
109 | (2) |
|
|
111 | (7) |
|
|
111 | (1) |
|
Lines: underlining and striking through text |
|
|
112 | (3) |
|
TextRise: sub-and superscript |
|
|
115 | (1) |
|
Simulating italic fonts: skewing text |
|
|
116 | (1) |
|
Changing font and background colors |
|
|
117 | (1) |
|
Simulating bold fonts: stroking vs. filling |
|
|
117 | (1) |
|
Chunks and space distribution |
|
|
118 | (4) |
|
|
119 | (1) |
|
|
120 | (1) |
|
Changing the Char Space ratio |
|
|
121 | (1) |
|
|
122 | (3) |
|
|
123 | (1) |
|
|
124 | (1) |
|
Generic Chunk functionality |
|
|
125 | (4) |
|
Drawing custom backgrounds and lines |
|
|
125 | (1) |
|
Implementing custom functionality |
|
|
126 | (1) |
|
|
127 | (2) |
|
|
129 | (5) |
|
|
134 | (1) |
|
|
135 | (27) |
|
|
136 | (4) |
|
BMP, EPS, GIF, JPEG, PNG, TIFF, and WMF |
|
|
137 | (2) |
|
|
139 | (1) |
|
|
139 | (1) |
|
Working with Java.awt.Image |
|
|
140 | (3) |
|
Byte arrays with image data |
|
|
143 | (4) |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
146 | (1) |
|
Working with com.lowagie.text.pdf.PdfTemplate |
|
|
147 | (1) |
|
|
147 | (11) |
|
Adding images to the document |
|
|
147 | (4) |
|
Translating, scaling, and rotating images |
|
|
151 | (5) |
|
|
156 | (2) |
|
|
158 | (3) |
|
Getting the Image instance |
|
|
158 | (1) |
|
Setting the border, the alignment, and the dimensions |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
162 | (31) |
|
|
163 | (23) |
|
|
163 | (1) |
|
Changing the width and alignment of a PdfPTable |
|
|
164 | (3) |
|
Adding PdfPCells to a PdfPTable |
|
|
167 | (9) |
|
Special PdfPCell constructors |
|
|
176 | (2) |
|
Working with large tables |
|
|
178 | (4) |
|
Adding a PdfPTable at an absolute position |
|
|
182 | (4) |
|
Alternatives to PdfPTable |
|
|
186 | (3) |
|
Composing a study guide (part 1) |
|
|
189 | (3) |
|
|
189 | (1) |
|
|
190 | (2) |
|
|
192 | (1) |
|
|
193 | (28) |
|
Retrieving the current vertical position |
|
|
194 | (3) |
|
Adding text to ColumnText |
|
|
197 | (9) |
|
Different ways to add text to a column |
|
|
197 | (2) |
|
Keeping paragraphs together |
|
|
199 | (2) |
|
Adding more than one column to a page |
|
|
201 | (5) |
|
Composing ColumnText with other building blocks |
|
|
206 | (5) |
|
Combining text mode with images and tables |
|
|
207 | (2) |
|
ColumnText in composite mode |
|
|
209 | (2) |
|
Automatic columns with MultiColumnText |
|
|
211 | (5) |
|
Regular columns with MultiColumnText |
|
|
211 | (2) |
|
Irregular columns with MultiColumnText |
|
|
213 | (3) |
|
Composing a study guide (part 2) |
|
|
216 | (3) |
|
|
219 | (2) |
|
Part 3 Pdf Text and Graphics |
|
|
221 | (172) |
|
|
223 | (34) |
|
|
224 | (7) |
|
Using the right terminology |
|
|
225 | (1) |
|
|
226 | (5) |
|
|
231 | (17) |
|
|
232 | (1) |
|
Class BaseFont and Type 1 fonts |
|
|
233 | (5) |
|
|
238 | (1) |
|
Working with TrueType fonts |
|
|
239 | (4) |
|
Working with OpenType fonts |
|
|
243 | (5) |
|
|
248 | (7) |
|
|
248 | (3) |
|
Introducing Chinese, Japanese, Korean (CJK) fonts |
|
|
251 | (1) |
|
|
252 | (2) |
|
Using TrueType collections |
|
|
254 | (1) |
|
|
255 | (2) |
|
|
257 | (26) |
|
|
258 | (4) |
|
|
258 | (2) |
|
Writing from right to left |
|
|
260 | (2) |
|
Sending a message of peace (part 1) |
|
|
262 | (2) |
|
|
264 | (7) |
|
|
265 | (3) |
|
|
268 | (3) |
|
Automating font creation and selection |
|
|
271 | (8) |
|
Getting a Font object from the FontFactory |
|
|
271 | (5) |
|
|
276 | (3) |
|
Sending a message of peace (part 2) |
|
|
279 | (3) |
|
|
282 | (1) |
|
Constructing and painting paths |
|
|
283 | (42) |
|
Path construction and painting operators |
|
|
284 | (10) |
|
Seven path construction operators |
|
|
284 | (2) |
|
|
286 | (8) |
|
Working with iText's direct content |
|
|
294 | (9) |
|
|
295 | (1) |
|
PdfPTable and PdfPCell events |
|
|
296 | (7) |
|
|
303 | (10) |
|
|
303 | (2) |
|
Changing the characteristics of a line |
|
|
305 | (8) |
|
Changing the coordinate system |
|
|
313 | (8) |
|
|
313 | (3) |
|
Positioning external, objects |
|
|
316 | (5) |
|
Drawing a map of a city (part 1) |
|
|
321 | (3) |
|
|
321 | (2) |
|
|
323 | (1) |
|
|
324 | (1) |
|
|
325 | (31) |
|
Adding color to PDF files |
|
|
326 | (9) |
|
|
326 | (2) |
|
|
328 | (1) |
|
|
329 | (5) |
|
Using color with basic building blocks |
|
|
334 | (1) |
|
The transparent imaging model |
|
|
335 | (6) |
|
|
336 | (2) |
|
|
338 | (2) |
|
Applying a soft mask to an image |
|
|
340 | (1) |
|
|
341 | (3) |
|
|
344 | (9) |
|
|
344 | (6) |
|
Convenience methods to position and show text |
|
|
350 | (3) |
|
The map of Foobar (part 2) |
|
|
353 | (2) |
|
|
355 | (1) |
|
Drawing to Java Graphics2D |
|
|
356 | (37) |
|
Obtaining a Java.awt.Graphics2D instance |
|
|
357 | (11) |
|
A simple example from Sun's tutorial |
|
|
358 | (4) |
|
Mapping AWTfonts to PDFfonts |
|
|
362 | (3) |
|
Drawing glyph shapes instead of using a PDF font |
|
|
365 | (3) |
|
Two-dimensional graphics in the real world |
|
|
368 | (6) |
|
Exporting Swing components to PDF |
|
|
368 | (3) |
|
Drawing charts with FreeChart |
|
|
371 | (3) |
|
|
374 | (11) |
|
Making content visible or invisible |
|
|
374 | (1) |
|
Adding structure to layers |
|
|
375 | (3) |
|
|
378 | (2) |
|
Optional content membership |
|
|
380 | (2) |
|
Changing the state of a layer with an action |
|
|
382 | (2) |
|
Optional content in XObjects and annotations |
|
|
384 | (1) |
|
Enhancing the map of Foobar |
|
|
385 | (7) |
|
Defining the layers for the map and the street names |
|
|
386 | (2) |
|
Combining iText and Apache Batik |
|
|
388 | (1) |
|
Adding tourist information to the map |
|
|
389 | (3) |
|
|
392 | (1) |
|
|
393 | (198) |
|
|
395 | (30) |
|
Changing viewer preferences |
|
|
396 | (5) |
|
|
397 | (1) |
|
|
398 | (1) |
|
|
399 | (2) |
|
|
401 | (4) |
|
|
402 | (2) |
|
Changing the thumbnail image |
|
|
404 | (1) |
|
|
405 | (2) |
|
|
407 | (8) |
|
|
407 | (2) |
|
Constructing an outline tree |
|
|
409 | (1) |
|
Adding actions to an outline tree |
|
|
410 | (1) |
|
Retrieving bookmarks from an existing PDF file |
|
|
411 | (2) |
|
Manipulating bookmarks in existing PDF files |
|
|
413 | (2) |
|
|
415 | (6) |
|
Actions to go to an internal destination |
|
|
415 | (2) |
|
Actions to go to an external destination |
|
|
417 | (1) |
|
Triggering actions from events |
|
|
418 | (2) |
|
Adding JavaScript to a PDF document |
|
|
420 | (1) |
|
|
420 | (1) |
|
Enhancing the course catalog |
|
|
421 | (3) |
|
|
424 | (1) |
|
|
425 | (39) |
|
|
426 | (6) |
|
|
426 | (1) |
|
|
427 | (4) |
|
|
431 | (1) |
|
Common page event functionality |
|
|
432 | (13) |
|
Overview of the PdfPageEvent methods |
|
|
432 | (1) |
|
Adding a header and a footer |
|
|
433 | (2) |
|
|
435 | (3) |
|
|
438 | (2) |
|
Creating an automatic slide show |
|
|
440 | (2) |
|
Automatically creating bookmarks |
|
|
442 | (1) |
|
Automatically creating a table of contents |
|
|
443 | (2) |
|
Alternative XML solutions |
|
|
445 | (16) |
|
Writing a letter on company stationery |
|
|
445 | (6) |
|
|
451 | (5) |
|
|
456 | (2) |
|
Using HtmlWorker to parse HTML snippets |
|
|
458 | (3) |
|
Enhancing the course catalog (part 2) |
|
|
461 | (2) |
|
|
463 | (1) |
|
Creating annotations and fields |
|
|
464 | (37) |
|
|
465 | (10) |
|
|
465 | (5) |
|
Other types of annotations |
|
|
470 | (4) |
|
Adding annotations to a chunk or image |
|
|
474 | (1) |
|
|
475 | (13) |
|
|
476 | (6) |
|
|
482 | (4) |
|
|
486 | (2) |
|
|
488 | (10) |
|
|
488 | (3) |
|
Adding actions to the pushbuttons |
|
|
491 | (5) |
|
|
496 | (2) |
|
Comparing HTML and PDF forms |
|
|
498 | (2) |
|
|
500 | (1) |
|
Filling and signing AcroForms |
|
|
501 | (32) |
|
Filling in the fields of an AcroForm |
|
|
502 | (12) |
|
Retrieving information about the fields (part 1) |
|
|
503 | (2) |
|
|
505 | (3) |
|
Retrieving information from a field (part 2) |
|
|
508 | (2) |
|
|
510 | (1) |
|
Optimizing the flattening process |
|
|
511 | (3) |
|
Working with FDF and XFDF files |
|
|
514 | (4) |
|
Reading and writing FDFfiles |
|
|
514 | (3) |
|
|
517 | (1) |
|
|
518 | (11) |
|
Adding a signature field to a PDF file |
|
|
518 | (2) |
|
Using public and private keys |
|
|
520 | (1) |
|
Generating keys and certificates |
|
|
521 | (2) |
|
|
523 | (6) |
|
|
529 | (3) |
|
|
532 | (1) |
|
iText in web applications |
|
|
533 | (29) |
|
Writing PDF to the ServletOutputStream: pitfalls |
|
|
534 | (16) |
|
Solving problems related to content type-related problems |
|
|
536 | (1) |
|
Troubleshooting the blank-page problem |
|
|
537 | (5) |
|
Problems with PDF generated from JSP |
|
|
542 | (1) |
|
Avoiding multiple hits per PDF |
|
|
543 | (2) |
|
Workaround for the timeout problem |
|
|
545 | (5) |
|
Putting the theory into practice |
|
|
550 | (11) |
|
A personalized course catalog |
|
|
550 | (3) |
|
Creating a learning agreement form |
|
|
553 | (6) |
|
Reading an PDF file in a JSP page |
|
|
559 | (2) |
|
|
561 | (1) |
|
|
562 | (29) |
|
|
563 | (11) |
|
|
563 | (1) |
|
The file structure of a PDF document |
|
|
564 | (5) |
|
|
569 | (1) |
|
Climbing up the object tree |
|
|
570 | (4) |
|
Extracting and editing text |
|
|
574 | (7) |
|
Reading a page's content stream |
|
|
574 | (2) |
|
Why iText doesn't do text extraction |
|
|
576 | (2) |
|
Why you shouldn't use PDF as a format for editing |
|
|
578 | (3) |
|
|
581 | (3) |
|
How to print a PDF file programmatically |
|
|
581 | (2) |
|
Printing a PDF file in a web application |
|
|
583 | (1) |
|
|
584 | (6) |
|
|
585 | (2) |
|
The learning agreement (revisited) |
|
|
587 | (3) |
|
|
590 | (1) |
appendix A: Class diagrams |
|
591 | (11) |
appendix B: Creating barcodes |
|
602 | (16) |
appendix C: Open parameters |
|
618 | (3) |
appendix D: Signing a PDF with a smart card |
|
621 | (3) |
appendix E: Dealing with exceptions |
|
624 | (6) |
appendix F: Pdf/X, Pdf/A, and tagged PDF |
|
630 | (8) |
appendix G: Resources |
|
638 | (4) |
index |
|
642 | |