input

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dlex

type Dlex struct {
	Input
}

Represents a Dlex input.

func NewDlexWithCloudResourceNLayoutData

func NewDlexWithCloudResourceNLayoutData(cloudResourcePath string, layoutData resource.LayoutDataResource) *Dlex
Initializes a new instance of the `DlexInput` class by posting the

DLEX file and the JSON data file or DLEX file path that is present in the cloud environment and the JSON data file or DLEX file path and DLEX data file path that is present in the cloud environment from the client to the API to create the PDF report.

  • @param {string}The DLEX file path present in the resource manager.
  • @param {LayoutDataResource} layoutData json data file used to create the PDF report.

func NewDlexWithCloudResourceNLayoutDataPath

func NewDlexWithCloudResourceNLayoutDataPath(cloudResourcePath string, layoutData string) *Dlex
Initializes a new instance of the `DlexInput` class by posting the

DLEX file and the JSON data file or DLEX file path that is present in the cloud environment and the JSON data file or DLEX file path and DLEX data file path that is present in the cloud environment from the client to the API to create the PDF report.

  • @param {string} The DLEX file path present in the resource manager.
  • @param {string} The JSON data file path present in the resource manager used to create the PDF report.

func NewDlexWithDlexNLayoutResources

func NewDlexWithDlexNLayoutResources(dlexResource resource.DlexResource, layoutData resource.LayoutDataResource) *Dlex
Initializes a new instance of the `DlexInput` class by posting the

DLEX file and the JSON data file or DLEX file path that is present in the cloud environment and the JSON data file or DLEX file path and DLEX data file path that is present in the cloud environment from the client to the API to create the PDF report.

  • @param {DlexResource} resource dlex file created as per the desired PDF report layout design.
  • @param {LayoutDataResource} layoutData json data file used to create the PDF report.

func NewDlexWithDlexResourceNLayoutDataPath

func NewDlexWithDlexResourceNLayoutDataPath(dlexResource resource.DlexResource, layoutData string) *Dlex
Initializes a new instance of the `DlexInput` class by posting the

DLEX file and the JSON data file or DLEX file path that is present in the cloud environment and the JSON data file or DLEX file path and DLEX data file path that is present in the cloud environment from the client to the API to create the PDF report.

  • @param {DlexResource} resource dlex file created as per the desired PDF report layout design.
  • @param {string} The JSON data file path present in the resource manager used to create the PDF report.

func (*Dlex) InputType

func (p *Dlex) InputType() InputType

type Html

type Html struct {
	Input
	// contains filtered or unexported fields
}

Represents a HTML input.

func NewHtmlInputWithResource

func NewHtmlInputWithResource(resource resource.HtmlResource) *Html

Initializes a new instance of the `HTMLInput` class.

  • @param { string} input The html embeded as a string.

func NewHtmlInputWithString

func NewHtmlInputWithString(inputString string) *Html

Initializes a new instance of the `HTMLInput` class.

  • @param { string} input The html embeded as a string.

func (*Html) BasePath

func (p *Html) BasePath() string

Gets the BasePath.

func (*Html) BottomMargin

func (p *Html) BottomMargin() float32

Gets the BottomMargin.

func (*Html) InchesToPoints

func (p *Html) InchesToPoints(size float32) float32

func (*Html) InputType

func (p *Html) InputType() InputType

func (*Html) LeftMargin

func (p *Html) LeftMargin() float32

Gets the LeftMargin.

func (*Html) MillimetersToPoints

func (p *Html) MillimetersToPoints(size float32) float32

func (*Html) PageHeight

func (p *Html) PageHeight() float32

Gets the PageHeight.

func (*Html) PageOrientation

func (p *Html) PageOrientation() Orientation

Gets the PageOrientation.

func (*Html) PageSize

func (p *Html) PageSize() PageSize

Gets the PageSize.

func (*Html) PageWidth

func (p *Html) PageWidth() float32

Gets the pageWidth.

