Odf files format




















There are two types of numbers in a PDF document: integer and real. An integer consists of one or more digits optionally preceded by a plus or minus sign. An example of integer objects may be seen below:. The real value can be represented with one or more digits, with an optional sign and a leading, trailing or embedded decimal point a period.

An example of real numbers can be seen below:. There is a limitation of the length of the name element, which may be only bytes long. When writing a name, a slash must be used to introduce a name; the slash is not part of the name but is a prefix indicating that what follows is a sequence of characters representing the name. If we want to use whitespace or any other special character as part of the name, it must be encoded with two-digit hexadecimal notation.

Figure 6: PDF names source. Strings in a PDF document are represented as a series of bytes surrounded by parenthesis or angle brackets, but can be a maximum of bytes long. Any character may be represented by ASCII representation, and alternatively with octal or hexadecimal representations.

Octal representation requires the character to be written in the form ddd, where ddd is an octal number. An example of representing a string embedded in parentheses can be seen below:. We can also use special well-known characters when representing a string. Those are: n for new line, r for carriage return, t for horizontal tabulator, b for backspace, f for form feed, for left parenthesis, for right parenthesis and for backslash. Arrays in PDF documents are represented as a sequence of PDF objects, which may be of different types and enclosed in square brackets.

This is why an array in a PDF document can hold any object types, like numbers, strings, dictionaries and even other arrays. An array may also have zero elements. An array is presented with a square bracket. An example of an array is presented below:. The key must be the name object, whereas the value can be any object, including another dictionary. The maximum number of entries in a dictionary is entries. A stream object is represented by a sequence of bytes and may be unlimited in length, which is why images and other big data blocks are usually represented as streams.

A stream object is represented by a dictionary object followed by the keywords stream followed by newline and endstream. The stream dictionary specifies the exact number of bytes of the stream. After the data there should be a newline and the endstream keyword. Common keywords used in all stream dictionaries are the following note that the Length entry is mandatory :.

The stream data in the object stream will contain N pairs of integers, where the first integer represents the object number and the second integer represents the offset in the decoded stream of that object.

The First entry in the dictionary identifies the first object in the object stream. In PDF 1. Each cross-reference stream contains the information equivalent to the cross-reference table and trailer. First of all, we must know that any object in a PDF document can be labeled as an indirect object.

This gives the object a unique object identifier, which other objects can use to reference the indirect object. By declaring an object an indirect object, we are able to use it in the PDF document cross-reference table and reuse it by any page, dictionary and so on in the document.

Since every indirect object has its own entry in the cross-reference table, the indirect objects may be accessed very quickly. The object identifier of the indirect object consists of two parts; the first part is an object number of the current indirect object. The second part is the generation number, which is set to zero for all objects in a newly-created file.

This number is later incremented when the objects are updated. We can refer to the indirect objects with indirect reference, which consists of the object number, the generation number and the keyword R.

To reference the above indirect object, we must write something like below:. Most of the objects in a PDF document are dictionaries. Page objects are connected together and form a page tree, which is declared with an indirect reference in the document catalog. The whole structure of the PDF document can be represented with the picture below [1]:. Figure 7: Structure of the PDF document source. In the picture above, we can see that the document catalog contains references to the page tree, outline hierarchy, article threads, named destinations and interactive form.

From the picture above, we can see that the Document Catalog is the root of the objects in the PDF document. It also contains the information that declares how the document will be displayed on the screen. The entries in the document catalog are as follows:. The reader can take a look at our sources for details. An example of the document catalog is presented below: 1 0 obj. The pages of the document are accessed through the page tree, which defines all the pages in the PDF document.

The tree contains nodes that represent pages of the PDF document, which can be of two types: intermediate and leaf nodes.

Intermediate nodes are also called page tree nodes, while the leaf nodes are called page objects. The simplest page tree structure can consist of a single page tree node that references all of the page objects directly so all of the page objects are leafs. Each node in a page tree has to have the following entries:. A basic example of a page tree can be seen below: 2 0 obj.

We can also see that the leaves of the page tree are dictionaries specifying the attributes of a single page of the document. There are multiple attributes that we can use when defining them for each document page. Figure 8: Simple document. We can see that the.

We can compile the. The resulting PDF then looks like this shown in the picture below:. Figure 9: Result. Fullbanner This is pdfTeX, Version 3. We also need to remember that all the encoded data streams were removed and replaced with three dots for clarity and brevity. The header can be seen in the picture below:. Figure PDF header. Figure PDF body. Repair file extension issues on your PC. Start Download. All rights reserved. Terms Of Use Privacy Cookies. Summer Sale!

Get My Deal Now. Driver Reviver Windows Driver Updater. InstallSafe Protect your browser and PC. Privacy Reviver Complete Privacy Protection. MacReviver Complete Mac Optimization. Registry Reviver Windows Registry Optimizer. Battery Optimizer Laptop Battery Optimization.

Visit our Store. Blog Latest tips, tricks and news. Video Blogs Protect your browser and PC. File Extensions Library of file extensions. Newsletter News from ReviverSoft.

Answers Your questions answered. Driver Reviver Driver Reviver support. InstallSafe InstallSafe support. Disk Reviver Disk Reviver support.

Security Reviver Security Reviver support. Privacy Reviver Privacy Reviver support. MacReviver MacReviver support. Try our new File Analyzer. It is a free tool that can identify more than 11, different kinds of files - most likely yours too! It will help you find software that can handle your specific type of file.

Download File Analyzer here. Update info Upload example file. Suggest a program. Various viewers for this file format These apps are known to open certain types of ODF files. Windows 10 Mac 0 Web 0 OpenOffice.



0コメント

  • 1000 / 1000