mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
Merge pull request #383 from naturalatlas/no-auto-first-page
Allow automatic first page to be disabled (#65).
This commit is contained in:
commit
7acefc28c6
@ -80,7 +80,7 @@ If you forget to install it, Browserify will print an error message.
|
||||
## Adding pages
|
||||
|
||||
The first page of a PDFKit document is added for you automatically when you
|
||||
create the document. Subsequent pages must be added by you. Luckily, it is
|
||||
create the document unless you provide `autoFirstPage: false`. Subsequent pages must be added by you. Luckily, it is
|
||||
quite simple!
|
||||
|
||||
doc.addPage()
|
||||
|
||||
@ -63,7 +63,8 @@ class PDFDocument extends stream.Readable
|
||||
@_write "%\xFF\xFF\xFF\xFF"
|
||||
|
||||
# Add the first page
|
||||
@addPage()
|
||||
if @options.autoFirstPage != false
|
||||
@addPage()
|
||||
|
||||
mixin = (methods) =>
|
||||
for name, method of methods
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user