func (*Html) Resources

func (p *Html) Resources() []resource.Resource

func (*Html) RightMargin

func (p *Html) RightMargin() float32

Gets the RightMargin.

func (*Html) SetBasePath

func (p *Html) SetBasePath(value string)

sets the BasePath.

func (*Html) SetBottomMargin

func (p *Html) SetBottomMargin(value float32)

sets the BottomMargin.

func (*Html) SetLeftMargin

func (p *Html) SetLeftMargin(value float32)

sets the LeftMargin.

func (*Html) SetPageHeight

func (p *Html) SetPageHeight(value float32)

sets the PageHeight.

func (*Html) SetPageOrientation

func (p *Html) SetPageOrientation(value Orientation)

sets the PageOrientation.

func (*Html) SetPageSize

func (p *Html) SetPageSize(value PageSize)

sets the PageSize.

func (*Html) SetPageWidth

func (p *Html) SetPageWidth(value float32)

sets the pageWidth.

func (*Html) SetRightMargin

func (p *Html) SetRightMargin(value float32)

sets the RightMargin.

func (*Html) SetTopMargin

func (p *Html) SetTopMargin(value float32)

sets the TopMargin.

func (*Html) TopMargin

func (p *Html) TopMargin() float32

Gets the TopMargin.

type Image

type Image struct {
	Input

	// Gets or sets the horizontal scale of the image.
	ScaleX int `json:"scaleX"`

	// Gets or sets the vertical scale of the image.
	ScaleY int `json:"scaleY"`

	// Gets or sets a boolean indicating whether to expand the image.
	ExpandToFit float32 `json:"expandToFit"`

	// Gets or sets a boolean indicating whether to shrink the image.
	ShrinkToFit float32 `json:"shrinkToFit"`

	// Gets or sets the horizontal alignment of the image.
	Align position.Align `json:"align"`

	// Gets or sets the vertical alignment of the image.
	VAlign position.VAlign `json:"vAlign"`
}

Represents an image input.

func NewImageWithResourcePath

func NewImageWithResourcePath(value string) *Image

Initializes a new instance of the `ImageInput` class.

  • @param {string} resource object to create ImageInput. | The image file path present in cloud resource manager.

func NewImagewithImageResource

func NewImagewithImageResource(value resource.ImageResource) *Image

Initializes a new instance of the `ImageInput` class.

  • @param {ImageResource} resource object to create ImageInput. | The image file path present in cloud resource manager.

type Input

type Input struct {
	InputCollector `json:"-"`

	ResourceName string `json:"resourceName,omitempty"`

	Elements               []element.ElementCollector `json:"elements,omitempty"`
	LayoutDataResourceName string                     `json:"layoutDataResourceName,omitempty"`
	// contains filtered or unexported fields
}

func (*Input) BottomMargin

func (p *Input) BottomMargin() float32

Gets the bottom margin.

func (*Input) Element

func (p *Input) Element() []element.ElementCollector

func (*Input) Id

func (p *Input) Id() string

func (*Input) LeftMargin

func (p *Input) LeftMargin() float32

Gets the left margin.

func (*Input) MarshalJSON

func (p *Input) MarshalJSON() ([]byte, error)

func (*Input) Resources

func (p *Input) Resources() []resource.Resource

func (*Input) RightMargin

func (p *Input) RightMargin() float32

Gets the right margin.

func (*Input) SetBottomMargin

func (p *Input) SetBottomMargin(value float32)

sets the bottom margin.

func (*Input) SetId

func (p *Input) SetId(value string)

func (*Input) SetLeftMargin

func (p *Input) SetLeftMargin(value float32)

sets the left margin.

func (*Input) SetRightMargin

func (p *Input) SetRightMargin(value float32)

sets the right margin.

func (*Input) SetTemplate

func (p *Input) SetTemplate(temp element.Template)

Sets the template.

func (*Input) SetTopMargin

func (p *Input) SetTopMargin(value float32)

