Open 800a7b32 opened 2 years ago
Hello @800a7b32, thanks for the PR! Seen that this is a bit important changes, I would require to check deeper your code changes, will do that as soon I will have some spare time and provide feedback on the code.
Thanks again!
If I may add some input: I would recommend replacing QRPRAWNLayout
with a prawn extension module like so https://prawnpdf.org/docs/0.11.1/Prawn/Document.html#method-c-extensions (e.g. call it QRBills::PrawnExtension
).
With this there is no need for additional params and layout logic and one can just simply add the extension and use it within their pdf workflow.
An example:
Prawn::Document.extensions << QRBills::PrawnExtension
Prawn::Document.generate("foo.pdf") do
qr_bills_payslip(qr_bills_params)
end
This PR provides native prawn templates for the QR-Bills gem. The prawn block is wrapped in #canvas as per prawn specs