API / geotoolkit / report / Document / Document
Define parsed document
Constructors
Methods
Methods
▸ dispose(): void
Dispose.
void
▸ exportToPdf(options?): Promise<IWritable>
Exports the widget content as a PDF file, user has option to select the scale of track in pdf.
Example
// following example shows how to use exportPdf to get stream without downloading PDF
// and create Blob based on it
document.exportPdf({
'skipoutput': true,
...
}).then((stream) => {
const content = stream.getContent();
const blob = new Blob([content], {'type': 'application/pdf'});
const url = URL.createObjectURL(blob);
...
});| Name | Type | Description |
|---|---|---|
Optional options | ExportToPdfOptions | export options |
Promise<IWritable>
promise with output stream
▸ getClassName(): string
string
▸ getDefaultPrintSettings(): DefaultPrintSettings
Return default print settings
default print settings
▸ getDocument(): CompositeElement
Return Document Element
▸ getDomElement(): Document
Returns dom document element
document element
▸ getPageFooterElement(options?): PageElement
Returns exportable page footer element
| Name | Type | Description |
|---|---|---|
Optional options | PageInfo | export options |
return exportable element
▸ getPageHeaderElement(options?): PageElement
Returns exportable page header element
| Name | Type | Description |
|---|---|---|
Optional options | PageInfo | export options |
return exportable element
▸ getProperty(propertyName, defaultValue?): string | number | object
Return known property value
| Name | Type | Description |
|---|---|---|
propertyName | string | property name |
Optional defaultValue | string | number | object | property default value |
string | number | object
property value
▸ getRootElement(width?, height?): Element
Returns root element
| Name | Type | Description |
|---|---|---|
Optional width | number | width |
Optional height | number | height |
root element
▸ hasOwnProperty(propertyName): boolean
Returns returns a boolean indicating whether the object has the specified property as its own property.
| Name | Type | Description |
|---|---|---|
propertyName | string | property name |
boolean
▸ parseDomElements(xml): Promise<Node[]>
Parse DOM elements
| Name | Type | Description |
|---|---|---|
xml | string | XML template |
Promise<Node[]>
▸ Static getClassName(): string
string