@@ -16,6 +16,7 @@ be scaled according to the following options.
1616* ` cover ` array provided - image is scaled proportionally to completely cover the rectangle defined by the passed width and height
1717
1818When a ` fit ` or ` cover ` array is provided, PDFKit accepts these additional options:
19+
1920* ` align ` - horizontally align the image, the possible values are ` 'left' ` , ` 'center' ` and ` 'right' `
2021* ` valign ` - vertically align the image, the possible values are ` 'top' ` , ` 'center' ` and ` 'bottom' `
2122
@@ -41,15 +42,14 @@ Here is an example showing some of these options.
4142
4243 // Fit the image in the dimensions, and center it both horizontally and vertically
4344 doc.image('images/test.jpeg', 430, 15, {fit: [100, 100], align: 'center', valign: 'center'})
44- .rect(430, 15, 100, 100)
45- .stroke()
45+ .rect(430, 15, 100, 100).stroke()
4646 .text('Centered', 430, 0);
4747
4848* * *
4949
5050This example produces the following output:
5151
52- ![ 0] ( images/images.png " 150 ")
52+ ![ 0] ( images/images.png " 400 ")
5353
5454That is all there is to adding images to your PDF documents with PDFKit. Now
55- let's look at adding annotations .
55+ let's look at adding outlines .
0 commit comments