Skip to content

Commit 64d2fb8

Browse files
committed
A few docs fixes
1 parent 15636ee commit 64d2fb8

8 files changed

Lines changed: 16 additions & 12 deletions

File tree

‎.gitignore‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ demo/bundle.js
1010
*.html
1111
!demo/browser.html
1212
.vscode
13-
coverage
13+
coverage
14+
tests/integration/__pdfs__
15+
tests/integration/pdfmake/__pdfs__

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ A JavaScript PDF generation library for Node and the browser.
44

55
## Description
66

7-
PDFKit is a PDF document generation library for Node and the browser that makes creating complex, multi-page, printable documents easy.
8-
It's written in CoffeeScript, but you can choose to use the API in plain 'ol JavaScript if you like. The API embraces
9-
chainability, and includes both low level functions as well as abstractions for higher level functionality. The PDFKit API
10-
is designed to be simple, so generating complex documents is often as simple as a few function calls.
7+
PDFKit is a PDF document generation library for Node and the browser that makes creating complex, multi-page, printable
8+
documents easy. The API embraces chainability, and includes both low level functions as well as abstractions for higher
9+
level functionality. The PDFKit API is designed to be simple, so generating complex documents is often as simple as
10+
a few function calls.
1111

1212
Check out some of the [documentation and examples](http://pdfkit.org/docs/getting_started.html) to see for yourself!
1313
You can also read the guide as a [self-generated PDF](http://pdfkit.org/docs/guide.pdf) with example output displayed inline.

‎docs/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The PDFKit guide can be read a number of ways. The first is online at [pdfkit.org](http://pdfkit.org/).
44
You can also read the guide in PDF form, in this directory or [online](http://pdfkit.org/docs/guide.pdf).
55

6-
Both the website and the PDF guide are generated from the Literate CoffeeScript (runnable Markdown) files
6+
Both the website and the PDF guide are generated from the Markdown files
77
in this directory. The examples are actually run when generating the PDF in order to show the results inline.
88
The `generate.js` file in this directory is actually quite short. It parses the markdown files into a
99
tree structure using [markdown-js](https://github.com/evilstreak/markdown-js), syntax highlights the code

‎docs/annotations.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ The output is as you'd expect:
8787
That's all there is to creating PDF documents in PDFKit. It's really quite
8888
simple to create beautiful multi-page printable documents using Node.js!
8989

90-
This guide was generated from Markdown/Literate CoffeeScript files using a
90+
This guide was generated from Markdown files using a
9191
PDFKit generation script. The examples are actually run to generate the output shown
9292
inline. The script generates both the website and the PDF guide, and
9393
can be found [on Github](http://github.com/devongovett/pdfkit/tree/master/docs/generate.coffee).

‎docs/getting_started.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ following command after installing npm.
1010
### Creating a document
1111

1212
Creating a PDFKit document is quite simple. Just require the `pdfkit` module
13-
in your CoffeeScript or JavaScript source file and create an instance of the
13+
in your JavaScript source file and create an instance of the
1414
`PDFDocument` class.
1515

1616
const PDFDocument = require('pdfkit');

‎docs/guide.pdf‎

102 KB
Binary file not shown.

‎docs/images.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

1818
When 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

5050
This example produces the following output:
5151

52-
![0](images/images.png "150")
52+
![0](images/images.png "400")
5353

5454
That 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.

‎docs/text.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ Text styling section, and take into account the eventual line wrapping.
137137
The `list` method creates a bulleted list. It accepts as arguments an array of strings,
138138
and the optional `x`, `y` position. You can create complex multilevel lists by using nested arrays.
139139
Lists use the following additional options:
140+
140141
* `bulletRadius`
141142
* `textIndent`
142143
* `bulletIndent`
@@ -168,6 +169,7 @@ Here is the output:
168169
The PDF format defines 14 standard fonts that can be used in PDF documents. PDFKit supports each of them out of the box.
169170
Besides Symbol and Zapf Dingbats this includes 4 styles (regular, bold, italic/oblique, bold+italic) of Helvetica,
170171
Courier, and Times. To switch between standard fonts, call the `font` method with the corresponding Label:
172+
171173
* `'Courier'`
172174
* `'Courier-Bold'`
173175
* `'Courier-Oblique'`

0 commit comments

Comments
 (0)