{"info":{"_postman_id":"f45fee6f-e1ef-4270-83eb-2d79a0f2a80f","name":"Pdf Extractor","description":"<html><head></head><body><p>server-side code for a web application built with Express.js that allows users to upload PDF files and extract specific pages to create new PDFs. With this application, users can select the pages they want to include in the new PDF, offering a simple yet powerful PDF manipulation tool.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"25497428","collectionId":"f45fee6f-e1ef-4270-83eb-2d79a0f2a80f","publishedId":"2s9YXb95kB","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-10-30T21:46:52.000Z"},"item":[{"name":"Health Check","id":"5fcb2068-50a6-4b24-83cb-4e9b091aab23","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000","description":"<p>A simple test route to check if the server is operational. Send a GET request to the root path (\"/\") to receive a \"Server is working\" response, confirming that the server is up and running.</p>\n","urlObject":{"protocol":"http","port":"8000","host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"60d1e37f-cd46-4e74-bf41-c4aa18e76a4d","name":"health check","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8000"},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Content-Length","value":"17"},{"key":"ETag","value":"W/\"11-LM4LvM8ubD/c2UUO1aHKlUvqme0\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:26:42 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"Server is working"}],"_postman_id":"5fcb2068-50a6-4b24-83cb-4e9b091aab23"},{"name":"Registration","id":"ecf5e20c-1ab7-47bc-9236-ee990b291c86","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"email\":\"hello@123gmail.com\",\"password\":\"1234\"}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/register","description":"<p>Register a new user by supplying their email and password. If the email is not already registered, a new user account is created, and a JWT token is generated for authentication. Use this token for accessing protected resources.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"aaf5cd1b-a9f6-43e5-92e6-ec2d0bc21335","name":"successful registration","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"email\":\"hello@123gmail.com\",\"password\":\"1234\"}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/register"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"274"},{"key":"ETag","value":"W/\"112-OXVPeGOWW7Mkp1wa1QKjZKsS/gA\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:31:09 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Registration successful\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhlbGxvQDEyM2dtYWlsLmNvbSIsIl9pZCI6IjY1NDAxMjhkMjAzYTY4YjdkYmQ0YTk3NyIsImlhdCI6MTY5ODY5Nzg2OSwiZXhwIjoxNjk5MzAyNjY5fQ.52clUB7pRL2LLYvVmm3DChIqo_1pqYPai8FSeQN0JW0\"\n}"},{"id":"8004528b-bc14-4c1d-97e9-6ade099cb5b7","name":"Invalid email","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"email\":\"hello@123gmail\",\"password\":\"1234\"}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/register"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"97"},{"key":"ETag","value":"W/\"61-kb40pWyDEm6SIp/emwEG0luiPDA\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:31:52 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Internal Server Error\",\n    \"error\": \"user validation failed: email: Invalid email format\"\n}"},{"id":"a145ab42-273d-4cba-9384-e4795bc1e8dc","name":"Already registered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"email\":\"hello@123gmail.com\",\"password\":\"1234\"}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/register"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"54"},{"key":"ETag","value":"W/\"36-EAvnEptumId5e9Qhf9lo558Zs8E\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:32:42 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Email already registered\"\n}"},{"id":"5610003f-5256-4670-8558-ae11f5616623","name":"Missing values","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"email\":\"hello@123gmail.com\"}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/register"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"37"},{"key":"ETag","value":"W/\"25-l1p9XCWlTWcTyxcSefqVcmTOo6M\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:33:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Some values are missing\"\n}"}],"_postman_id":"ecf5e20c-1ab7-47bc-9236-ee990b291c86"},{"name":"Login","id":"502e300c-a6af-4dc1-94de-0377df6482dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:8000/auth/login","description":"<p>Authenticate a user by providing their email and password. Upon successful authentication, a JSON web token (JWT) is generated and returned as part of the response. Use this token for subsequent authenticated requests.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"ddbcacf1-5c13-451f-ab1b-f585f20ef102","name":"Successful login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"email\":\"hello@123gmail.com\",\"password\":\"1234\"}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"268"},{"key":"ETag","value":"W/\"10c-9BYFGWGIa1m+RtiszuAZn/vlUiE\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:34:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Signin successful\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImhlbGxvQDEyM2dtYWlsLmNvbSIsIl9pZCI6IjY1NDAxMjhkMjAzYTY4YjdkYmQ0YTk3NyIsImlhdCI6MTY5ODY5ODA4NywiZXhwIjoxNjk5MzAyODg3fQ.k4gYWZ_o9YFAU_t3vtMOK67KEvyVUaXfjIGjQlGFjv0\"\n}"},{"id":"083bb014-0dfd-40a4-89d5-cb7f0b84d8f8","name":"Invalid Login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"email\":\"hello@123gmail.com\",\"password\":\"124\"}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/login"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"55"},{"key":"ETag","value":"W/\"37-5uDpJTljPBecOPs/j7OXFdPRcmQ\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:47:51 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Invalid email or password\"\n}"}],"_postman_id":"502e300c-a6af-4dc1-94de-0377df6482dc"},{"name":"Delete Account","id":"b28ba818-745d-48d5-b265-a2c60e368d26","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:8000/auth/remove-account","description":"<p>Delete the user account and associated data for the authenticated user. Provide the JWT token obtained during login to authenticate the request. Upon successful account deletion, a confirmation message is returned.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["auth","remove-account"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"60bd4fd1-3db0-4672-83d3-b28a58dbae89","name":"Delete account","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\"email\":\"hello@123gmail.com\",\"password\":\"1234\"}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/remove-account"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"57"},{"key":"ETag","value":"W/\"39-k7LB9Ttrv4KiKX8rm7zfKT4Mg8E\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:51:49 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Account deleted successfully\"\n}"},{"id":"ffde63ff-e305-45ab-906f-2406d6971e91","name":"Deleting again","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\"email\":\"hello@123gmail.com\",\"password\":\"1234\"}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/remove-account"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"44"},{"key":"ETag","value":"W/\"2c-EAnCIFy1uGovyo/FU6KYwnjLgrc\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:52:42 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"User not found\"\n}"}],"_postman_id":"b28ba818-745d-48d5-b265-a2c60e368d26"},{"name":"PDF Extractor","id":"a88186d9-243f-4cf8-b856-752f01ce052c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf","description":"<p>Upload a PDF file and specify which pages to extract. Provide a list of selected page numbers in the request body. The controller will validate the selected pages and create a new PDF containing the specified pages. If the user is authenticated, the details of the newly created PDF will be stored in the database; otherwise, it will be deleted after a certain time. The response will include a URL to access the new PDF.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["pdf","extract-pdf"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8addf106-6750-43e3-90d3-3a5ffeda8f66","name":"PDF exported successfully","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"143"},{"key":"ETag","value":"W/\"8f-OqHuZ6D5BuXYINN0pQGN50w6rQ8\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:59:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"newPath\": \"http://localhost:8000/uploads/newPDF/4243412053454d45535445522d4920323032332d3234202831292e7064661698699557099.pdf\"\n}"},{"id":"010aff35-828d-47ce-b80c-3ef6a90bbde2","name":"Unexpected Field","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFil","type":"file","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"62"},{"key":"ETag","value":"W/\"3e-YiJ5c56hLjQnCc4+miEf4A/nOgM\""},{"key":"Date","value":"Mon, 30 Oct 2023 21:07:26 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Internal Server Error\",\n    \"error\": \"Unexpected field\"\n}"},{"id":"8c093f35-94a4-4510-945c-8a7501ffc669","name":"Invalid Page selection","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7,879]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"89"},{"key":"ETag","value":"W/\"59-fk4OHMai16gw2XcsgNxAgLVc+lY\""},{"key":"Date","value":"Mon, 30 Oct 2023 21:09:26 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Invalid page selection. Some page numbers are out of range.\"\n}"},{"id":"3c69f0aa-0a8e-4423-bebc-98180c8e7545","name":"Invalid Type","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","src":"/home/favas/Desktop/My Projects/MachineTests/Vidylaay/server/src/Middlewares/authMiddlewear.js"},{"key":"selectedPages","value":"[2,5,2,8,7,879]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"92"},{"key":"ETag","value":"W/\"5c-+AheM8bP/aedUpcSEDMVFCNFv9w\""},{"key":"Date","value":"Mon, 30 Oct 2023 21:10:45 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Internal Server Error\",\n    \"error\": \"Invalid file type. Only PDF files are allowed.\"\n}"},{"id":"0b1a6f68-9f21-4692-86c4-d1152c8dc98f","name":"Exporting with token","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"143"},{"key":"ETag","value":"W/\"8f-L9SU3+9n7W1FYVSFXDFKxH7/MQc\""},{"key":"Date","value":"Mon, 30 Oct 2023 21:14:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"newPath\": \"http://localhost:8000/uploads/newPDF/4243412053454d45535445522d4920323032332d3234202831292e7064661698700486935.pdf\"\n}"}],"_postman_id":"a88186d9-243f-4cf8-b856-752f01ce052c"},{"name":"PDF Extractor with Token","id":"832344d6-6d43-4821-9c0d-7f50f1202c33","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf","description":"<p>If the user is authenticated, the details of the newly created PDF will be stored in the database; otherwise, it will be deleted after a certain time. The response will include a URL to access the new PDF.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["pdf","extract-pdf"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e9cbc7e0-a9b8-4932-9a38-6d9458089d2a","name":"PDF exported successfully","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"143"},{"key":"ETag","value":"W/\"8f-OqHuZ6D5BuXYINN0pQGN50w6rQ8\""},{"key":"Date","value":"Mon, 30 Oct 2023 20:59:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"newPath\": \"http://localhost:8000/uploads/newPDF/4243412053454d45535445522d4920323032332d3234202831292e7064661698699557099.pdf\"\n}"},{"id":"1ca1bb6f-478e-401b-a36c-3acb45b653c1","name":"Unexpected Field","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFil","type":"file","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"62"},{"key":"ETag","value":"W/\"3e-YiJ5c56hLjQnCc4+miEf4A/nOgM\""},{"key":"Date","value":"Mon, 30 Oct 2023 21:07:26 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Internal Server Error\",\n    \"error\": \"Unexpected field\"\n}"},{"id":"886b2746-7f80-4fcd-95d8-0831d281a3ec","name":"Invalid Page selection","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7,879]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"89"},{"key":"ETag","value":"W/\"59-fk4OHMai16gw2XcsgNxAgLVc+lY\""},{"key":"Date","value":"Mon, 30 Oct 2023 21:09:26 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Invalid page selection. Some page numbers are out of range.\"\n}"},{"id":"41f82421-e46e-426f-83da-cda75e39b7bc","name":"Invalid Type","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","src":"/home/favas/Desktop/My Projects/MachineTests/Vidylaay/server/src/Middlewares/authMiddlewear.js"},{"key":"selectedPages","value":"[2,5,2,8,7,879]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"92"},{"key":"ETag","value":"W/\"5c-+AheM8bP/aedUpcSEDMVFCNFv9w\""},{"key":"Date","value":"Mon, 30 Oct 2023 21:10:45 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Internal Server Error\",\n    \"error\": \"Invalid file type. Only PDF files are allowed.\"\n}"},{"id":"81ba1203-1c1b-402c-a7cf-1e430cdd5dab","name":"Exporting with token","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7]","type":"text"}]},"url":"http://localhost:8000/pdf/extract-pdf"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"143"},{"key":"ETag","value":"W/\"8f-L9SU3+9n7W1FYVSFXDFKxH7/MQc\""},{"key":"Date","value":"Mon, 30 Oct 2023 21:14:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"newPath\": \"http://localhost:8000/uploads/newPDF/4243412053454d45535445522d4920323032332d3234202831292e7064661698700486935.pdf\"\n}"}],"_postman_id":"832344d6-6d43-4821-9c0d-7f50f1202c33"},{"name":"Fetch Saved PDFs","id":"29dd43d9-7004-4b22-a291-e09a971fc689","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8000/pdf/saved-pdfs","description":"<p>Retrieve a list of PDFs that belong to the authenticated user. To access this endpoint, you must provide a valid authentication token in the request headers. The controller will fetch the PDFs associated with the user from the database and return their details in the response.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["pdf","saved-pdfs"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f8515e50-bb02-4e98-9458-bc5c0173ea00","name":"Fetching Saved Files","originalRequest":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7]","type":"text"}]},"url":"http://localhost:8000/pdf/saved-pdfs"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"267"},{"key":"ETag","value":"W/\"10b-KC5UnprjU5yhV5QirR41gpWDTcs\""},{"key":"Date","value":"Mon, 30 Oct 2023 21:16:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"pdfs\": [\n        {\n            \"name\": \"4243412053454d45535445522d4920323032332d3234202831292e7064661698700486935\",\n            \"path\": \"http://localhost:8000/uploads/newPDF/4243412053454d45535445522d4920323032332d3234202831292e7064661698700486935.pdf\",\n            \"_id\": \"65401cc7d094eab4c7e84762\"\n        }\n    ]\n}"},{"id":"812e4ac5-6740-4990-9c21-d32b9e3c895b","name":"With Invalid Token","originalRequest":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[{"key":"pdfFile","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/home/favas/Downloads/BCA SEMESTER-I 2023-24 (1).pdf"},{"key":"selectedPages","value":"[2,5,2,8,7]","type":"text"}]},"url":"http://localhost:8000/pdf/saved-pdfs"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"67"},{"key":"ETag","value":"W/\"43-3Z9rTJu4hP2RR5HG/AqqVK7xFUc\""},{"key":"Date","value":"Mon, 30 Oct 2023 21:17:49 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Authentication failed: Invalid token.\"\n}"}],"_postman_id":"29dd43d9-7004-4b22-a291-e09a971fc689"}]}