pdf_generator

package
v0.0.0-...-a0b5d22 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GeneratorPackageMode     = "package"
	GeneratorApplicationMode = "application"
	GeneratorDefaultMode     = GeneratorApplicationMode
)

Functions

func CreateReturn

func CreateReturn(buf []byte) (utils.Return, error)

Create return instance

Types

type FormApplicationProperties

type FormApplicationProperties struct {
	Text                    string `xml:",chardata"`
	FormHeaderGeneric       string `xml:"FormHeaderGeneric"`
	FormHeaderOriginalData  string `xml:"FormHeaderOriginalData"`
	SystemMode              string `xml:"SystemMode"`
	PrintoutWindowResizable bool   `xml:"PrintoutWindowResizable"`
}

type FormData

type FormData struct {
	XMLName                     xml.Name                        `xml:"AppData"`
	Text                        string                          `xml:",chardata"`
	ApplicationProperties       FormApplicationProperties       `xml:"ApplicationProperties"`
	UserPreferences             FormUserPreferences             `xml:"UserPreferences"`
	Parameters                  FormParameters                  `xml:"Parameters"`
	SubmissionHeaderAndDocument FormSubmissionHeaderAndDocument `xml:"SubmissionHeaderAndDocument"`
}

func (*FormData) String

func (r *FormData) String() string

Converting the struct to String format.

type FormDataCreator

type FormDataCreator struct {
	SubmissionVersion string
	SubmissionYear    int
	SubmissionType    string
	Header            interface{}
	Data              []utils.ReturnInspectData
}

func (*FormDataCreator) GenerateXMLDocument

func (r *FormDataCreator) GenerateXMLDocument(params *XMLParameters) []XMLDocument

type FormParameters

type FormParameters struct {
	Text              string `xml:",chardata"`
	Stage             string `xml:"Stage"`
	DLN               string `xml:"DLN"`
	DLNLatest         string `xml:"DLNLatest"`
	DLNChanged        string `xml:"DLNChanged"`
	TIN               string `xml:"TIN"`
	TINLatest         string `xml:"TINLatest"`
	TINChanged        string `xml:"TINChanged"`
	TaxpayerPrint     bool   `xml:"TaxpayerPrint"`
	Print             string `xml:"Print"`
	DocumentId        string `xml:"DocumentId"`
	ReturnVersion     string `xml:"ReturnVersion"`
	ZoomLevel         string `xml:"ZoomLevel"`
	DisplayName       string `xml:"DisplayName"`
	Regulation        string `xml:"Regulation"`
	Location          string `xml:"Location"`
	LocationSeq       string `xml:"LocationSeq"`
	SubmissionVersion string `xml:"SubmissionVersion"`
	SubmissionType    string `xml:"SubmissionType"`
}

type FormSubmissionHeaderAndDocument

type FormSubmissionHeaderAndDocument struct {
	Text               string      `xml:",chardata"`
	ReturnHeader       interface{} `xml:"ReturnHeader"`
	SubmissionDocument interface{} `xml:"SubmissionDocument"`
}

type FormUserPreferences

type FormUserPreferences struct {
	Text string   `xml:",chardata"`
	View FormView `xml:"View"`
}

type FormView

type FormView struct {
	Text                          string `xml:",chardata"`
	ShowReturnSummaryOnStartup    bool   `xml:"ShowReturnSummaryOnStartup"`
	DefaultZoomLevel              string `xml:"DefaultZoomLevel"`
	ReturnTreeMouseoverBgColor    string `xml:"ReturnTreeMouseoverBgColor"`
	ReturnTreeSelectedItemBgColor string `xml:"ReturnTreeSelectedItemBgColor"`
	ErrorFieldBgColor             string `xml:"ErrorFieldBgColor"`
	ChangedFieldBgColor           string `xml:"ChangedFieldBgColor"`
	TableHeaderBgColor            string `xml:"TableHeaderBgColor"`
	TableRow1BgColor              string `xml:"TableRow1BgColor"`
	TableRow2BgColor              string `xml:"TableRow2BgColor"`
	SingleReturnAutoDisplay       bool   `xml:"SingleReturnAutoDisplay"`
	StartUpDataStage              string `xml:"StartUpDataStage"`
}

type HtmlData

type HtmlData []byte

type PdfData

type PdfData []byte

type PdfGenerator

type PdfGenerator interface {
	GenerateHtml() ([]HtmlData, error)
	GeneratePDF([]HtmlData) ([]PdfData, error)
	GetDocuments() []XMLDocument
}

Html generator form xml

func GetHtmlGenerator

func GetHtmlGenerator(r ReturnFormData, params *XMLParameters, mode string) (PdfGenerator, error)

GetHtmlGenerator returns instance of html generator

type ReturnFormData

type ReturnFormData interface {
	GenerateXMLDocument(params *XMLParameters) []XMLDocument
}

General return data interface

func CreateReturnForm

func CreateReturnForm(instance utils.Return) (ReturnFormData, error)

Create return form

type XMLDocument

type XMLDocument struct {
	XML  []byte
	Type string
	Year int
}

type XMLParameters

type XMLParameters struct {
	Parameters FormParameters
	Properties FormApplicationProperties
	View       FormView
}

Jump to

Keyboard shortcuts

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