logo资料库

Developing with PDF 无水印pdf.pdf

第1页 / 共217页
第2页 / 共217页
第3页 / 共217页
第4页 / 共217页
第5页 / 共217页
第6页 / 共217页
第7页 / 共217页
第8页 / 共217页
资料共217页,剩余部分请下载后查看
Cover
Copyright
Table of Contents
Preface
Who Should Read This Book
Organization of Content
Conventions Used in This Book
Safari® Books Online
How to Contact Us
Acknowledgments
1. PDF Syntax
PDF Objects
Null Objects
Boolean Objects
Numeric Objects
Name Objects
String Objects
Array Objects
Dictionary Objects
Stream Objects
Direct versus Indirect Objects
File Structure
White-Space
The Four Sections of a PDF
Incremental Update
Linearization
Document Structure
The Catalog Dictionary
The Page Tree
Pages
The Name Dictionary
What's Next
2. PDF Imaging Model
Content Streams
Graphic State
The Painter's Model
Open versus Closed Paths
Clipping
Drawing Paths
Transformations
Basic Color
Marked Content Operators
Property Lists
Resources
External Graphic State
Basic Transparency
What's Next
3. Images
Raster Images
Adding the Image
JPEG Images
Transparency and Images
Soft Masks
Stencil Masks
Color-Keyed Masks
Vector Images
Adding the Form XObject
The Form Dictionary
Copying a Page to a Form XObject
What's Next
4. Text
Fonts
Glyphs
Font Types
The Font Dictionary
Encodings
Text State
Font and Size
Rendering Mode
Drawing Text
Positioning Text
What's Next
5. Navigation
Destinations
Explicit Destinations
Named Destinations
Actions
The Action Dictionary
GoTo Actions
URI Actions
GoToR and Launch Actions
Multimedia Actions
Nested Actions
Bookmarks or Outlines
What's Next
6. Annotations
Introduction
Annotation Dictionaries
Appearance Streams
Markup Annotations
Text Markup
Drawing Markup
Stamps Markup
Text Annotations and Pop-ups
Non-Markup Annotations
What's Next
7. AcroForms
The Interactive Form Dictionary
The Field Dictionary
Field Names
Field Flags
Fields and Annotations
Field Classes
Button Fields
Text Fields
Choice Fields
Signature Fields
Form Actions
SubmitForm
ResetForm
ImportData
What's Next
8. Embedded Files
File Specifications
Embedded File Streams
URL File Specifications
Ways to Embed Files
FileAttachment Annotations
The EmbeddedFiles Name Tree
Collections
The Collection Dictionary
Collection Schema
GoToE Actions
What's Next
9. Multimedia and 3D
Simple Media
Sound Annotations
Movie Annotations
Multimedia
Screen Annotation
Rendition Actions
3D
3D Annotations
Markups on 3D
What's Next
10. Optional Content
Optional Content Groups
Content State
Usage
Optional Content Membership
Visibility Policies
Visibility Expressions
Optional Content Configuration
Order Key
RBGroups
AS (Automatic State)
Optional Content Properties
Marking Content as Optional
Optional Content in Content Streams
Optional Content for Form XObjects
Optional Content for Annotations
What's Next
11. Tagging and Structure
Structured PDF
The Structure Tree
Structure Elements
Role Mapping
Associating Structure to Content
Tagged PDFs
What's Next
12. Metadata
The Document Information Dictionary
Metadata Streams
XMP
XMP in PDF
XMP versus the Info Dictionary
What's Next
13. PDF Standards
PDF (ISO 32000)
PDF/X (ISO 15930)
PDF/A (ISO 19005)
PDF/E (ISO 24517)
PDF/VT (ISO 16612-2)
PDF/UA (ISO 14289)
Other PDF-Related Standards
PAdES (ETSI TS 102 778)
PDF Healthcare
Index
About the Author
Developing with PDF Leonard Rosenthol
Developing with PDF by Leonard Rosenthol Copyright © 2014 Leonard Rosenthol. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/ institutional sales department: 800-998-9938 or corporate@oreilly.com. Editors: Simon St. Laurent and Meghan Blanchette Production Editor: Nicole Shelby Copyeditor: Rachel Head Indexer: WordCo Indexing Services Cover Designer: Randy Comer Interior Designer: David Futato Illustrator: Rebecca Demarest October 2013: First Edition Revision History for the First Edition: 2013-10-11: First release See http://oreilly.com/catalog/errata.csp?isbn=9781449327910 for release details. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Developing with PDF, the image of a Chilean Plantcutter, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade‐ mark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. ISBN: 978-1-449-32791-0 [LSI]
Table of Contents Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix 1. PDF Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 PDF Objects 1 Null Objects 1 Boolean Objects 2 Numeric Objects 2 Name Objects 3 String Objects 4 Array Objects 5 Dictionary Objects 5 Stream Objects 7 Direct versus Indirect Objects 8 File Structure 10 White-Space 13 The Four Sections of a PDF 14 Incremental Update 18 Linearization 20 Document Structure 21 The Catalog Dictionary 21 The Page Tree 24 Pages 26 The Name Dictionary 32 What’s Next 33 2. PDF Imaging Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Content Streams 35 Graphic State 36 The Painter’s Model 39 iii
Open versus Closed Paths 39 Clipping 40 Drawing Paths 41 Transformations 42 Basic Color 44 Marked Content Operators 46 Property Lists 47 Resources 47 External Graphic State 48 Basic Transparency 49 What’s Next 50 3. Images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Raster Images 51 Adding the Image 52 JPEG Images 54 Transparency and Images 55 Soft Masks 55 Stencil Masks 56 Color-Keyed Masks 57 Vector Images 58 Adding the Form XObject 58 The Form Dictionary 59 Copying a Page to a Form XObject 61 What’s Next 61 4. Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Fonts 63 Glyphs 63 Font Types 65 The Font Dictionary 66 Encodings 69 Text State 71 Font and Size 71 Rendering Mode 73 Drawing Text 74 Positioning Text 75 What’s Next 76 5. Navigation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Destinations 77 Explicit Destinations 77 iv | Table of Contents
Named Destinations 78 Actions 79 The Action Dictionary 79 GoTo Actions 79 URI Actions 80 GoToR and Launch Actions 81 Multimedia Actions 82 Nested Actions 82 Bookmarks or Outlines 83 What’s Next 85 6. Annotations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Introduction 87 Annotation Dictionaries 87 Appearance Streams 88 Markup Annotations 88 Text Markup 89 Drawing Markup 91 Stamps Markup 98 Text Annotations and Pop-ups 101 Non-Markup Annotations 102 What’s Next 103 7. AcroForms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 The Interactive Form Dictionary 105 The Field Dictionary 106 Field Names 107 Field Flags 107 Fields and Annotations 108 Field Classes 109 Button Fields 109 Text Fields 112 Choice Fields 115 Signature Fields 119 Form Actions 119 SubmitForm 120 ResetForm 121 ImportData 122 What’s Next 122 8. Embedded Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 File Specifications 123 Table of Contents | v
Embedded File Streams 124 URL File Specifications 125 Ways to Embed Files 126 FileAttachment Annotations 126 The EmbeddedFiles Name Tree 127 Collections 128 The Collection Dictionary 129 Collection Schema 130 GoToE Actions 133 What’s Next 134 9. Multimedia and 3D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Simple Media 137 Sound Annotations 137 Movie Annotations 139 Multimedia 141 Screen Annotation 141 Rendition Actions 142 3D 145 3D Annotations 145 Markups on 3D 148 What’s Next 149 10. Optional Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Optional Content Groups 151 Content State 151 Usage 152 Optional Content Membership 154 Visibility Policies 154 Visibility Expressions 154 Optional Content Configuration 155 Order Key 156 RBGroups 159 AS (Automatic State) 160 Optional Content Properties 160 Marking Content as Optional 161 Optional Content in Content Streams 161 Optional Content for Form XObjects 164 Optional Content for Annotations 165 What’s Next 166 11. Tagging and Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 vi | Table of Contents
分享到:
收藏