PDFTron logo
 Home | Products | Services | Store | Downloads | Support | Company

CosEdit User Manual

Mapping CosEdit user interface elements to PDF file structure.

CosEdit graphical user interface (GUI) has a clean mapping in PDF file structure. We assume that you are familiar with the details of PDF file structure (PDF Reference Manual 1.4 is available online from Adobe).

A PDF file consists of four sections:

  • A one-line header identifying the version of the PDF specification to which the file conforms.
  • A body containing the objects that make up the document contained in the file.
  • A cross-reference table containing information about the indirect objects in the file.
  • A trailer giving the location of the cross-reference table and of certain special objects within the body of the file.

This initial structure may be modified by later updates, which append additional elements to the end of the file.

The following figure illustrates how is the basic PDF file structure mapped to CosEdit's GUI.

Cross-reference table elements map directly to the entries in the cross-reference table (xref) view. Xref view displays in a tabular form all elements from the latest cross-reference table. Columns of the table contain useful information about indirect object such as its type, file offset, object and generation number etc.

File body is a container of indirect objects. Indirect objects can refer to each other forming a graph like structure. The root of the graph is the trailer object. In CosEdit, the trailer can always be located by selecting the first raw of the xref view (or by clicking on 'root' button in the toolbar).

Selecting rows in the xref view will display corresponding objects in the object view that is located to the right. Object view displays the value of the selected indirect object. You can use the object view to modify existing objects, and in case of container objects (i.e. dictionaries and arrays) create direct sub-objects as well as references to other indirect objects. References to indirect objects can be easily identified as icons containing L (as in Link) symbol.

Double click on the link will select the referenced element in the xref and object view. Effectively, clicking on the link allows you to navigate Cos object graph. History bar shown in the figure below shows the current position in the graph starting from the specific indirect object.

You can use left and right arrow buttons to go back and forth through position history, or can directly edit the path as in the web browser.

Options and customizations

PDFTron CosEdit offers several customization options located in the Options/Customize menu:

Customize Streams Tab

If decode streams is checked associated decode filters will be applied (CosEdit allows you to extract data streams either by double clicking on -DATA- field or by selecting 'Save Stream Data to File' in context menu of the stream object view).

If decode streams is not checked, decode filters will not be applied. However, the stream will be decrypted if the document is encrypted.

For more information, see: How to extract stream data?

Customize Streams tab dialog also allows you to select a different viewer used to view or edit document's data streams. For more information, see: How to select a different stream data viewer?

Save Options Tab

CosEdit allows you to save documents using custom header strings. By default all documents saved using full-save mode will have %PDF-1.4 as a header. You may want to use a different header in order to save the file in an older PDF version or as other document formats such as FDF, PJTF, etc. See, How to save a file with a header different from %PDF-1.4?

Note: New header will be saved only if documents are saved in full save mode.

In CosEdit documents can be saved using full or incremental save mode. Full save mode is more time consuming, but may offer extra option such as unused object removal, serialization optimizations etc. On the other hand incremental save is fast and may allow persistent undo functionality. For more information on incremental save, see What is incremental save?

Remove unused objects check option in full save mode allows you to get rid of all objects that are not referenced in a document. If remove unused objects is checked, program will perform garbage collection of unused objects resulting in a smaller file serialization.

File backup is currently permanently disabled. This will be fixed in the next version of CosEdit.

Customize Editor Tab

If checked, deep copy is enabled. This means that when an object is copied all objects referenced by that object are also copied. This rule applies to referenced objects recursively. Therefore, all objects referenced directly or indirectly will be copied.

If deep copy is not checked, shallow copy will be performed. This means that only direct sub-objects will be copied, whereas indirect references will be replaced with Null objects.

Related topics:
How to copy an object?
How to import objects from another document?

Object Loading is an advanced editor option that specifies how indirect objects are loaded when a document is opened.

Document will open fastest if 'On demand' radio button is selected. On demand will not load Cos objects when a document is opened so there will be question mark (?) in the Type column of cross reference table (xref) view. After the document is opened objects will be loaded on demand (through mouse clicks or other means).

Object loading with Automatic option will load only Cos objects visible in the cross reference table (xref) view. When Automatic option is selected documents will be opened quickly and type information will be visible in the Type column of xref view. Automatic is the default option.

Preload will load all Cos objects when a document is opened. This option will be slow for large documents.


 Product Info 
 F.A.Q. 
 User Manual 
 Get the Demo! 
 Buy Now!