This is a command line utility to merge two pdfs together
- From the root of this repository, run
cd task2/cmd_line
; npm install
npm link
$ pdf-merger <pdf1> <pdf2> <0 or more pdfs>
This will create a pdf called merged.pdf
in your current working directory.
Send a POST request to the endpoint https://must-pdf-merger.netlify.app/.netlify/functions/server
deployed as a Netlify serverless function.
This endpoint accepts a POST request with multipart/form-data
content and returns a Buffer response.
- Method: POST
- URL:
https://must-pdf-merger.netlify.app/.netlify/functions/server
- Content Type:
multipart/form-data
The request body should contain a file uploaded as file
.
The response will be a Buffer containing the content of the uploaded file.
POST https://must-pdf-merger.netlify.app/.netlify/functions/server HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="example.pdf"
Content-Type: application/pdf
This is the content of the file.
----WebKitFormBoundary7MA4YWxkTrZu0gW
HTTP/1.1 200 OK
Content-Type: application/octet-stream
<Buffer 25 50 44 46 ...> <!-- PDF binary data -->