mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
Merge pull request #571 from alafr/patch-1
Documentation for cover, align and valign
This commit is contained in:
commit
bd131a4cd9
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user