File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ PDFAssembler = require('pdfassembler').PDFAssembler;
127127
128128### Loading a PDF
129129
130- To us PDF Assembler, you must create a new PDF Assembler instance and initialize it, either with your own PDF structure object:
130+ To use PDF Assembler, you must create a new PDF Assembler instance and initialize it, either with your own PDF structure object:
131131``` javascript
132132// helloWorldPdf = the pdf object defined above
133133const newPdf = new PDFAssembler (helloWorldPdf);
@@ -141,13 +141,13 @@ const newPdf = new PDFAssembler(binaryPDF);
141141
142142### Editing the PDF object
143143
144- After you've created a new new PDF Assembler instance, you can request a promise with the PDF structure object, and then edit it.
144+ After you've created a new PDF Assembler instance, you can request a promise with the PDF structure object, and then edit it.
145145(Some of PDF Assembler's actions are asynchronous, so it's necessary to use a promise to make sure the PDF is fully loaded before you edit it.)
146146
147147For example, here is how to edit a PDF to remove all but the first page:
148148``` javascript
149149newPdf
150- .pdfObject ()
150+ .pdfObject
151151 .then (function (pdf ) {
152152 pdf[' /Root' ][' /Pages' ][' /Kids' ] = pdf[' /Root' ][' /Pages' ][' /Kids' ].slice (0 , 1 );
153153 });
You can’t perform that action at this time.
0 commit comments