Adobe Geospatial PDF Feature Representation (Format Attributes)
In addition to the generic FME feature attributes that FME Workbench adds to all features (see About Feature Type Attributes), this format also adds format-specific attributes (Format Attributes).
Attribute Name |
Contents |
---|---|
pdf_type |
The value specifies PDF geometric type of this entity. Range:
Default: No default |
pdf_name |
If attribution data is written, then the value of this attribute determines the name of the structure element associated with the feature. If this attribute is not set, then the structure element will be numbered sequentially. The names need not be unique. Range: <string> Default: <auto-generated integer> |
The value specifies the order in which features are drawn when they are written to the same page, frame, and layer. Features with the most negative value will be drawn first, and features with the most positive value will be drawn last. Range: <integer> Default: 0 |
|
pdf_line_width |
The value specifies the line width in typographical points of line geometries and boundaries of area geometries. Points within half the line width perpendicular distance from the line path will be painted. Range: <float> Default: 1.0 |
pdf_line_cap_style |
The value specifies the cap style for the ends of lines. Range: 0 - Butt cap: Lines are squared off at the end and do not project past the end of the line. 1 - Round cap: Semicircles with diameter equal to the line width cap the ends of lines. 2 - Projecting square cap: Lines project past the end by a distance equal to half the line width and are squared off. Default: 0 |
pdf_line_join_style |
The value specifies the shape of corners between segments of paths. Range: 0 - Miter join: Outer edges of segments are extended until they meet. 1 - Round join: Arcs with diameter equal to the line width are drawn around corners. 2 - Bevel join: Two adjacent segments are finished with butt caps, and the notch beyond the ends is filled with a triangle. Default: 0 |
pdf_line_miter_limit |
For miter joins, the miter limit imposes a maximum on the ratio of the miter length to the line width. For example, a miter limit of 1.414 will bevel the ends of two segments meeting at an angle less than 90 degrees (the far corner will be at a distance sqrt(1^2+1^2)=sqrt(2) from the line). Range: <0.0...> Default: 0.0 |
pdf_line_dash_pattern{} |
The values in this list attribute specify the dash pattern for line geometries and the boundaries of area geometries. This attribute works together with pdf_line_dash_pattern_phase to establish a simple dashed line style. Elements of the list specify the alternating lengths of dashes and gaps. The pattern starts with a dash. Range: For each element in the list: <1,2,...> Default: Empty list |
pdf_line_dash_pattern_ |
The value specifies the starting phase of the dash pattern. This attribute works together with pdf_line_dash_pattern to establish a simple dashed line style. The following is an example dash pattern specification: pdf_line_dash_pattern{0} = 2 pdf_line_dash_pattern{1} = 3 pdf_line_dash_pattern_phase = 1 A dash of length 1 will be drawn, then gaps of length 3 and dashes of length 2 will cyclically follow thereafter. Before beginning to stroke a path, the dash array is cycled, adding the lengths of dashes and gaps. When the accumulated length equals the value specified by the dash phase, stroking of the path begins, and the dash array is used cyclically from that point onward. The table below shows examples of line dash patterns. As shown, an empty dash array and zero phase can be used to restore the dash pattern to a solid line:
Range: <0,1,2,...> Default: 0 |
pdf_url |
If this attribute is set, then the feature will become an interactive annotation. When a user clicks on the feature in a PDF viewer application that supports URI actions, the value will be treated as a URI and it will be resolved. In the common case that the value is a URL, Adobe Acrobat Reader will open a web browser to resolve the address specified. See the Annotations below for behavioral notes. |
pdf_tooltip |
If this attribute is set, then the feature will become an interactive annotation. The value specifies the tooltip string that will be displayed when an user hovers over the feature with the mouse cursor in the PDF viewer application. See Annotations below for behavioral notes. |
pdf_fill_opacity |
The value specifies the opacity of the fill color of the feature. A value of 1.0 is fully opaque, and 0.0 is completely transparent. If this value is not set, then the opacity of the feature is determined by the pdf_default_opacity feature type parameter. If the feature type parameter is not set either, then the writer parameter Default Opacity determines the opacity. |
pdf_pen_opacity |
The value specifies the opacity of the stroking color of the feature. A value of 1.0 is fully opaque, and 0.0 is completely transparent. If this value is not set, then the stroking opacity is set to fully opaque. |
pdf_type: any
Features with the pdf_url or the pdf_tooltip attribute set become annotation objects. There are several behavioral differences between annotation objects and non-annotation objects:
- Annotation objects will always appear above non-annotation objects, regardless of layer ordering.
- The interactive area of an annotation object is the rectangular bound of the feature instead of its precise outline.
- Annotation objects are no longer selectable through the Object Data tool or the Model Tree interface.
- Even when the annotation object’s layer is hidden, the annotation will still provide tooltips and be interactive. The annotation object’s parent layer does not affect the visibility of the annotation; only the object’s layer itself will affect its visibility.
pdf_type: pdf_point
A PDF point feature is drawn as a point with a radius of 1 typographical point.
The following attribute is applicable to point features:
pdf_point_width |
The value specifies the point width in typographical points of point geometries. Range: <float> Default: 1.0 |
pdf_type: pdf_line
A PDF line feature is drawn as a stroked line.
pdf_type: pdf_area
A PDF area feature is written as a filled area with a stroked boundary. The fill opacity is controlled by the Default Fill Opacity parameter.
pdf_type: pdf_collection
Each component of a PDF collection feature is drawn according to their geometry type.
pdf_type: pdf_text
A PDF text feature is drawn as a text annotation according to its fme_text_string, fme_text_size, and fme_rotation attributes.
The encoding of the text string is determined as follows:
- If the font is one of the PDF Core 14 fonts, then the string is decoded using Windows ANSI code page 1252.
- If the font is a TrueType font, then the string is decoded using the Macintosh Roman code page. If the TrueType font has a Microsoft Symbol character map table, then the font is treated as a symbolic font, and the text string can specify characters in the FF00-FFFF range of the character map by encoding only the low-byte of the code point.
Desired characters in symbolic fonts can either be specified using XML numeric character references (NCR) in rich text format (see below) or if the code point coincides with ASCII characters, the ASCII characters themselves.
Note that text and multitext geometries in FME currently do not support justification and have an insertion point of the text baseline and the left edge of the text bounding box. Due to the FME text geometry bounds being only an approximation, these are not attempted to be mapped to the PDF lower left corner bounds text justification model. Instead, the insertion points are mapped directly. The result is that, unlike non-text geometries, rendered text may appear below the expected insertion point, particularly for multitext geometries.
The following attributes are applicable to text features:
Attribute Name |
Contents |
---|---|
pdf_text_font |
The value specifies the default font family of the text representation. If left blank, Helvetica will be used. Supported font types include a subset of Type 1 standard fonts and non-Unicode TrueType font families with some font styles such as bold, italic, and bold italic. Default available fonts may vary per platform. Supported Standard fonts include:
Non-Unicode supported TrueType font families include:
Note that the font list above represents only fonts fully supported on Windows. On all operating systems, additional TrueType font (.ttf) files are supported when installed in the FME fonts folder, the Operating System fonts folder, or in the current workspace folder, provided that they contain a compatible Apple Roman font encoding supported by PDF. TrueType font files with only Unicode font encodings are not supported. In many cases, the name of the file or the font family name can be used as the font name value for the pdf_text_font attribute. Other types of fonts are not supported, including:
Default: Helvetica |
pdf_text_underline |
If the value is Y, the text will be underlined. Note that this is not part of the font itself – it is an additional line rendered after the text glyphs. Default: N |
pdf_text_strikethrough |
If the value is Y, the text will have a strikethrough. Note that this is not part of the font itself – it is an additional line rendered after the text glyphs. Default: N |
pdf_text_bold |
If the value is Y, the text will have a bold style. This is a native font style embedded within some font family definitions. Default: N |
pdf_text_italic |
If the value is Y, the text will have an italic or oblique style. This is a native font style embedded within some font family definitions. Default: N |
The text string can be specified in a rich text format. The format is a subset of XHTML. For more information on XHTML, visit http://www.w3.org/TR/xhtml1/. The following are the supported XML elements:
<body>...</body>, <span>...</span>, <p>...</p> |
Can be used to specify a style for its enclosed text through its “style” attribute. |
<b>...</b> |
Bolds the enclosed text. |
<i>...</i> |
Italicizes the enclosed text. |
<u>...</u> |
Underlines the enclosed text. |
<del>...</del> |
Adds a strikethrough to the enclosed text. |
<br/> |
Adds a line break. |
The “style” XML attribute has the following format:
“property:value;...;property:value”
The following properties are supported:
font-family |
Specifies the font family of the text. |
font-size |
Specifies the point size of the font. |
color |
Specifies the color of the text. The color can be specified through the format “#RRGGBB” where each color component is specified as a hexadecimal value, or through the 16 HTML color names (http://www.w3.org/TR/REC-html40/types.html#h-6.5). |
text-decoration |
Valid values are “underline” and “line-through”. |
The following is an example rich text fme_text_string value:
<body>Hello<br/><span style=”font-size:30”>World!</span></body>
In the PDF document, the text “Hello” will use the styling specified through the format attributes. The text “World!” appears on the next line and will have a font size of 30 but will inherit all other style attributes.
pdf_type: pdf_raster
A PDF raster feature is drawn as a grid of pixels comprising an image. Rasters written to PDF are converted to a JPEG2000 byte string and stored as a blob. Therefore, the nature of raster support is defined by the JPEG2000 format.
The following attribute is applicable to raster features:
Attribute Name |
Contents |
---|---|
pdf_raster_compression_level |
It sets the quality of the compression. The range of the value is from 0 (best quality) to 100 (worst quality). The default value is 75. Setting the value to 0 enables lossless compression. This is a writer attribute. |