{"id":18385482,"url":"https://github.com/prexview/prexview-ruby","last_synced_at":"2026-04-18T11:05:53.942Z","repository":{"id":56888815,"uuid":"79164628","full_name":"prexview/prexview-ruby","owner":"prexview","description":"Transform your data from XML or JSON to high quality, beautiful and readable documents in PDF, HTML, PNG or JPG","archived":false,"fork":false,"pushed_at":"2017-04-07T03:33:08.000Z","size":126,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-16T18:19:01.020Z","etag":null,"topics":["converter","document-conversion","image","json","json-parser","json-to-html","json-to-pdf","json-to-png","pdf","transform","xml","xml-parser","xml-to-html","xml-to-pdf","xml-to-png"],"latest_commit_sha":null,"homepage":"https://prexview.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prexview.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-16T22:15:57.000Z","updated_at":"2023-07-27T05:47:58.000Z","dependencies_parsed_at":"2022-08-20T16:00:24.820Z","dependency_job_id":null,"html_url":"https://github.com/prexview/prexview-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prexview%2Fprexview-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prexview%2Fprexview-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prexview%2Fprexview-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prexview%2Fprexview-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prexview","download_url":"https://codeload.github.com/prexview/prexview-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501948,"owners_count":21114681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","document-conversion","image","json","json-parser","json-to-html","json-to-pdf","json-to-png","pdf","transform","xml","xml-parser","xml-to-html","xml-to-pdf","xml-to-png"],"created_at":"2024-11-06T01:17:46.589Z","updated_at":"2026-04-18T11:05:48.921Z","avatar_url":"https://github.com/prexview.png","language":"Ruby","readme":"# PrexView\n\nA composer library to use PrexView a fast, scalable and very friendly service for programatic HTML, PDF, PNG or JPG generation using JSON or XML data.\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'PrexView'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install PrexView\n\n## Quick Start\n\nGet the token key by downloading PrexView Studio, [click here for download](https://prexview.com/downloads/)\n\nIf you don't have an account create one and open the API option\n\n![API token](./img/api.png)\n\nThere are two ways to use the token, our recomendation and good practice is to use the default environment variable `PREXVIEW_TOKEN` :\n\n```bash\n$ export PREXVIEW_TOKEN=\u003ctoken\u003e\n```\n\nIn your application\n\n```ruby\n# xml example\nxml = \"\u003cxml\u003ehello world\u003c/xml\u003e\"\ncode, response = PrexView.send_xml(xml, {type: 'xml', design: \"design-xml\"})\n```\n\n```ruby\n# json example\njson = { \"hello\": \"world\" }\ncode, response = PrexView.send_json(json, {type: 'json', design: \"design-json\" })\n```\n\nThe second way is to pass the token key as a parameter\n\n```ruby\n# xml example\nxml = \"\u003cxml\u003ehello world\u003c/xml\u003e\"\nPrexView.send_xml(xml, {type: 'xml', design: \"design-xml\", token: \"\u003ctoken\u003e\" })\n```\n\n```ruby\n# json example\njson = { \"hello\": \"world\" }\ncode, response = PrexView.send_json(json, {type: 'json', design: \"design-json\", token: \"\u003ctoken\u003e\" })\n```\n\n**Design:** For use design first you add a design in PrexView Studio, go to design section and create one:\n\n![Design](./img/design.png)\n\nFor more information please check the [documentation](https://prexview.com/docs/) or look our [examples](/examples/)\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/prexview/prexview-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## Credits\n\nThis gem is developed and maintained by [Urielable](https://twitter.com/urielable) - [blog](http://blog.urielable.com/)\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprexview%2Fprexview-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprexview%2Fprexview-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprexview%2Fprexview-ruby/lists"}