Documentation ¶
Index ¶
- func IsGifImage(header []byte) bool
- func IsJpeg2000Image(header []byte) bool
- func IsJpegImage(header []byte) bool
- func IsPngImage(header []byte) bool
- func IsTiffImage(header []byte) bool
- func IsValidBitmapImage(header []byte) bool
- type DlexResource
- type FontResource
- type HtmlResource
- type ImageResource
- type LayoutDataResource
- type PdfResource
- type Resource
- type ResourceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsGifImage ¶
func IsJpeg2000Image ¶
func IsJpegImage ¶
func IsPngImage ¶
func IsTiffImage ¶
func IsValidBitmapImage ¶
Types ¶
type DlexResource ¶
type DlexResource struct { Resource // contains filtered or unexported fields }
Represents a Dlex resource object that is created using the DLEX file and a name.
func NewDlexResourceWithByteValue ¶
func NewDlexResourceWithByteValue(value []byte, resourceName string) *DlexResource
Initializes a new instance of the `DlexResource` class with DLEX file path and resource name or byte data of the DLEX file and resource name as parameters.
- @param {byte[]} The byte array of the dlex file.
- @param {string} resource The name of the resource.
func NewDlexResourceWithPath ¶
func NewDlexResourceWithPath(dlexPath string, resourceName string) *DlexResource
Initializes a new instance of the `DlexResource` class with DLEX file path and resource name or byte data of the DLEX file and resource name as parameters.
- @param {string} dlex The dlex file path.
- @param {string} resource The name of the resource.
func (DlexResource) LayoutDataResourceName ¶
func (p DlexResource) LayoutDataResourceName() string
Gets name for layout data resource.
func (DlexResource) ResourceType ¶
func (p DlexResource) ResourceType() ResourceType
func (DlexResource) SetLayoutDataResourceName ¶
func (p DlexResource) SetLayoutDataResourceName(layoutData string)
Sets name for layout data resource.
type FontResource ¶
type FontResource struct {
Resource
}
func NewFontResource ¶
func NewFontResource() *FontResource
func (FontResource) FileExtension ¶
func (p FontResource) FileExtension() string
func (FontResource) ResourceType ¶
func (p FontResource) ResourceType() ResourceType
type HtmlResource ¶
type HtmlResource struct {
Resource
}
Represents the pdf resource.
func NewHtmlResource ¶
func NewHtmlResource(resource string, resourceName string) HtmlResource
Initializes a new instance of the `HtmlResource` class with html string and resource name. * @param {string} html The Html string. * @param {string} resource The name of the resource.
func (HtmlResource) ResourceType ¶
func (p HtmlResource) ResourceType() ResourceType
type ImageResource ¶
type ImageResource struct {
Resource
}
Represents an image resource used to create an `ImageResource` object to create PDF from images.
func NewImageResourceWithByteValue ¶
func NewImageResourceWithByteValue(resource []byte, resourceName string) ImageResource
Initializes a new instance of the `ImageResource` class.
- @param {Byte[]} The byte array of the image file.
- @param {string} resourceName The name of the resource.
func NewImageResourceWithResourcePath ¶
func NewImageResourceWithResourcePath(resource string, resourceName string) ImageResource
Initializes a new instance of the `ImageResource` class.
- @param {string} filePath The image file path.
- @param {string} resourceName The name of the resource.
func (ImageResource) ResourceType ¶
func (p ImageResource) ResourceType() ResourceType
type LayoutDataResource ¶
type LayoutDataResource struct {
Resource
}
Represents the Layout data resource used to create PDF reports.
func NewLayoutDataResource ¶
func NewLayoutDataResource(filepath string, layoutdataresourcename string) LayoutDataResource
Initializes a new instance of the `LayoutDataResource` class using the layout data object and a resource name.
- @param {string }The layout data JSON file path.
- @param {string} layoutDataResourceName The name for layout data resource.
func (LayoutDataResource) ResourceType ¶
func (p LayoutDataResource) ResourceType() ResourceType
type PdfResource ¶
type PdfResource struct { Resource // contains filtered or unexported fields }
Represents the pdf resource.
func NewPdfResourceWithByteValue ¶
func NewPdfResourceWithByteValue(resource string, resourceName string) PdfResource
Initializes a new instance of the `PdfResource` class.
- @param {Byte[]}The byte array of the pdf file.
- @param {string} resourceName The name of the resource.
func NewPdfResourceWithResourcePath ¶
func NewPdfResourceWithResourcePath(resource string, resourceName string) PdfResource
Initializes a new instance of the `PdfResource` class.
- @param {string} input The pdf file path.
- @param {string} resourceName The name of the resource.
func (PdfResource) ResourceType ¶
func (p PdfResource) ResourceType() ResourceType
type Resource ¶
type Resource struct { // Gets or sets the resource name. ResourceName string `json:"resourceName,omitempty"` LayoutDataResourceName string `json:"layoutDataResourceName,omitempty"` // contains filtered or unexported fields }
Represents the base class resource.
func NewResourceWithPath ¶
func (*Resource) MarshalJSON ¶
func (*Resource) ResourceType ¶
func (p *Resource) ResourceType() ResourceType
type ResourceType ¶
type ResourceType int
const ( // Image resource. ImageResourceType ResourceType = 0 // Pdf resource. PdfResourceType ResourceType = 1 // LayoutData resource. LayoutDataResourceType ResourceType = 2 // Dlex resource. DlexResourceType ResourceType = 3 // Font resource. FontResourceType ResourceType = 4 // Html resource HtmlResourceType ResourceType = 5 )