Permalink
Browse files

Added image example to README

  • Loading branch information...
1 parent b13423b commit 387da605cb8777c913f67143b1f8cfde1831f9c2 @Wildhoney Wildhoney committed Oct 3, 2016
Showing with 7 additions and 0 deletions.
  1. +7 −0 README.md
View
@@ -75,6 +75,13 @@ doc.font('fonts/PalatinoBold.ttf')
.fontSize(25)
.text('Some text with an embedded font!', 100, 100)
+# Add an image, constrain it to a given size, and center it vertically and horizontally
+doc.image('path/to/image.png', {
+ fit: [250, 300],
+ align: 'center',
+ valign: 'center'
+});
+
# Add another page
doc.addPage()
.fontSize(25)

0 comments on commit 387da60

Please sign in to comment.