pdf

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: CC0-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DocumentTypes lists the supported archival PDFs.
	DocumentTypes = []api.ArchivalPdf{
		{"Certification", "certification-SF86-November2016.template.pdf", "AdditionalComments", "CER"},
		{"Fair Credit Reporting", "credit-SF86-November2016.template.pdf", "Credit", "FCR"},
		{"Medical Release", "medical-SF86-November2016.template.pdf", "Medical", "MEL"},
		{"General Release", "general-SF86-November2016.template.pdf", "General", "REL"},
	}
)

Functions

This section is empty.

Types

type Service

type Service struct {
	Env api.Settings
	Log api.LogService
}

Service implements operations to create and query archival PDFs

func (Service) CreatePdf

func (service Service) CreatePdf(application map[string]interface{}, pdfType api.ArchivalPdf, hash string) ([]byte, error)

CreatePdf creates an in-memory PDF from a template, populated with values from the application, using basic text subsitution. Field names (e.g., SSN) are replaced with application values, space padded to a fixed length to ensure that PDF object/xref byte offsets do not need to be updated. Assumes field values are ASCII. The type of PDF controls the template used. The SHA256 hash of the application, in hexadecimal, may also be populated in the resulting PDF.

func (Service) SignatureAvailable

func (service Service) SignatureAvailable(application map[string]interface{}, pdfType api.ArchivalPdf) (*time.Time, bool)

SignatureAvailable returns the date the eApp section corresponding to the PDF type was signed. If the section was not signed (e.g., no responses requiring medical release), returns nil and false.

Jump to

Keyboard shortcuts

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