Skip to content
Last updated

API / geotoolkit / scene / exports / PaperFormatFactory / PaperFormatFactory

Class: PaperFormatFactory

exports.PaperFormatFactory.PaperFormatFactory

Paper format factory

Table of contents

Constructors
  • [new PaperFormatFactory()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.scene.exports.paperformatfactory.paperformatfactory.md#new paperformatfactory())
Methods

Contents

Constructors

new PaperFormatFactory()

• new PaperFormatFactory()

Methods

getClassName

▸ getClassName(): string

Returns

string


getPaper

▸ getPaper(paperformat, unit?, orientation?): AbstractPaperFormat

Return an instance of paper format.

Parameters

Name Type Description
paperformatstring | AbstractPaperFormat | PaperOptionspaper format
Optional unitstring | AbstractUnitoptional
Optional orientationPaperOrientationoptional

Returns

AbstractPaperFormat

result


getPaperList

▸ getPaperList(): string[]

Return the list of all papers supported by the factory.

Returns

string[]

paperList all of the supported paper types


registerNewPaperFormat

▸ registerNewPaperFormat(newPaper): void

Register a custom paper format to the paper format factory. The paper format must extend AbstractPaperFormat.

Throws

Error if paper is not an instance of AbstractPaperFormat

Parameters

Name Type Description
newPaperCustomPaperFormatcustom paper format

Returns

void


getClassName

▸ Static getClassName(): string

Returns

string


getInstance

▸ Static getInstance(): PaperFormatFactory

Return the instance of paper format factory. Will build new one if one has not been constructed.

Returns

PaperFormatFactory

format factory