Documentation
¶
Index ¶
- type Converter
- func (p *Converter) BottomMargin() float32
- func (p *Converter) InchesToPoints(size float32) float32
- func (p *Converter) LeftMargin() float32
- func (p *Converter) MillimetersToPoints(size float32) float32
- func (p *Converter) PageHeight() float32
- func (p *Converter) PageOrientation() Orientation
- func (p *Converter) PageSize() PageSize
- func (p *Converter) PageWidth() float32
- func (p *Converter) RightMargin() float32
- func (p *Converter) SetBottomMargin(value float32)
- func (p *Converter) SetLeftMargin(value float32)
- func (p *Converter) SetPageHeight(value float32)
- func (p *Converter) SetPageOrientation(value Orientation)
- func (p *Converter) SetPageSize(value PageSize)
- func (p *Converter) SetPageWidth(value float32)
- func (p *Converter) SetRightMargin(value float32)
- func (p *Converter) SetTopMargin(value float32)
- func (p *Converter) TopMargin() float32
- type Dlex
- func NewDlexWithCloudResourceNLayoutData(cloudResourcePath string, layoutData resource.LayoutDataResource) *Dlex
- func NewDlexWithCloudResourceNLayoutDataPath(cloudResourcePath string, layoutData string) *Dlex
- func NewDlexWithDlexNLayoutResources(dlexResource resource.DlexResource, layoutData resource.LayoutDataResource) *Dlex
- func NewDlexWithDlexResourceNLayoutDataPath(dlexResource resource.DlexResource, layoutData string) *Dlex
- type Excel
- type Html
- type Image
- func (p *Image) BottomMargin() float32
- func (p *Image) InputType() InputType
- func (p *Image) LeftMargin() float32
- func (p *Image) PageHeight() float32
- func (p *Image) PageWidth() float32
- func (p *Image) RightMargin() float32
- func (p *Image) SetBottomMargin(value float32)
- func (p *Image) SetLeftMargin(value float32)
- func (p *Image) SetPageHeight(value float32)
- func (p *Image) SetPageWidth(value float32)
- func (p *Image) SetRightMargin(value float32)
- func (p *Image) SetTopMargin(value float32)
- func (p *Image) TopMargin() float32
- type Input
- func (p *Input) Element() []element.ElementCollector
- func (p *Input) Id() string
- func (p *Input) MarshalJSON() ([]byte, error)
- func (p *Input) Resources() []resource.Resource
- func (p *Input) SetId(value string)
- func (p *Input) SetTemplate(temp element.Template)
- func (p *Input) Template() element.Template
- type InputCollector
- type InputType
- type MergeOptions
- type Orientation
- type Page
- func (p *Page) BottomMargin() float32
- func (p *Page) Element() []element.ElementCollector
- func (p *Page) InchesToPoints(size float32) float32
- func (p *Page) InputType() InputType
- func (p *Page) LeftMargin() float32
- func (p Page) MarshalJSON() ([]byte, error)
- func (p *Page) MillimetersToPoints(size float32) float32
- func (p *Page) PageHeight() float32
- func (p *Page) PageOrientation() Orientation
- func (p *Page) PageSize() PageSize
- func (p *Page) PageWidth() float32
- func (p *Page) RightMargin() float32
- func (p *Page) SetBottomMargin(value float32)
- func (p *Page) SetLeftMargin(value float32)
- func (p *Page) SetPageHeight(value float32)
- func (p *Page) SetPageOrientation(value Orientation)
- func (p *Page) SetPageSize(value PageSize)
- func (p *Page) SetPageWidth(value float32)
- func (p *Page) SetRightMargin(value float32)
- func (p *Page) SetTopMargin(value float32)
- func (p *Page) TopMargin() float32
- type PageSize
- type Pdf
- type TextReplace
- type Word
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶ added in v2.1.0
type Converter struct { Input // contains filtered or unexported fields }
Represents the base class for inputs.
func (*Converter) BottomMargin ¶ added in v2.1.0
Gets the BottomMargin.
func (*Converter) InchesToPoints ¶ added in v2.1.0
func (*Converter) LeftMargin ¶ added in v2.1.0
Gets the LeftMargin.
func (*Converter) MillimetersToPoints ¶ added in v2.1.0
func (*Converter) PageHeight ¶ added in v2.1.0
Gets the PageHeight.
func (*Converter) PageOrientation ¶ added in v2.1.0
func (p *Converter) PageOrientation() Orientation
Gets the PageOrientation.
func (*Converter) RightMargin ¶ added in v2.1.0
Gets the RightMargin.
func (*Converter) SetBottomMargin ¶ added in v2.1.0
sets the BottomMargin.
func (*Converter) SetLeftMargin ¶ added in v2.1.0
sets the LeftMargin.
func (*Converter) SetPageHeight ¶ added in v2.1.0
sets the PageHeight.
func (*Converter) SetPageOrientation ¶ added in v2.1.0
func (p *Converter) SetPageOrientation(value Orientation)
sets the PageOrientation.
func (*Converter) SetPageSize ¶ added in v2.1.0
sets the PageSize.
func (*Converter) SetPageWidth ¶ added in v2.1.0
sets the pageWidth.
func (*Converter) SetRightMargin ¶ added in v2.1.0
sets the RightMargin.
func (*Converter) SetTopMargin ¶ added in v2.1.0
sets the TopMargin.
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 ¶
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.
type Excel ¶ added in v2.1.0
type Excel struct {
Converter
}
Represents a Excel input.
func NewExcelInputWithResource ¶ added in v2.1.0
func NewExcelInputWithResource(resources resource.ExcelResource) *Excel
Initializes a new instance of the `ExcelInput` class.
- @param { string} input The Excel embeded as a string.
type Html ¶
type Html struct {
Converter
}
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 ¶
Initializes a new instance of the `HTMLInput` class.
- @param { string} input The html embeded as a string.
type Image ¶
type Image struct {
Input
}
Represents an image input.
func NewImageWithResourcePath ¶
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.
func (*Image) SetBottomMargin ¶
sets the BottomMargin.
type Input ¶
type Input struct { InputCollector `json:"-"` ResourceName string `json:"resourceName,omitempty"` Elements []element.ElementCollector `json:"elements,omitempty"` LayoutDataResourceName string `json:"layoutDataResourceName,omitempty"` TextReplace []TextReplace `json:"textReplace,omitempty"` ScaleX float32 `json:"scaleX,omitempty"` ScaleY float32 `json:"scaleY,omitempty"` VAlign position.VAlign `json:"vAlign,omitempty"` Align position.Align `json:"align,omitempty"` ExpandToFit bool `json:"expandToFit,omitempty"` ShrinkToFit bool `json:"shrinkToFit,omitempty"` StartPage int `json:"startPage,omitempty"` PageCount int `json:"pageCount,omitempty"` /*TODO:Nullability*/ MergeOption MergeOptions `json:"mergeOptions,omitempty"` /*TODO:Type*/ // contains filtered or unexported fields }
func (*Input) Element ¶
func (p *Input) Element() []element.ElementCollector
func (*Input) MarshalJSON ¶
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" //Word input WordInput InputType = "word" //Excel input ExcelInput InputType = "excel" )
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 `json:"documentInfo,omitempty"` // Gets or sets a boolean indicating whether to import document level JavaScript when merging. DocumentJavaScript *bool `json:"documentJavaScript,omitempty"` // Gets or sets a boolean indicating whether to import document properties when merging. DocumentProperties *bool `json:"documentProperties,omitempty"` // Gets or sets a boolean indicating whether to import embedded files when merging. EmbeddedFiles *bool `json:"embeddedFiles,omitempty"` // Gets or sets a boolean indicating whether to import form fields when merging. FormFields *bool `json:"formFields,omitempty"` // Gets or sets a boolean indicating whether to import XFA form data when merging. FormsXfaData *bool `json:"formsXfaData,omitempty"` // Gets or sets a boolean indicating whether to import logical structure (tagging information) when merging. LogicalStructure *bool `json:"logicalStructure,omitempty"` // Gets or sets a boolean indicating whether to import document's opening action (initial page and zoom settings) when merging. OpenAction *bool `json:"openAction,omitempty"` // Gets or sets a boolean indicating whether to import optional content when merging. OptionalContentInfo *bool `json:"optionalContentInfo,omitempty"` // Gets or sets a boolean indicating whether to import outlines and bookmarks when merging. Outlines *bool `json:"outlines,omitempty"` // Gets or sets a boolean indicating whether to import OutputIntent when merging. OutputIntent *bool `json:"outputIntent,omitempty"` // Gets or sets a boolean indicating whether to import PageAnnotations when merging. PageAnnotations *bool `json:"pageAnnotations,omitempty"` // Gets or sets a boolean indicating whether to import PageLabelsAndSections when merging. PageLabelsAndSections *bool `json:"pageLabelsAndSections,omitempty"` /* 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 string `json:"rootFormField,omitempty"` // Gets or sets a boolean indicating whether to import XmpMetadata when merging. XmpMetadata *bool `json:"xmpMetadata,omitempty"` }
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 // contains filtered or unexported fields }
Represents a page input.
func NewPageWithDimension ¶
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 NewPageWithSizeAndOrientation ¶ added in v2.1.2
func NewPageWithSizeAndOrientation(pageSize PageSize, pageOrientation Orientation, margins float32) *Page
Initializes a new instance of the `PageInput` class.
- @param {PageSize} pageSize The size of the page.
- @param {Orientation} Orientation The orientation of the page.
- @param {float32} margins The margins of the page.
func (*Page) Element ¶
func (p *Page) Element() []element.ElementCollector
func (*Page) InchesToPoints ¶
func (Page) MarshalJSON ¶
func (*Page) MillimetersToPoints ¶
func (*Page) PageOrientation ¶
func (p *Page) PageOrientation() Orientation
Gets the PageOrientation.
func (*Page) SetPageOrientation ¶
func (p *Page) SetPageOrientation(value Orientation)
sets the PageOrientation.
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 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.
type TextReplace ¶
type TextReplace struct {
Input
}
Represents a Word input.
func NewTextReplace ¶
func NewTextReplace(text string, replaceText string, matchCase bool) *TextReplace
* Represents the find and replace values and its options.
func (*TextReplace) MatchCase ¶
func (p *TextReplace) MatchCase() bool
* If True, the search operation will be case sensitive.
func (*TextReplace) ReplaceText ¶
func (p *TextReplace) ReplaceText() string
* Gets or sets ReplaceText value.This string will replace the <see cref="Text"/> during conversion
func (*TextReplace) SetMatchCase ¶
func (p *TextReplace) SetMatchCase(value bool)
func (*TextReplace) SetReplaceText ¶
func (p *TextReplace) SetReplaceText(value string)
*sets ReplaceText value.This string will replace the <see cref="Text"/> during conversion
func (*TextReplace) SetText ¶
func (p *TextReplace) SetText(value string)
* sets the Find Text value. This string will be replaced with <see cref="ReplaceText"/> during conversion.
func (*TextReplace) Text ¶
func (p *TextReplace) Text() string
* Gets the Find Text value. This string will be replaced with <see cref="ReplaceText"/> during conversion.
type Word ¶
type Word struct {
Converter
}
Represents a Word input.
func NewWordInputWithResource ¶
func NewWordInputWithResource(resources resource.WordResource) *Word
Initializes a new instance of the `WordInput` class.
- @param { string} input The Word embeded as a string.