Users can generate a PDF from a lml template without installing additional software
Users can generate a PDF from a template, without the need to install additional software, e.g. LaTeX.
Acceptance criteria:
-
The user does not have to install additional software. -
The resulting PDFs for services reproduce the content and format of AGES, Initiatives' PDFs. -
PDFs for books can be generated with a table of contents if the user requests it. >> Not implementable apart from LaTeX. -
Monolingual PDFs have two columns and the text flows left top to left bottom to right top to right bottom for left to right languages. -
Multilingual PDFs are internally rows with columns for each language / version / library. -
Styles used in the PDF are applied based on information in a css stylesheet.
Notes
-
The PDF generator will receive an ATEM (abstract template) as it's input. The ATEM will contain information for page footers and headers and the content of the PDF.
-
These terms can be treated as synonyms: library, version, language, though technically, a library specifies an iso language, country, and a user defined realm.
-
The suggested golang PDF package to use is: gofpdf. Note that it is now archived and not actively supported. There have been many forks of it. If it meets our needs as is, then we should use it. If not, and there are no better alternatives, we can fork and modify it. Here is an actively maintained fork: fpdf.
-
The PDFs to be duplicated are:
-
Divine Liturgy for July 5, 2020: English, Greek-English
-
Divine Liturgy for July 6, 2020: English, Greek-English
-
Small Blessing of the Waters: English, Greek-English
-
Wedding: English, Greek-English.
-
-
To run the site builder (aka generator), open a terminal window and cd to cmd/doxago, then enter:
go run main.go build
- The code to be developed should be placed in:
pkg/generators/pdf.go
- The main method in pdf.go is:
func (m *MetaPDF) CreatePDF()
This method is generating a stubbed out PDF.
- The PDF fonts and styles are in demo/assets/pdf in the generated doxa directory.