Skip to content

IText in Action Creating and Manipulating PDF

Spend $50 to get a free DVD!

ISBN-10: 1932394796

ISBN-13: 9781932394795

Edition: 2006

Authors: Bruno Lowagie

List price: $49.99
Shipping box This item qualifies for FREE shipping.
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Imagine a publisher who wants to "stamp" his ebooks on the fly with the name of the buyer (no discourage sharing). Such a publisher would (and we know one who does) use iText for the task. Developers looking to enhance web- and other applications with dynamic PDF document generation and/or manipulation will find this book unique in content "and" readability. Based on ongoing examples that encourage learning "in action," they will finally understand PDF and learn how to build applications that produce professional, high-quality PDF documents. While the basic functionality of iText is easy to acquire, this book lowers the learning curve for more advanced functionality. It explains how to use…    
Customers also bought

Book details

List price: $49.99
Copyright year: 2006
Publisher: Manning Publications Company
Publication date: 12/18/2006
Binding: Paperback
Pages: 656
Size: 7.25" wide x 9.25" long x 1.25" tall
Weight: 2.486
Language: English

Bruno Lowagie owns 1T3XT BVBA, the company that protects the IP ofiText. He is the original developer and one of the current maintainers of iText.

Preface
Acknowledgments
About this book
Introduction
iText: when and why
The history of iText
How iText was born
iText today
Beyond Java
iText: first contact
Running the examples in the book
Experimenting with the iText toolbox
An almost-true story
Some Foobar fiction
A document daydream
Welcoming the student
Producing and processing interactive documents
Making the dream come true
Summary
PDF engine jump-start
Generating a PDF document in five steps
Creating a new document object
Getting a DocWriter instance
Opening the document
Adding content
Closing the document
Manipulating existing PDF files
Reading an existing PDF file
Using PdfStamper to change document properties
Using PdfStamper to add content
Introducing imported pages
Using imported pages with PdfWriter
Manipulating existing PDF files with PdfCopy
Concatenating forms with PdfCopyFields
Summary of the manipulation classes
Creating PDF in multiple passes
Stamp first, then copy
Copy first, then stamp
Stamp, copy, stamp
Summary
PDF: why and when
A document history
Adobe and documents
The Acrobat family
The intellectual property of the PDF specification
Types of PDF
Traditional PDF
Tagged PDF
Linearized PDF
PDFs preserving native editing capabilities
PDF types that became an ISO standard
PDF forms, FDF, and XFDF
XFA and XDP
Rules of thumb
PDF version history
Changing the user unit
PDF content and compression
Encryption
Summary
Basic Building Blocks
Composing text elements
Wrapping Strings in text elements
The atomic building block: com.lowagie.text.Chunk
An Array List of Chunks: com.lowagie.text.Phrase
A sequence of Phrases: com.lowagie.text.Paragraph
Adding extra functionality to text elements
External and internal links: com.lowagie.text.Anchor
Lists and ListItems: com.lowagie.text.List/ListItem
Automatic bookmarking: com.lowagie.text. Chapter/Section
Chunk characteristics
Measuring and scaling
Lines: underlining and striking through text
TextRise: sub- and superscript
Simulating italic fonts: skewing text
Changing font and background colors
Simulating bold fonts: stroking vs. filling
Chunks and space distribution
The split character
Hyphenation
Changing the Char Space ratio
Anchors revisited
Remote Goto
Local Goto
Generic Chunk functionality
Drawing custom backgrounds and lines
Implementing custom functionality
Building an index
Making a flyer (part 1)
Summary
Inserting images
Standard image types
BMP, EPS, GIF, JPEG, PNG, TIFF, and WMF
TIFF with multiple pages
Animated GIFs
Working with java.awt.Image
Byte arrays with image data
Raw image data
CCITT compressed images
Creating barcodes
Working with com.lowagie.text.pdf.PdfTemplate
Setting image properties
Adding images to the document
Translating, scaling, and rotating images
Image masks
Making a flyer (part 2)
Getting the Image instance
Setting the border, the alignment, and the dimensions
The resulting PDF
Summary
Constructing tables
Tables in PDF: PdfPTable
Your first PdfPTable
Changing the width and alignment of a PdfPTable
Adding PdfPCells to a PdfPTable
Special PdfPCell constructors
Working with large tables
Adding a PdfPTable at an absolute position
Alternatives to PdfPTable
Composing a study guide (part 1)
The data source
Generating the PDF
Summary
Constructing columns
Retrieving the current vertical position
Adding text to ColumnText
Different ways to add text to a column
Keeping paragraphs together
Adding more than one column to a page
Composing ColumnText with other building blocks
Combining text mode with images and tables
ColumnText in composite mode
Automatic columns with MultiColumnText
Regular columns with MultiColumnText
Irregular columns with MultiColumnText
Composing a study guide (part 2)
Summary
PDF Text and Graphics
Choosing the right font
Defining a font
Using the right terminology
Standard Type 1 fonts
Introducing base fonts
Working with an encoding
Class BaseFont and Type 1 fonts
Embedding Type 3 fonts
Working with TrueType fonts
Working with OpenType fonts
Composite fonts
What is Unicode?
Introducing Chinese, Japanese, Korean (CJK) fonts
Embedding CIDFonts
Using TrueType collections
Summary
Using fonts
Other writing directions
Vertical writing
Writing from right to left
Sending a message of peace (part 1)
Advanced typography
Handling diacritics
Dealing with ligatures
Automating font creation and selection
Getting a Font object from the FontFactory
Automatic font selection
Sending a message of peace (part 2)
Summary
Constructing and painting paths
Path construction and painting operators
Seven path construction operators
Path-painting operators
Working with iText's direct content
Direct content layers
PdfPTable and PdfPCell events
Graphics state operators
The graphics state stack
Changing the characteristics of a line
Changing the coordinate system
The CTM
Positioning external objects
Drawing a map of a city (part 1)
The XML/SVG source file
Parsing the SVG file
Summary
Adding color and text
Adding color to PDF files
Device colorspaces
Separation colorspaces
Painting patterns
Using color with basic building blocks
The transparent imaging model
Transparency groups
Isolation and knockout
Applying a soft mask to an image
Clipping content
PDF's text state
Text objects
Convenience methods to position and show text
The map of Foobar (part 2)
Summary
Drawing to Java Graphics2D
Obtaining a Java.awt.Graphics2D instance
A simple example from Sun's tutorial
Mapping AWT fonts to PDF fonts
Drawing glyph shapes instead of using a PDF font
Two-dimensional graphics in the real world
Exporting Swing components to PDF
Drawing charts with JFreeChart
PDF's optional content
Making content visible or invisible
Adding structure to layers
Using a PdfLayer
Optional content membership
Changing the state of a layer with an action
Optional content in XObjects and annotations
Enhancing the map of Foobar
Defining the layers for the map and the street names
Combining iText and Apache Batik
Adding tourist information to the map
Summary
Interactive PDF
Browsing a PDF document
Changing viewer preferences
Setting the page layout
Choosing the page mode
Viewer options
Visualizing thumbnails
Changing the page labels
Changing the thumbnail image
Adding page transitions
Adding bookmarks
Creating destinations
Constructing an outline tree
Adding actions to an outline tree
Retrieving bookmarks from an existing PDF file
Manipulating bookmarks in existing PDF files
Introducing actions
Actions to go to an internal destination
Actions to go to an external destination
Triggering actions from events
Adding JavaScript to a PDF document
Launching an application
Enhancing the course catalog
Summary
Automating PDF creation
Creating a page
Adding empty pages
Defining page boundaries
Reordering pages
Common page event functionality
Overview of the PdfPageEvent methods
Adding a header and a footer
Adding page X of Y
Adding watermarks
Creating an automatic slide show
Automatically creating bookmarks
Automatically creating a table of contents
Alternative XML solutions
Writing a letter on company stationery
Parsing a play
Parsing (X)HTML
Using HtmlWorker to parse HTML snippets
Enhancing the course catalog (part 2)
Summary
Creating annotations and fields
Introducing annotations
Simple annotations
Other types of annotations
Adding annotations to a chunk or image
Creating an AcroForm
Button fields
Creating text fields
Creating choice fields
Submitting a form
Choosing field names
Adding actions to the pushbuttons
Adding actions
Comparing HTML and PDF forms
Summary
Filling and signing AcroForms
Filling in the fields of an AcroForm
Retrieving information about the fields (part 1)
Filling fields
Retrieving information from a field (part 2)
Flattening a PDF file
Optimizing the flattening process
Working with FDF and XFDF files
Reading and writing FDFfiles
Reading XFDF files
Signing a PDF file
Adding a signature field to a PDF file
Using public and private keys
Generating keys and certificates
Signing a document
Verifying a PDF file
Summary
iText in web applications
Writing PDF to the ServletOutputStream: pitfalls
Solving problems related to content type-related problems
Troubleshooting the blank-page problem
Problems with PDF generated from JSP
Avoiding multiple hits per PDF
Workaround for the timeout problem
Putting the theory into practice
A personalized course catalog
Creating a learning agreement form
Reading an FDF file in a JSP page
Summary
Under the hood
Inside iText and PDF
Factors of success
The file structure of a PDF document
Basic PDF objects
Climbing up the object tree
Extracting and editing text
Reading a page's content stream
Why iText doesn't do text extraction
Why you shouldn't use PDF as a format for editing
Rendering PDF
How to print a PDF file programmatically
Printing a PDF file in a web application
Manipulating PDF files
Toolbox tools
The learning agreement (revisited)
Summary
Class diagrams
Creating barcodes
Open parameters
Signing a PDF with a smart card
Dealing with exceptions
Pdf/X, Pdf/A and tagged PDF
Resources
Index