{"id":22325114,"url":"https://github.com/rogercoll/file2pdf","last_synced_at":"2025-10-23T17:49:44.535Z","repository":{"id":113986481,"uuid":"112874842","full_name":"rogercoll/File2Pdf","owner":"rogercoll","description":"Website which anyone can upload his file and convert them to pdf. ","archived":false,"fork":false,"pushed_at":"2017-12-05T23:01:58.000Z","size":973,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T07:22:23.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rogercoll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-12-02T20:34:49.000Z","updated_at":"2018-01-30T16:22:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac164ada-56a8-4e9a-939b-f072ee70a32d","html_url":"https://github.com/rogercoll/File2Pdf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rogercoll/File2Pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogercoll%2FFile2Pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogercoll%2FFile2Pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogercoll%2FFile2Pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogercoll%2FFile2Pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rogercoll","download_url":"https://codeload.github.com/rogercoll/File2Pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogercoll%2FFile2Pdf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266774798,"owners_count":23982247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T02:10:21.040Z","updated_at":"2025-10-23T17:49:44.458Z","avatar_url":"https://github.com/rogercoll.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File2Pdf\n\nThis Nodejs package creats a server which you can upload any kind of file (that can be transformed to pdf) and it converts them to PDF format. \n\n### Prerequisits \n\nThe server which runs the package must be a Linux destribution(better if it's Debian) because when it converts the files it uses a program called **Abiword** that can be used from the command line.\n\nIn the server must be installed:\n\n- Abiword:\n```\n    sudo apt-get install abiword\n```\n\n- Nodejs/Npm (this installation is for Debian and Ubuntu)\n```\ncurl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -\nsudo apt-get install -y nodejs\n```\n\n\n### Usage\n\n- Server:\n```\ngit clone https://github.com/rogercoll/File2Pdf.git\ncd  /path/to/File2pdf \nnode server.js\n```\n\n-Client:\n```\nOpen any browser and type:\nlocalhost:3000\n```\n\nIf client is another device from the same network change localhost to server ip address.\n\n### File interaction\n\nAll files that the client will upload will be stored in the folder /uploads from the package folder. When the conversion it's done the result files are also stored there. You can easily change the directory in:\n\n- Server.js\n\n```javascript\napp.post('/convert', function(req,res){\n\n  var data = req.body;\n  var com = \"abiword --to=pdf \";\n  var files = '\"files\" : ';\n  var os;\n  for(var i = 0; i \u003c data.fitxers.length; ++i){\n    var fname = data.fitxers[i].Namefile;\n    var auxiliar = com + \"uploads/\" + fname; //add here the directory which you want to save the file(s)\n```\n\nWent files are converted client will automaticaly download the final files. \n\n##### Little issue\n\nFor the moment the uploaded files can not have any dot(.) in the name file. Only the dot that the word after determines the file type. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogercoll%2Ffile2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frogercoll%2Ffile2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogercoll%2Ffile2pdf/lists"}