Create an ExecutionContext using credentialsĬonst executionContext = (credentials) If(fs.existsSync(OUTPUT)) fs.unlinkSync(OUTPUT) Ĭonst JSON_INPUT = require('./receipt.json') Ĭonst credentials = PDFServicesSdk.Credentials If our output already exists, remove it so we can run the application again. Create a new file, generatePDF.jsĬonst PDFServicesSdk = fs = require('fs') Our application will take a Word document, receiptTemplate.docx (downloadable from here), and combine it with data in a JSON file, receipt.json (downloadable from here), to be sent to the Acrobat Services API and generate a receipt PDF.ĥ) In your editor, open the directory where you previously copied the credentials. Remember that these credential files are important and should be stored safely.ģ) At the command line, change to the directory you created, and initialize a new Node.js project with npm init -yĤ) Install the Adobe PDF Services Node.js SDK by typing npm install -save at the command line.Īt this point, we've installed the Node.js SDK for Adobe PDF Services API as a dependency for our project and have copied over our credentials files. If you unzip that archive, you will find a folder of samples and the pdfservices-api-credentials.json file.Ģ) Take the pdfservices-api-credentials.json file and place it in a new directory. 1) In your Downloads folder, find the ZIP file with your credentials:.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |