From 9e8c8126d40f098b640c0d2f1f692fcf0f0c5df9 Mon Sep 17 00:00:00 2001 From: alafr Date: Mon, 7 Nov 2016 18:36:18 +0200 Subject: [PATCH 1/2] Update images.coffee.md --- docs/images.coffee.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/images.coffee.md b/docs/images.coffee.md index 41f288a..092b2ec 100644 --- a/docs/images.coffee.md +++ b/docs/images.coffee.md @@ -13,6 +13,7 @@ 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 Here is an example showing some of these options. From deda269ae6eccd9e5291e213b7f87e394b2c812a Mon Sep 17 00:00:00 2001 From: alafr Date: Mon, 7 Nov 2016 19:00:54 +0200 Subject: [PATCH 2/2] Update images.coffee.md --- docs/images.coffee.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/images.coffee.md b/docs/images.coffee.md index 092b2ec..ebd05c5 100644 --- a/docs/images.coffee.md +++ b/docs/images.coffee.md @@ -15,6 +15,10 @@ be scaled according to the following options. * `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. # Scale proprotionally to the specified width