{"id":15913128,"url":"https://github.com/34j/hexo-renderer-pdf","last_synced_at":"2026-01-21T21:33:26.807Z","repository":{"id":229414661,"uuid":"776676709","full_name":"34j/hexo-renderer-pdf","owner":"34j","description":"Hexo Renderer which treats PDF files as posts. Based on pdf2htmlEX.","archived":false,"fork":false,"pushed_at":"2024-03-25T07:01:19.000Z","size":1196,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T07:50:04.947Z","etag":null,"topics":["hexo","hexo-plugin","hexo-renderer","latex","pdf","pdf2html","pdf2htmlex","tex","typst"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/34j.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}},"created_at":"2024-03-24T06:50:16.000Z","updated_at":"2024-07-05T11:11:29.000Z","dependencies_parsed_at":"2024-10-06T16:23:21.916Z","dependency_job_id":"1c63c673-58b4-469d-87a6-9c2d2d8053b2","html_url":"https://github.com/34j/hexo-renderer-pdf","commit_stats":null,"previous_names":["34j/hexo-renderer-pdf"],"tags_count":10,"template":false,"template_full_name":"ryansonshine/typescript-npm-package-template","purl":"pkg:github/34j/hexo-renderer-pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Fhexo-renderer-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Fhexo-renderer-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Fhexo-renderer-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Fhexo-renderer-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/34j","download_url":"https://codeload.github.com/34j/hexo-renderer-pdf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Fhexo-renderer-pdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28644101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hexo","hexo-plugin","hexo-renderer","latex","pdf","pdf2html","pdf2htmlex","tex","typst"],"created_at":"2024-10-06T16:23:13.799Z","updated_at":"2026-01-21T21:33:26.782Z","avatar_url":"https://github.com/34j.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hexo-renderer-pdf\n\n[![npm package][npm-img]][npm-url]\n[![Build Status][build-img]][build-url]\n[![Downloads][downloads-img]][downloads-url]\n[![Issues][issues-img]][issues-url]\n[![Code Coverage][codecov-img]][codecov-url]\n[![Commitizen Friendly][commitizen-img]][commitizen-url]\n[![Semantic Release][semantic-release-img]][semantic-release-url]\n\n\u003e Hexo renderer based on pdf2htmlEX.\n\n## Installation\n\nNote that WSL can be used (for Windows users).\n\n```bash\nwget -N https://github.com/pdf2htmlEX/pdf2htmlEX/releases/download/v0.18.8.rc1/pdf2htmlEX-0.18.8.rc1-master-20200630-Ubuntu-bionic-x86_64.deb -O pdf2htmlEX.deb\nsudo apt install ./pdf2htmlEX.deb\nnpm install hexo-renderer-pdf --save\n```\n\nJust place pdf files in `source/_posts` (and run `hexo s`).\n\n## Configuration (Optional)\n\n```yaml\nrender_pdf:\n  args: ['--process-outline', '0', '--zoom', '1.25'] # pdf2htmlEX additional arguments\n  wrapWithIframe: true # Whether to wrap the pdf with an iframe\n  wrapHtml: |\n    \u003chtml\u003e\n      \u003chead\u003e\n          \u003cstyle\u003ebody{margin:0;overflow:hidden;}\u003c/style\u003e\n          \u003cstyle\u003e::-webkit-scrollbar{display:none;}\u003c/style\u003e\n          \u003ctitle\u003e%s\u003c/title\u003e\n          \u003cmeta charset='utf-8'\u003e\n          \u003cmeta name=\"description\" content=\"%s\"\u003e\n          \u003cmeta name=\"keywords\" content=\"%s\"\u003e\n          \u003cmeta name=\"author\" content=\"%s\"\u003e\n          \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n      \u003c/head\u003e\n      \u003cbody\u003e\n          \u003ciframe scrolling=\"no\" style='overflow:hidden; display:block; border:none; height:100vh; width:100%;' srcdoc='%s'\u003e\u003c/iframe\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n```\n\n## Customizing CSS (Optional)\n\n- Copy the assets to the root of your hexo project\n\n```shell\ncp -r $(wsl -e wslpath -m /usr/local/share/pdf2htmlEX) .       \nrm -r pdf2htmlEX/poppler \nrm -r pdf2htmlEX/pkgconfig\ngit add pdf2htmlEX\ngit commit -m \"chore: copy pdf2htmlEX assets\"\n```\n\n- Specify data-dir in the pdf2htmlEX options\n\n```yaml\nrender_pdf:\n  args: ['--data-dir', 'pdf2htmlEX']\n```\n\n- Edit `fancy.min.css` as you like\n\n```css\n#page-container {\n  background-color: transparent;\n  background-image: none;\n}\n#sidebar{\n  background-color: transparent;\n}\n.pf{\n  box-shadow: none;\n}\nimg {\n  mix-blend-mode: multiply;\n}\n@media (prefers-color-scheme: dark) {\n  img {\n    filter: invert(1);\n    mix-blend-mode: lighten;\n  }\n}\n```\n\n## Limitations\n\n- Somehow, using a non-specific fonts for math expressions results in `Cannot flatten a non-CID font` warning and the characters garbled. Using Cambria Math was a workaround.\n- `Warning: encoding confliction detected in font: 3` is still displayed but it seems to be harmless.\n- You can open a PDF document in a text editor and write [Front-matter](https://hexo.io/docs/front-matter.html) in the same way as you would in markdown. It would be possible to generate this automatically from the PDF metadata, but this feature is not implemented.\n\n[build-img]:https://github.com/34j/hexo-renderer-pdf/actions/workflows/release.yml/badge.svg\n[build-url]:https://github.com/34j/hexo-renderer-pdf/actions/workflows/release.yml\n[downloads-img]:https://img.shields.io/npm/dt/hexo-renderer-pdf\n[downloads-url]:https://www.npmtrends.com/hexo-renderer-pdf\n[npm-img]:https://img.shields.io/npm/v/hexo-renderer-pdf\n[npm-url]:https://www.npmjs.com/package/hexo-renderer-pdf\n[issues-img]:https://img.shields.io/github/issues/34j/hexo-renderer-pdf\n[issues-url]:https://github.com/34j/hexo-renderer-pdf/issues\n[codecov-img]:https://codecov.io/gh/34j/hexo-renderer-pdf/branch/main/graph/badge.svg\n[codecov-url]:https://codecov.io/gh/34j/hexo-renderer-pdf\n[semantic-release-img]:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n[semantic-release-url]:https://github.com/semantic-release/semantic-release\n[commitizen-img]:https://img.shields.io/badge/commitizen-friendly-brightgreen.svg\n[commitizen-url]:http://commitizen.github.io/cz-cli/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F34j%2Fhexo-renderer-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F34j%2Fhexo-renderer-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F34j%2Fhexo-renderer-pdf/lists"}