sets the top margin.

func (*Input) Template

func (p *Input) Template() element.Template

Gets the template.

func (*Input) TopMargin

func (p *Input) TopMargin() float32

Gets the top margin.

type InputCollector

type InputCollector interface {
	InputType() InputType
	Template() element.Template
	Resources() []resource.Resource
	Element() []element.ElementCollector
}

Represents the base class for inputs.

type InputType

type InputType string
const (

	// Dlex input.
	DlexInput InputType = "dlex"

	// Pdf input.
	PdfInput InputType = "pdf"

	// Image input.
	ImageInput InputType = "image"

	// Page input.
	PageInput InputType = "page"

	// Html input.
	HtmlInput InputType = "html"
)

Specifies horizontal alignment. Center alignment is the default value for alignments.

type MergeOptions

type MergeOptions struct {

	/* Gets or sets a boolean indicating whether to import document information when merging. */
	DocumentInfo bool

	// Gets or sets a boolean indicating whether to import document level JavaScript when merging.
	DocumentJavaScript bool

	// Gets or sets a boolean indicating whether to import document properties when merging.
	DocumentProperties bool

	// Gets or sets a boolean indicating whether to import embedded files when merging.
	EmbeddedFiles bool

	// Gets or sets a boolean indicating whether to import form fields when merging.
	FormFields bool

	// Gets or sets a boolean indicating whether to import XFA form data when merging.
	FormsXfaData bool

	// Gets or sets a boolean indicating whether to import logical structure (tagging information) when merging.
	LogicalStructure bool

	// Gets or sets a boolean indicating whether to import document's opening action (initial page and zoom settings) when merging.
	OpenAction bool

	// Gets or sets a boolean indicating whether to import optional content when merging.
	OptionalContentInfo bool

	// Gets or sets a boolean indicating whether to import outlines and bookmarks when merging.
	Outlines bool

	// Gets or sets a boolean indicating whether to import OutputIntent when merging.
	OutputIntent bool

	// Gets or sets a boolean indicating whether to import PageAnnotations when merging.
	PageAnnotations bool

	// Gets or sets a boolean indicating whether to import PageLabelsAndSections when merging.
	PageLabelsAndSections bool

	/*
		Gets or sets the root form field for imported form fields.
		Useful when merging a PDF repeatedly to have a better
		control on the form field names.
	*/
	RootFormField bool

	// Gets or sets a boolean indicating whether to import XmpMetadata when merging.
	XmpMetadata bool
}

Represents different options for merging PDF documents.

func NewMergeOptions

func NewMergeOptions() MergeOptions

type Orientation

type Orientation int
const (

	// Portrait Page Orientation
	Portrait Orientation = 0

	// Landscape Page Orientation
	Landscape Orientation = 1
)

Represents Page Orientation.

type Page

type Page struct {
	Input
	PageHeight float32 `json:"pageHeight"`
	PageWidth  float32 `json:"pageWidth"`
	// contains filtered or unexported fields
}

Represents a page input.

func NewPage

func NewPage() *Page

func NewPageWithDimension

func NewPageWithDimension(width float32, height float32) *Page

Initializes a new instance of the `PageInput` class.

  • @param {float} pageWidth The width of the page.
  • @param {float} pageHeight The height of the page.

func (*Page) BottomMargin

func (p *Page) BottomMargin() float32

Gets the BottomMargin.

func (*Page) Element

func (p *Page) Element() []element.ElementCollector

func (*Page) InchesToPoints

func (p *Page) InchesToPoints(size float32) float32

func (*Page) InputType

func (p *Page) InputType() InputType

func (*Page) LeftMargin

func (p *Page) LeftMargin() float32

Gets the LeftMargin.

func (Page) MarshalJSON

func (p Page) MarshalJSON() ([]byte, error)

func (*Page) MillimetersToPoints

func (p *Page) MillimetersToPoints(size float32) float32

func (*Page) PageOrientation

