Merge pull request #571 from alafr/patch-1

Documentation for cover, align and valign
This commit is contained in:
Devon Govett 2016-11-07 14:12:29 -05:00 committed by GitHub
commit bd131a4cd9

View File

@ -13,6 +13,11 @@ be scaled according to the following options.
* Both `width` and `height` provided - image is stretched to the dimensions provided
* `scale` factor provided - image is scaled proportionally by the provided scale factor
* `fit` array provided - image is scaled proportionally to fit within the passed width and height
* `cover` array provided - image is scaled proportionally to completely cover the rectangle defined by the passed width and height
When a `fit` or `cover` array is provided, PDFKit accepts these additional options:
* `align` - horizontally align the image, the possible values are `'left'`, `'center'` and `'right'`
* `valign` - vertically align the image, the possible values are `'top'`, `'center'` and `'bottom'`
Here is an example showing some of these options.