iText in Action: Creating and Manipulating PDF

Bruno Lowagie

  • 出版商: Manning
  • 出版日期: 2006-12-01
  • 售價: $1,860
  • 貴賓價: 9.5$1,767
  • 語言: 英文
  • 頁數: 656
  • 裝訂: Paperback
  • ISBN: 1932394796
  • ISBN-13: 9781932394795
  • 已過版

買這商品的人也買了...

相關主題

商品描述

Description

"any developer that is making serious use of iText would be a fool not to buy this book."
-- Dave Gilbert, jfree.org

"Thorough and complete ... will be a long running, valuable resource for iText and PDF."
-- Alan Dennis, Software Architect, MyFamily.com

"One of the best technical books I have ever read! Great work!"
-- Oliver Zeigermann, Technical Trainer, CoreMedia AG

"I wholeheartedly recommend it."
-- Doug James, eReporting Team Lead, Benefitfocus.com, Inc.

"Impressive! It provides depth without all the noise."
-- Justin Lee, President, Antwerkz Inc.

"Valuable to any developer using PDF."
-- Stuart Caborn, Consultant, Thoughtworks

Say you need a tool to add dynamic or interactive features to a PDF file and you decide to search on Google for "Java PDF." What do you think you'd find? Why, at the top of the page you'd find "iText," of course. A leading tool for programmatic creation and manipulation of PDF documents, iText is an open source Java library developed and maintained by Bruno Lowagie, the author of this book, with the help of many contributors.

While at the entry level iText is easy to learn, developers find they soon need its more advanced features. Written by the master himself, iText in Action now offers an introduction and a practical guide to the subject--you will gain a sound understanding of the Portable Document Format and how to do interesting and useful things with PDF using iText.

iText in Action introduces iText and lowers the learning curve to its advanced features. Its numerous, valuable examples unlock many of the secrets hidden in Adobe's PDF Reference. The examples are in Java but they can be easily adapted to .NET using one of iText's .NET ports: iTextSharp (C#) or iText.NET (J#).

 

Table of Contents

preface xix
acknowledgments xxi
about this book xxiii

Part 1 Introduction   1

1 iText: when and why   3
1.1 The history of iText 5
1.2 iText: first contact 10
1.3 An almost-true story 14
1.4 Summary 29
2 PDF engine jump-start   30
2.1 Generating a PDF document in five steps 31
2.2 Manipulating existing PDF files 48
2.3 Creating PDF in multiple passes 68
2.4 Summary 72
3 PDF: why and when   73
3.1 A document history 74
3.2 Types of PDF 79
3.3 PDF version history 85
3.4 Summary 95

Part 2 Basic building blocks   97

4 Composing text elements   99
4.1 Wrapping Strings in text elements 100
4.2 Adding extra functionality to text elements 105
4.3 Chunk characteristics 111
4.4 Chunks and space distribution 118
4.5 Anchors revisited 122
4.6 Generic Chunk functionality 125
4.7 Making a flyer (part 1) 129
4.8 Summary 134
5 Inserting images   135
5.1 Standard image types 136
5.2 Working with java.awt.Image 140
5.3 Byte arrays with image data 143
5.4 Setting image properties 147
5.5 Making a flyer (part 2) 158
5.6 Summary 161
6 Constructing tables   162
6.1 Tables in PDF: PdfPTable 163
6.2 Alternatives to PdfPTable 186
6.3 Composing a study guide (part 1) 189
6.4 Summary 192
7 Constructing columns   193
7.1 Retrieving the current vertical position 194
7.2 Adding text to ColumnText 197
7.3 Composing ColumnText with other building blocks 206
7.4 Automatic columns with MultiColumnText 211
7.5 Composing a study guide (part 2) 216
7.6 Summary 219

Part 3 PDF text and graphics   221

8 Choosing the right font   223
8.1 Defining a font 224
8.2 Introducing base fonts 231
8.3 Composite fonts 248
8.4 Summary 255
9 Using fonts   257
9.1 Other writing directions 258
9.2 Sending a message of peace (part 1) 262
9.3 Advanced typography 264
9.4 Automating font creation and selection 271
9.5 Sending a message of peace (part 2) 279
9.6 Summary 282
10 Constructing and painting paths   283
10.1 Path construction and painting operators 284
10.2 Working with iText烞 direct content 294
10.3 Graphics state operators 303
10.4 Changing the coordinate system 313
10.5 Drawing a map of a city (part 1) 321
10.6 Summary 324
11 Adding color and text   325
11.1 Adding color to PDF files 326
11.2 The transparent imaging model 335
11.3 Clipping content 341
11.4 PDF烞 text state 344
11.5 The map of Foobar (part 2) 353
11.6 Summary 355
12 Drawing to Java Graphics2D   356
12.1 Obtaining a Java.awt.Graphics2D instance 357
12.2 Two-dimensional graphics in the real world 368
12.3 PDF烞 optional content 374
12.4 Enhancing the map of Foobar 385
12.5 Summary 392

Part 4 Interactive PDF   393

13 Browsing a PDF document   395
13.1 Changing viewer preferences 396
13.2 Visualizing thumbnails 401
13.3 Adding page transitions 405
13.4 Adding bookmarks 407
13.5 Introducing actions 415
13.6 Enhancing the course catalog 421
13.7 Summary 424
14 Automating PDF creation   425
14.1 Creating a page 426
14.2 Common page event functionality 432
14.3 Alternative XML solutions 445
14.4 Enhancing the course catalog (part 2) 461
14.5 Summary 463
15 Creating annotations and fields   464
15.1 Introducing annotations 465
15.2 Creating an AcroForm 475
15.3 Submitting a form 488
15.4 Comparing HTML and PDF forms 498
15.5 Summary 500
16 Filling and signing AcroForms