Class: PDFCreator

vcs.vcm.widgets.PDFCreator

PDFCreator

new vcs.vcm.widgets.PDFCreator(options)

Name Type Description
options vcs.vcm.widgets.PDFCreator.Options

Extends

Members

vcs.vcm.widgets.PDFCreator.OrientationMode{string}

Properties:
Name Type Description
LANDSCAPE string
PORTRAIT string
BOTH string

active{boolean}

className{string}

class Name of the Object

defaultOrientation{string}

formatList{Array.<string>}

available format list default A2 - A5;

initialized{boolean}

name{string}

unique Name

orientationMode{string}

showComment{boolean}

if true a comment input field will be shown, and can be referenced in the subText with ${comment}

showScreenshotDownload{boolean}

if true a create screenshot button will be shown

showTitleInput{boolean}

if true a title input field will be shown, the title will be used and can be referenced in the subText with ${title}

Methods

vcs.vcm.widgets.PDFCreator.viewpointToFixed(viewpoint, precision){vcs.vcm.widgets.PDFCreator.Viewpoint}

Creates a viewpoint with fixed numeric values

Name Type Default Description
viewpoint vcs.vcm.util.ViewPoint
precision number 2

cancelRunning()

If a job is running, it is cancelled, otherwise this has no effect

createImage(format, orientation, dpi){Promise}

creates an image

Name Type Description
format string
orientation string

one of: landscape, portrait

dpi number

createPDF(format, orientation, dpi, informationObject){Promise}

creates a new PDF with the given format, orientation and dpi values

Name Type Description
format string
orientation string

one of: landscape, portrait

dpi number
informationObject vcs.vcm.widgets.PDFCreator.Information

getClassName(){string} inherited

returns the class name of this object.

Deprecated
  • Yes
Returns:
className

getConfigObject(){Object} inherited

getId(){string} inherited

returns the id of this object

Deprecated
  • Yes

getName(){string} inherited

returns the name of the Object, the name is either given by the config Object or a uuid is generated

Deprecated
  • Yes

getPixelCount(format, orientation, dpi){number}

returns the pixelCount for a format, orientation and DPI

Name Type Description
format string
orientation string
dpi number

getSupportedMaps(){Array.<string>} inherited

Returns the widgets supported maps

isActive(){boolean} inherited

returns the active state of the widget

Deprecated
  • v3.6 use the property active directly
    Returns:
    state of the widget

    isInitialized(){boolean} inherited

    checks if the Widget is already initialized

    Deprecated
    • Yes
    Returns:
    true if all requirements are there

    isSupported(map){boolean} inherited

    returns true if this widget supports the given map. Should be overriden by the widget

    Name Type Description
    map string | vcs.vcm.maps.Map

    the map or className to check for support

    Type Definitions

    vcs.vcm.widgets.PDFCreator.Information{Object}

    Properties:
    Name Type Description
    comment string | undefined
    title string | undefined
    date string | undefined
    obliqueImage vcs.oblique.Image | undefined
    viewpoint vcs.vcm.widgets.PDFCreator.Viewpoint | undefined
    transformedViewpoint vcs.vcm.widgets.PDFCreator.Viewpoint | undefined

    the viewpoint with coordinates in the widgets projection

    projection vcs.vcm.util.Projection | undefined

    the projection info of the transformedViewpoint

    copyright string | undefined

    vcs.vcm.widgets.PDFCreator.Options{vcs.vcm.widgets.Widget.Options}

    Properties:
    Name Type Argument Default Description
    formatList Array.<string>
    orientationMode OrientationMode
    defaultOrientation OrientationMode
    loadedTimeout number | undefined <optional>
    30000

    the number of milliseconds to wait for tiles to load

    title string | undefined
    titleImage string | undefined

    titleImage as data:uri png/jpeg

    copyrightText string | undefined
    pageMargins number | Array.<number> <optional>
    [40, 40, 40, 40]
    showTitle boolean <optional>
    true
    showTitleImage boolean <optional>
    true
    showCopyright boolean <optional>
    true
    showBalloons boolean <optional>
    true
    showNorthPoint boolean <optional>
    true
    showComment boolean false}
    showTitleInput boolean false}
    showHeaderLine boolean <optional>
    true
    showScreenshotDownload boolean <optional>
    false
    imageMimetype string <optional>
    image/png
    info Object | null

    can be used to provide Document META Data @see https://pdfmake.github.io/docs/document-definition-object/document-medatadata/

    headerText Object | string | Array.<*> | null
    subText Object | string | Array.<*> | null
    footer Object | string | Array.<*> | null

    can be used to add a footer to each pdf page @see https://pdfmake.github.io/docs/document-definition-object/headers-footers/

    header Object | string | Array.<*> | null

    can be used to add a hader to each pdf page @see https://pdfmake.github.io/docs/document-definition-object/headers-footers/

    styles Object | undefined

    can be used to override default PDF Styles, use with care. @see https://pdfmake.github.io/docs/ for more information, header, subheader, copyright, tableHeader, subheaderText are predefined stylesets

    aspectRatioLandscape number <optional>
    2.22222

    can be used to override default Landscape aspectRatio, use with care.

    aspectRatioPortrait number <optional>
    2.22222

    can be used to override default Portrait aspectRatio, use with care.

    renderingWidthLandscape number <optional>
    1920

    Rendering width for Rendering the PDF in Landscape, use with care.

    renderingWidthPortrait number <optional>
    1920

    Rendering width for Rendering the PDF in Portrait, use with care.

    titleImageRatio number <optional>
    0.125

    can be used to override default titleImageRatio, use with care.

    headerLineColor string | undefined

    line color in hex. if not specified, the header lines color in the map is used

    northPointImage string | undefined
    warningPixelCount number | undefined

    the number of pixels at which to show a warning, defaults to A4@300DPI

    floatPrecision number <optional>
    2
    projection vcs.vcm.util.Projection.Options | undefined

    the projection to transform the transformed coordinates to, defaults to framework projection

    vcs.vcm.widgets.PDFCreator.OrientationValues{Object}

    Properties:
    Name Type Description
    landscape number
    portrait number

    vcs.vcm.widgets.PDFCreator.Values{Object}

    Properties:
    Name Type Description
    running boolean

    can be cancelled

    cancelled boolean

    set to true to cancel current run

    vcs.vcm.widgets.PDFCreator.Viewpoint{Object}

    Properties:
    Name Type Description
    name string | undefined

    viewpoint name

    cameraPosition Array.<string> | undefined

    ol3 coordinate array with xyz coordinates (z value is mandatory)

    groundPosition Array.<string> | undefined

    ol3 coordinate array with xyz coordinates (z value is optional)

    distance string | undefined

    distance between the camera position and the target

    heading string

    angle between 0 and 360 degree

    pitch string

    angle between 0 and 360 degree

    roll string

    angle between 0 and 360 degree