{"id":18669988,"url":"https://github.com/blahah/pdf-narcissist","last_synced_at":"2025-04-12T00:31:08.094Z","repository":{"id":66275974,"uuid":"56070492","full_name":"blahah/pdf-narcissist","owner":"blahah","description":"Hide a PDF inside a thumbnail of its own first page","archived":false,"fork":false,"pushed_at":"2016-04-12T19:20:33.000Z","size":882,"stargazers_count":50,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-25T20:14:34.800Z","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/blahah.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}},"created_at":"2016-04-12T14:31:18.000Z","updated_at":"2021-12-11T18:04:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"febe9cc0-b118-40b5-b89a-a708d21aa57b","html_url":"https://github.com/blahah/pdf-narcissist","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fpdf-narcissist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fpdf-narcissist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fpdf-narcissist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fpdf-narcissist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blahah","download_url":"https://codeload.github.com/blahah/pdf-narcissist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501125,"owners_count":21114611,"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-07T08:49:24.565Z","updated_at":"2025-04-12T00:31:08.087Z","avatar_url":"https://github.com/blahah.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## pdf-narcissist\n\nHide a PDF inside a thumbnail of its own first page.\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\n### How it works\n\n`pdf-narcissist` creates a high definition image of the first page of a PDF using [pdf-to-png](https://github.com/freeman-lab/pdf-to-png). Then it compressess the original PDF with bzip2 (using [compressjs](https://github.com/cscott/compressjs)), and stores the base64 representation of the compressed PDF in the least significant bits of the image using [lsb](https://github.com/hughsk/lsb).\n\n### Usage\n\n#### Command-line\n\n```\n$ pdf-narcissist --help\n\nUsage: pdf-narcissist [options] [command]\n\n\nCommands:\n\n  encode \u003cpdf\u003e \u003cpng\u003e  encode a PDF into a PNG thumbnail of itself\n  decode \u003cpng\u003e \u003cpdf\u003e  extract a PDF from a PNG\n\nOptions:\n\n  -h, --help     output usage information\n  -V, --version  output the version number\n\n```\n\n```bash\npdf-narcissist encode in.pdf encoded.png\n```\n\n```bash\npdf-narcissist decode encoded.png out.pdf\n```\n\n#### Library\n\n```js\nvar narcissist = require('pdf-narcissist')\n\nnarcissist.encode('in.pdf', 'encoded.png', function(err) {\n  // done\n})\n\nnarcissist.decode('encoded.png', 'out.pdf', function(err) {\n  // done\n})\n```\n\n### Installation\n\nFor CLI use\n\n```bash\nnpm install --global pdf-narcissist\n```\n\nFor library use\n\n```bash\nnpm install --save pdf-narcissist\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblahah%2Fpdf-narcissist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblahah%2Fpdf-narcissist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblahah%2Fpdf-narcissist/lists"}