{"id":19128835,"url":"https://github.com/peerlibrary/meteor-pdf.js","last_synced_at":"2025-05-06T00:14:24.841Z","repository":{"id":7500799,"uuid":"8850475","full_name":"peerlibrary/meteor-pdf.js","owner":"peerlibrary","description":"Mozilla's HTML5 PDF reader, repackaged for Meteor, client \u0026 server","archived":false,"fork":false,"pushed_at":"2015-01-17T16:48:35.000Z","size":1160,"stargazers_count":46,"open_issues_count":7,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-06T00:14:19.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/mozilla/pdf.js","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peerlibrary.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}},"created_at":"2013-03-18T09:07:58.000Z","updated_at":"2024-01-15T06:31:50.000Z","dependencies_parsed_at":"2022-09-02T02:01:33.933Z","dependency_job_id":null,"html_url":"https://github.com/peerlibrary/meteor-pdf.js","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peerlibrary%2Fmeteor-pdf.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peerlibrary%2Fmeteor-pdf.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peerlibrary%2Fmeteor-pdf.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peerlibrary%2Fmeteor-pdf.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peerlibrary","download_url":"https://codeload.github.com/peerlibrary/meteor-pdf.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252596429,"owners_count":21773846,"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","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-11-09T06:05:48.088Z","updated_at":"2025-05-06T00:14:24.825Z","avatar_url":"https://github.com/peerlibrary.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"pdf.js smart package\n====================\n\nMeteor smart package for [pdf.js](https://github.com/mozilla/pdf.js), Mozilla's PDF\nreader built with HTML5 and JavaScript that powers the PDF display in Firefox.\nNow as a Meteor package for both client and server side. This package just renders\nPDFs not creates them.\n\nAdding this package to your [Meteor](http://www.meteor.com/) application adds `PDFJS` object into the global scope,\nwhich you can use as defined in [pdf.js API](https://github.com/mozilla/pdf.js/blob/master/src/display/api.js).\nOn the server, in addition to existing API, a fibers-enabled synchronous ([blocking](https://github.com/peerlibrary/meteor-blocking))\nmethods are added to objects. They are named the same, but with a `Sync` suffix. Instead of returning a promise they\nreturn when they finish or throw an exception. So, on the server you can do:\n\n    var pdf = {\n        data: Assets.getBinary(pdfPath),\n        password: ''\n    };\n    var document = PDFJS.getDocumentSync(pdf);\n    var page = document.getPageSync(1);\n\nIf not using [Assets](http://docs.meteor.com/#assets) to get PDF, you should use [fs](https://github.com/peerlibrary/meteor-fs)\npackage for file system access to get fibers-enabled synchronous functions instead of functions which block the\nwhole node.js process.\n\nInstallation\n------------\n\n```\nmeteor add peerlibrary:pdf.js\n```\n\nBuilding\n--------\n\nIt requires some additional [node.js](http://nodejs.org/) packages which will be automatically locally installed\nfrom [npm](http://nodejs.org/) when Meteor builds the package for the first time.\n\nThe following libraries have to be available on your system for packages to be successfully built:\n\n * [Cairo](http://cairographics.org/) graphic library\n * [FreeType](http://www.freetype.org/)\n * [Pango](http://www.pango.org/)\n * [pkg-config](http://www.freedesktop.org/wiki/Software/pkg-config/)\n * [giflib](http://giflib.sourceforge.net/)\n * [libjpeg](http://www.ijg.org)\n\nOn Mac OS X you can get Cairo by installing [X11](http://xquartz.macosforge.org/) (Pango\nand FreeType are already available on the system) and run the following before you\nrun `mrt` to configure the environment:\n\n    export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig\n\nTo be able to compile dependencies, you need [Xcode](https://developer.apple.com/xcode/)\nwith command line tools installed (from _Preferences_ \u003e _Downloads_ \u003e _Components_).\n\nYou can install `pkg-config`, `giflib`, and `libjpeg` using [Homebrew](http://brew.sh/)\n([MacPorts](https://www.macports.org/) also works, if you prefer it):\n\n    brew install pkg-config giflib libjpeg\n\nOn Debian you can install all dependencies by:\n\n    sudo aptitude install libcairo2-dev libfreetype6-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeerlibrary%2Fmeteor-pdf.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeerlibrary%2Fmeteor-pdf.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeerlibrary%2Fmeteor-pdf.js/lists"}