func (p *Page) PageOrientation() Orientation

Gets the PageOrientation.

func (*Page) PageSize

func (p *Page) PageSize() PageSize

Gets the PageSize.

func (*Page) RightMargin

func (p *Page) RightMargin() float32

Gets the RightMargin.

func (*Page) SetBottomMargin

func (p *Page) SetBottomMargin(value float32)

sets the BottomMargin.

func (*Page) SetLeftMargin

func (p *Page) SetLeftMargin(value float32)

sets the LeftMargin.

func (*Page) SetPageOrientation

func (p *Page) SetPageOrientation(value Orientation)

sets the PageOrientation.

func (*Page) SetPageSize

func (p *Page) SetPageSize(value PageSize)

sets the PageSize.

func (*Page) SetRightMargin

func (p *Page) SetRightMargin(value float32)

sets the RightMargin.

func (*Page) SetTopMargin

func (p *Page) SetTopMargin(value float32)

sets the TopMargin.

func (*Page) TopMargin

func (p *Page) TopMargin() float32

Gets the TopMargin.

type PageSize

type PageSize string
const (
	A3              PageSize = "A3"
	A4              PageSize = "A4"
	A5              PageSize = "A5"
	A6              PageSize = "A6"
	B3              PageSize = "B3"
	B4              PageSize = "B4"
	B5              PageSize = "B5"
	B5JIS           PageSize = "B5JIS"
	DoublePostcard  PageSize = "DoublePostcard"
	Envelope10      PageSize = "Envelope10"
	EnvelopeDL      PageSize = "EnvelopeDL"
	EnvelopeC5      PageSize = "EnvelopeC5"
	EnvelopeB5      PageSize = "EnvelopeB5"
	EnvelopeMonarch PageSize = "EnvelopeMonarch"
	Executive       PageSize = "Executive"
	Legal           PageSize = "Legal"
	Folio           PageSize = "Folio"
	Letter          PageSize = "Letter"
	Postcard        PageSize = "Postcard"
	PRC16K          PageSize = "PRC16K"
	PRC32K          PageSize = "PRC32K"
	Quatro          PageSize = "Quatro"
	Statement       PageSize = "Statement"
	Tabloid         PageSize = "Tabloid"
)

Represents Page Orientation.

type Pdf

type Pdf struct {
	Input
	// Gets or sets the start page.
	StartPage int `json:"startPage"` /*TODO:Nullability*/
	// Gets or sets the page count.
	PageCount int `json:"pageCount"` /*TODO:Nullability*/
	// Gets or sets the merge options `MergeOptions`
	MergeOption MergeOptions `json:"mergeOptions"` /*TODO:Type*/

	Elements []element.ElementCollector `json:"elements"` /*TODO:Type*/
	// contains filtered or unexported fields
}

Represents a pdf input.

func NewPdfWithCloudPath

func NewPdfWithCloudPath(cloudResourcePath string, option MergeOptions) *Pdf

Initializes a new instance of the `PdfInput` class.

  • @param { string } The resource path in cloud resource manager.
  • @param {MergeOptions} mergeOptions The merge options for the pdf.

func NewPdfWithResource

func NewPdfWithResource(resource resource.PdfResource) *Pdf

Initializes a new instance of the `PdfInput` class.

  • @param { PdfResource} resource The resource of type `PdfResource`.
  • @param {MergeOptions} mergeOptions The merge options for the pdf.

func NewPdfWithResourceWithMergerOption

func NewPdfWithResourceWithMergerOption(resource resource.PdfResource, option MergeOptions) *Pdf

Initializes a new instance of the `PdfInput` class.

  • @param { PdfResource} resource The resource of type `PdfResource`.
  • @param {MergeOptions} mergeOptions The merge options for the pdf.

func (*Pdf) InputType

func (p *Pdf) InputType() InputType

func (*Pdf) Resources

func (p *Pdf) Resources() []resource.Resource

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL