Expand All
Collapse All
As a developer
I want to generate pdf reports from the cli
In order to be able to use it the reports from any programming language
{ "id": "http://www.example.com/json-schema/v2/tpl/example-template", "$schema": "http://json-schema.org/draft-04/schema#", "description": "Example Template" }
module Rodolfo # Example class Template < Prawn::Document def initialize(data, options = {}) @data = data super page_size: 'A4', page_layout: :portrait, **options end def render text @data[:msg] super end end end
{"msg": "Hello World"}
Hello World |
Hello World |
{ "id": "http://www.example.com/json-schema/v2/tpl/example-template", "$schema": "http://json-schema.org/draft-04/schema#", "description": "Example", "required": ["name", "country"], "properties": { "name": {"type": "string"}, "country": {"type": "string"} } }
{"name": "Carlos"}
{ "id": "http://www.example.com/json-schema/v2/tpl/example-template", "$schema": "http://json-schema.org/draft-04/schema#", "description": "Example", "required": [], "properties": { "name": {"type": "string"}, "country": {"type": "string"} } }
{"name": "Carlos"}
{ "id": "http://www.example.com/json-schema/v2/tpl/example-template", "$schema": "http://json-schema.org/draft-04/schema#", "description": "Example", "required": ["name"], "properties": { "name": {"type": "string"} } }
module Rodolfo # Example class Template < Prawn::Document def initialize(data, options = {}) @data = data super page_size: 'A4', page_layout: :portrait, **options end def render text @data[:msg] text @data[:user][:name] super end end end
{"name": "Carlos"}