{"id":30852845,"url":"https://github.com/foxitsoftware/pdfservicesnodesdk","last_synced_at":"2025-09-07T08:49:11.164Z","repository":{"id":306113538,"uuid":"1025094438","full_name":"foxitsoftware/pdfservicesnodesdk","owner":"foxitsoftware","description":"A light-weight Node wrapper for PDF Services and Document Generation","archived":false,"fork":false,"pushed_at":"2025-07-23T18:50:18.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-12T01:35:17.411Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxitsoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-07-23T17:59:19.000Z","updated_at":"2025-07-23T18:50:22.000Z","dependencies_parsed_at":"2025-07-23T19:09:17.172Z","dependency_job_id":null,"html_url":"https://github.com/foxitsoftware/pdfservicesnodesdk","commit_stats":null,"previous_names":["foxitsoftware/pdfservicesnodesdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/foxitsoftware/pdfservicesnodesdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxitsoftware%2Fpdfservicesnodesdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxitsoftware%2Fpdfservicesnodesdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxitsoftware%2Fpdfservicesnodesdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxitsoftware%2Fpdfservicesnodesdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxitsoftware","download_url":"https://codeload.github.com/foxitsoftware/pdfservicesnodesdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxitsoftware%2Fpdfservicesnodesdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274015231,"owners_count":25207691,"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-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":"2025-09-07T08:49:09.839Z","updated_at":"2025-09-07T08:49:11.148Z","avatar_url":"https://github.com/foxitsoftware.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foxit PDF Services SDK\n\nThis SDK lets developers more easily use the Foxit APIs, including [PDF Services](https://developer-api.foxit.com/pdf-services/) and [Document Generation](https://developer-api.foxit.com/document-generation/). You will need a [free set of credentials](https://app.developer-api.foxit.com/pricing) in order to call the APIs.\n\n## Usage\n\nCopy your credentials to the environment and then instantiate the SDK. Here's a sample:\n\n```js\nimport { PDFServiceSDK } from \"./PDFServiceSDK.mjs\";\n\nconst clientId = process.env.CLIENT_ID;\nconst clientSecret = process.env.CLIENT_SECRET;\n\nconst pdfService = new PDFServiceSDK(clientId, clientSecret);\n\nawait pdfService.wordToPDF('assets/input/input.docx', 'assets/output/output_from_nodesdk.pdf');\nconsole.log(\"PDF conversion completed successfully.\");\n\n// v2 change that uses new conversion method\nawait pdfService.conversion('assets/input/input.docx', 'assets/output/output_from_nodesdk_v2.pdf');\nconsole.log(\"PDF conversion (second version)completed successfully.\");\n```\n\n## Methods Supported\n\n* conversion(inputPath, outputPath) - general conversion method\n* excel_to_pdf, html_to_pdf, image_to_pdf, pdf_to_excel, pdf_to_html, pdf_to_image, pdf_to_powerpoint, pdf_to_text, pdf_to_word, powerpoint_to_word, text_to_pdf, word_to_pdf - all take an inputPath and outputPath argument\n* url_to_pdf(url, outputPath) - convert a URL to pdf\n* extract(inputPath, outputPath, type (one of TEXT, IMAGE, PAGE), page_range) - extracts either text, images (zip), or pages (new pdf)\n* download(docId, outputPath) - given a document id and path, will stream the data down\n* upload(path) - upload a document and return a path\n* compress(inputPath,outputPath,compressionLevel) - compresses a PDF, default level is LOW\n* linearize(inputPath,outputPath) - linearizes a PDF\n* flatten(inputPath,outputPath) - flattens a PDF\n* combine(inputPaths[], outputPath, options) - combines a set of PDFs\n\n## To Do: \n\n* remove-password, protect, manipulate, split, compare\n* Make output path optional and just return the doc id\n* Make checking a task public and a utility pollTask to handle repeating (this and the previous two methods would let devs chain calls)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxitsoftware%2Fpdfservicesnodesdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxitsoftware%2Fpdfservicesnodesdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxitsoftware%2Fpdfservicesnodesdk/lists"}