Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nimPDF.nimble
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
packageName = "nimPDF"
version = "0.4.3"
version = "0.5.0"
author = "Andri Lim"
description = "PDF document generation library written in nim"
license = "MIT"
Expand Down
61 changes: 31 additions & 30 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,39 @@ nimPDF implements the following features(see [demo.pdf](https://github.com/jangk

nimPDF version 0.4.0 introduces many breaking changes, see [migration guide](migration.md) to help you change your code.

* **images**
* **Images**
- PNG -- ~~use [LodePNG](lodev.org/lodepng), still in C~~ now written in nim
- JPEG -- use [uJPEG (MicroJPEG) -- KeyJ's Small Baseline JPEG Decoder](http://keyj.emphy.de/nanojpeg), still in C
- BMP -- use [EasyBMP](http://easybmp.sourceforge.net), already ported to nim, support 1bit, 4bit, 8bit, 16bit, 24bit, and 32bit images
- beside transparency from original image(such as from PNG), you can adjust individual image transparency as easy as other elements in your document

* **text and fonts**
- support TTF/TTC font subsetting -- use [Google sfntly](code.google.com/p/sfntly), ported(partially) to nim and modified
- you can easily tell the library to look for fonts in certain folder(s)
- you only need to ask for font family name and it's style, the library will try to find the right one for you(if avilable)
- text encoded in UTF-8 if you use TTF/TTC
* **Text and fonts**
- Support TTF/TTC font subsetting -- use [Google sfntly](code.google.com/p/sfntly), ported(partially) to nim and modified
- You can easily tell the library to look for fonts in certain folder(s)
- You only need to ask for font family name and it's style, the library will try to find the right one for you(if avilable)
- Text encoded in UTF-8 if you use TTF/TTC
- 14 base font in PDF use Standard,MacRoman,WinAnsi encoding
- TTF/TTC fonts can be written vertically if they have vertical metrics

* **Path construction**
- straight segments, Bezier curves, elliptical arcs, roundrect
- join styles and miter limits
- dash patterns
- path clipping
- arbitrary path bounding box calculation(i use it to implement gradient too)
- construct path from mathematical function - taken from [ C# GraphDisplay](http://www.codeproject.com/Articles/58280/GraphDisplay-a-Bezier-based-control-for-graphing-f)
- Straight segments, Bezier curves, elliptical arcs, roundrect
- Join styles and miter limits
- Dash patterns
- Path clipping
- Arbitrary path bounding box calculation(i use it to implement gradient too)
- Construct path from mathematical function - taken from [ C# GraphDisplay](http://www.codeproject.com/Articles/58280/GraphDisplay-a-Bezier-based-control-for-graphing-f)

* **Color spaces**
- Gray, RGB, CMYK
- alpha channel for text, path, and images too!
- linear gradient to fill any closed shape
- radial gradient to fill any closed shape
- Alpha channel for text, path, and images too!
- Linear gradient to fill any closed shape
- Radial gradient to fill any closed shape

* **Interactive Features**(see demo folder)
- Page Labels
- Document Outline
- Hyperlinks
- Text annotation
- Encryption(protect document with password)
- choose between ARC4-40, ARC4-128, AES-128, AES-256 encryption mode
- Text annotation
- Form Field:
- TextField
- Combo Box
Expand All @@ -58,17 +56,20 @@ nimPDF version 0.4.0 introduces many breaking changes, see [migration guide](mig
- Check Box

* **Coordinate Space**
- top-down mode
- bottom-up mode
- unit measured in point, inch, and mm

* **others**
- output to file or memory using nim stream module
- images, fonts, and other resources search path(s)
- document compression using flate decode(use lodePNG compressor)
- transformation and graphics state

* **unimplemented features**
- Top-down mode
- Bottom-up mode
- Unit measured in point, inch, and mm

* **Others**
- Output to file or memory using nim stream module
- Images, fonts, and other resources search path(s)
- Document compression using flate decode(use lodePNG compressor)
- Transformation and graphics state
- Encryption(protect document with password)
- choose between ARC4-40, ARC4-128, AES-128, AES-256 encryption mode
- Table generator

* **Unimplemented features**
- CIE based color space
- patterns(this can be achieved using PDF primitives and path clipping)
- ~~encryption~~
Expand All @@ -77,7 +78,7 @@ nimPDF version 0.4.0 introduces many breaking changes, see [migration guide](mig
- ~~other encoding beside UTF-8~~(nim has [encoding](http://nim-lang.org/docs/encodings.html) module, i will use it someday)
- basic text formating(will be implemented as separate layer)
- ~~radial gradient~~ and multi color gradient
- table generator(as in FPDF)(will be implemented as separate layer)
- ~~table generator(as in FPDF)(will be implemented as separate layer)~~
- ~~document outline~~
- permission
- digital signature
Expand Down