Adapter design pattern

  The adapter design pattern (sometimes referred to as the wrapper pattern or simply a wrapper) 'adapts' one interface for a class into one that a client expects. An adapter allows classes to work together that normally could not because of incompatible interfaces by wrapping its own interface around that of an already existing class.

  Object Adapter

Composite design pattern

  Composite is an object designed as a composition of one-or-more similar objects (other kinds of shapes/geometries), all exhibiting similar functionality. This is known as a "has-a" relationship between objects. The key concept is that you can manipulate a single instance of the object just as you would a group of them.

  Composite

Content stream

  A content stream is a PDF stream object whose data consists of a sequence of instructions describing the graphical elements to be painted on a page. The instructions are represented in the form of PDF objects, using the same object syntax as in the rest of the PDF document. However, whereas the document as a whole is a static, random-access data structure, the objects in the content stream are intended to be interpreted and acted upon sequentially. Each page of a document is represented by one or more content streams.

Cross reference table

  The cross-reference table contains information that permits random access to indirect objects within the file so that the entire file need not be read to locate any particular object. The table contains a one-line entry for each indirect object, specifying the location of that object within the body of the file. (Beginning with PDF 1.5, some or all of the cross-reference information may alternatively be contained in cross-reference streams; see Pdf specification Section 3.4.7, (Cross-Reference Streams). The cross-reference table is the only part of a PDF file with a fixed format, which permits entries in the table to be accessed randomly.

Decorator design patter

  The decorator pattern works by wrapping the new "decorator" object around the original object, which is typically achieved by passing the original object as a parameter to the constructor of the decorator, with the decorator implementing the new functionality. The interface of the original object needs to be maintained by the decorator.

  Decorator

ECMAScript

  ECMAScript is programming language, similar to Javascript (which is in fact extension of ECMAScript). The language is standardized by Ecma International as Standard ECMA-262, also approved as ISO/IEC 16262. For more details, see the specification:

  ECMAScript Language Specification, 3rd edition (December 1999)

Pdf dictionary data type

  A dictionary object is an associative table containing pairs of objects, known as the dictionary's entries. The first element of each entry is the key and the second element is the value. The key must be a name (unlike dictionary keys in PostScript, which may be objects of any type). The value can be any kind of object, including another dictionary.

Pdf document catalog

  The root of a document's object hierarchy is the catalog dictionary, located by means of the Root entry in the trailer of the PDF file (see Pdf specification Section 3.4.4, File Trailer). The catalog contains references to other objects defining the document's contents, outline, article threads (PDF 1.1), named destinations, and other attributes. In addition, it contains information about how the document should be displayed on the screen, such as whether its outline and thumbnail page images should be displayed automatically and whether some location other than the first page should be shown when the document is opened.

Factory method design pattern

  The Factory Method pattern is an object-oriented design pattern. Like other creational patterns, it deals with the problem of creating objects (products) without specifying the exact class of object that will be created. Factory Method, one of the patterns from the Design Patterns book, handles this problem by defining a separate method for creating the objects, which subclasses can then override to specify the derived type of product that will be created.

  Factory method

Facade design pattern

  The facade pattern is an object-oriented design pattern. A facade is an object that provides a simplified interface to a larger body of code, such as a class library.

  Facade

Functor

  In C++ context, functor is method implementing functional operator.

GPL - General public licence

  General public licence created by Free Software Foundation. The purpose of the GPL is to grant any user the right to copy, modify and redistribute programs and source code from developers that have chosen to license their work under the GPL. See GPL wiki for more information. Licence

Incremental update

  The contents of a PDF file can be updated incrementally without rewriting the entire file. Changes are appended to the end of the file, leaving its original contents intact. Each such incremental update adds new cross reference section with trailer and so new revision of document.

Indirect pdf object

  Any object in a PDF file may be labeled as an indirect object. This gives the object a unique object identifier by which other objects can refer to it (for example, as an element of an array or as the value of a dictionary entry). The object identifier consists of two parts:

  - A positive integer object number. Indirect objects are often numbered sequentially within a PDF file, but this is not required; object numbers may be assigned in any arbitrary order.
  - A non-negative integer generation number. In a newly created file, all indirect objects have generation numbers of 0. Nonzero generation numbers may be introduced when the file is later updated
  Together, the combination of an object number and a generation number uniquely identifies an indirect object. The object retains the same object number and generation number throughout its existence, even if its value is modified.
Invariant

  Invariant is a condition that is always true at a certain point in a program. In context of automatical testing, invariant defines expectation of behavior compared to real result of operation.

Iterator design pattern

  The Iterator pattern defines an interface that declares methods for sequentially accessing the objects in a collection. A class that accesses a collection only through such an interface remains independent of the class that implements the interface.

  Iterator

Linearized pdf document

  A Linearized PDF file is a file that has been organized in a special way to enable efficient incremental access in a network environment. The file is valid PDF in all respects, and is compatible with all existing viewers and other PDF applications. Enhanced viewer applications can recognize that a PDF file has been linearized and can take advantage of that organization (as well as added hint information) to enhance viewing performance.

Observer design patter

  The observer pattern (sometimes known as publish/subscribe) is a design pattern used in computer programming to observe the state of an object in a program. It is related to the principle of Implicit invocation.

  Observer

Pdf page tree

  Pdf stores all page dictionaries organized in so called page tree. This tree distinguish 2 types of nodes:

  - Intermediate tree node - this node's purpose is to collect other nodes as a subtree. It is represented by which contains element with Kids name and which contains reference to of a node (this node can be either intermediate or page node. Intermediate tree node dictionary contains element with Type name and this has to have Pages value. To enable travirsing in the tree, also Count element is required for node's dictionary. This element holds number of page tree nodes in current intermediate node.
  - Page (leaf) tree node - this node contains direct page information. It is represented by page dictionary which has element with Type name and Page value.
  Root of the tree is referenced by dictionary as Pages element reference.

  With well balanced tree, it is possible to access arbitrary page (also for very big amount of pages) in very short time (just fiew hops through intermediate nodes). Pdf creators usually collects pages in chunks in one intermediate node. Also intermediate nodes are collected by 10. This means that document with 1000 pages has page tree with 3 intermediate nodes.

  Page tree root is allways intermediate node.

  Page tree

pdf stream

  A stream object, like a string object, is a sequence of bytes. However, a PDF application can read a stream incrementally, while a string must be read in its entirety. Furthermore, a stream can be of unlimited length, whereas a string is subject to an implementation limit. For this reason, objects with potentially large amounts of data, such as images and page descriptions, are represented as streams.

pdf trailer

  The trailer of a PDF file enables an application reading the file to quickly find the cross-reference table and certain special objects. It is represented by dictionary and it is stored at the file end. It contains entries for document root (), previous cross reference section and others (see Pdf specifiaction section 3.4.4.).

Wrapper design patter

  A wrapper converts the interface of a class into another interface clients expect. Wrappers let classes work together that couldn't otherwise because of incompatible interfaces.