Version, currently master branch1 version
- master branchlatestJan 8, 2019
github.com/oneiros/pdf.cr
crystal library for pdf generation (WIP)
9 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
pdf:
github: oneiros/pdf.cr
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.27.0- License
- MIT
- Author
- David Roetzel <david@roetzel.de>
Dependencies
This version declares no dependencies.
README
# pdf.cr
A crystal PDF library in _very_ early stages of development.
The immediate goal is to generate PDF files, possibly similar to the ruby gem
`prawn`.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
pdf:
github: oneiros/pdf.cr
```
2. Run `shards install`
## Usage
```crystal
require "pdf"
```
### Document Creation DSL
```crystal
include PDF::DSL
my_pdf = document do
page_size A4
page_orientation Orientation::Landscape
page do
text "Headline", at: {0, 10}
line from: {0, 0}, to: {10, 10}
end
page do
circle at: {100, 100}, radius: 20
end
end
my_pdf.write_to_file("/tmp/my.pdf")
```
### Low-level primitives
The classes in `src/pdf/core/` provide a very low-level abstraction, trying to
preserve naming used in the PDF spec.
`src/pdf/core/primitives/` holds classes that represent "objects", the basic
building blocks of a PDF file.
## Development
TODO: Write development instructions here
## Contributing
1. Fork it (<https://github.com/oneiros/pdf.cr/fork>)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## Contributors
- [David Roetzel](https://github.com/oneiros) - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jan 8, 2019
- Crystal
0.27.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/oneiros/pdf.cr
Metadata
- Created
- Aug 13, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 1