BoxLang Quick Tips - PDF Generation
Briefly

The article introduces PDF generation using BoxLang, emphasizing the need to install the PDF Module as it doesn't come built-in. It describes the functionality of new tags like 'bx:document', 'bx:documentitem', and 'bx:documentsection', which structure output in PDFs. A simple demo code illustrates generating a basic PDF and includes a note on the option to save binary data instead of to a file. It also briefly explores adding media like images to enrich PDF content, enhancing the utility of generated documents.
By default, BoxLang doesn't ship with PDF capabilities built-in, you need to add it via the PDF Module. This can be done quickly via the CLI.
The 'bx:document' tag is the core for PDF generation, allowing you to nest content and directives that control the output of your PDF.
An example of the simplest possible PDF generation can be done with <bx:document filename="test1.pdf" overwrite=true> which simply outputs a basic document.
For further enhancements, you can utilize features such as 'localUrl' to include images directly within the PDF, expanding its content capability.
Read at Raymondcamden
[
|
]