pub struct FormXObject {
Show 14 fields pub form_type: FormType, pub bytes: Vec<u8>, pub matrix: Option<CurTransMat>, pub resources: Option<Dictionary>, pub group: Option<GroupXObject>, pub ref_dict: Option<Dictionary>, pub metadata: Option<Stream>, pub piece_info: Option<Dictionary>, pub last_modified: Option<Tm>, pub struct_parent: Option<i64>, pub struct_parents: Option<i64>, pub opi: Option<Dictionary>, pub oc: Option<Dictionary>, pub name: Option<String>,
}
Expand description

THIS IS NOT A PDF FORM! A form XObject can be nearly everything. PDF allows you to reuse content for the graphics stream in a FormXObject. A FormXObject is basically a layer-like content stream and can contain anything as long as it’s a valid strem. A FormXObject is intended to be used for reapeated content on one page.

Fields§

§form_type: FormType

Form type (currently only Type1)

§bytes: Vec<u8>

The actual content of this FormXObject

§matrix: Option<CurTransMat>

Optional matrix, maps the form into user space

§resources: Option<Dictionary>

(Optional but strongly recommended; PDF 1.2) A dictionary specifying any resources (such as fonts and images) required by the form XObject (see Section 3.7, “Content Streams and Resources”).

In PDF 1.1 and earlier, all named resources used in the form XObject must be included in the resource dictionary of each page object on which the form XObject appears, regardless of whether they also appear in the resource dictionary of the form XObject. It can be useful to specify these resources in the form XObject’s resource dictionary as well, to determine which resources are used inside the form XObject. If a resource is included in both dictionaries, it should have the same name in both locations. /// In PDF 1.2 and later versions, form XObjects can be independent of the content streams in which they appear, and this is strongly recommended although not required. In an independent form XObject, the resource dictionary of the form XObject is required and contains all named resources used by the form XObject. These resources are not promoted to the outer content stream’s resource dictionary, although that stream’s resource dictionary refers to the form XObject.

§group: Option<GroupXObject>

(Optional; PDF 1.4) A group attributes dictionary indicating that the contents of the form XObject are to be treated as a group and specifying the attributes of that group (see Section 4.9.2, “Group XObjects”).

Note: If a Ref entry (see below) is present, the group attributes also apply to the external page imported by that entry, which allows such an imported page to be treated as a group without further modification.

§ref_dict: Option<Dictionary>

(Optional; PDF 1.4) A reference dictionary identifying a page to be imported from another PDF file, and for which the form XObject serves as a proxy (see Section 4.9.3, “Reference XObjects”).

§metadata: Option<Stream>

(Optional; PDF 1.4) A metadata stream containing metadata for the form XObject (see Section 10.2.2, “Metadata Streams”).

§piece_info: Option<Dictionary>

(Optional; PDF 1.3) A page-piece dictionary associated with the form XObject (see Section 10.4, “Page-Piece Dictionaries”).

§last_modified: Option<Tm>

(Required if PieceInfo is present; optional otherwise; PDF 1.3) The date and time (see Section 3.8.3, “Dates”) when the form XObject’s contents were most recently modified. If a page-piece dictionary (PieceInfo) is present, the modification date is used to ascertain which of the application data dictionaries it contains correspond to the current content of the form (see Section 10.4, “Page-Piece Dictionaries”).

§struct_parent: Option<i64>

(Required if the form XObject is a structural content item; PDF 1.3) The integer key of the form XObject’s entry in the structural parent tree (see “Finding Structure Elements from Content Items” on page 868).

§struct_parents: Option<i64>

(Required if the form XObject contains marked-content sequences that are structural content items; PDF 1.3) The integer key of the form XObject’s entry in the structural parent tree (see “Finding Structure Elements from Content Items” on page 868).

Note: At most one of the entries StructParent or StructParents may be present. A form XObject can be either a content item in its entirety or a container for marked-content sequences that are content items, but not both.

§opi: Option<Dictionary>

(Optional; PDF 1.2) An OPI version dictionary for the form XObject (see Section 10.10.6, “Open Prepress Interface (OPI)”).

§oc: Option<Dictionary>

(Optional; PDF 1.5) An optional content group or optional content membership dictionary (see Section 4.10, “Optional Content”) specifying the optional content properties for the form XObject. Before the form is processed, its visibility is determined based on this entry. If it is determined to be invisible, the entire form is skipped, as if there were no Do operator to invoke it.

§name: Option<String>

(Required in PDF 1.0; optional otherwise) The name by which this form XObject is referenced in the XObject subdictionary of the current resource dictionary (see Section 3.7.2, “Resource Dictionaries”). Note: This entry is obsolescent and its use is no longer recommended. (See implementation note 55 in Appendix H.)

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sets value as a parameter of self.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.