{"id":24109266,"url":"https://github.com/lambdalemon/pdf2vrc","last_synced_at":"2026-05-14T15:32:23.155Z","repository":{"id":271892743,"uuid":"914383988","full_name":"lambdalemon/pdf2vrc","owner":"lambdalemon","description":"Encode pdfs into textures so that you can bring books with you in VRChat.","archived":false,"fork":false,"pushed_at":"2025-04-12T17:25:40.000Z","size":263,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T18:30:46.858Z","etag":null,"topics":["vrchat"],"latest_commit_sha":null,"homepage":"","language":"Python","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/lambdalemon.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-01-09T13:46:28.000Z","updated_at":"2025-04-12T17:25:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"bae5dd1f-f768-47a6-9ac0-2c1a8242282d","html_url":"https://github.com/lambdalemon/pdf2vrc","commit_stats":null,"previous_names":["lambdalemon/pdf2vrc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lambdalemon/pdf2vrc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalemon%2Fpdf2vrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalemon%2Fpdf2vrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalemon%2Fpdf2vrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalemon%2Fpdf2vrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdalemon","download_url":"https://codeload.github.com/lambdalemon/pdf2vrc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalemon%2Fpdf2vrc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33031125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["vrchat"],"created_at":"2025-01-11T00:14:35.831Z","updated_at":"2026-05-14T15:32:23.149Z","avatar_url":"https://github.com/lambdalemon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pdf2vrc\n## What is this for?\nEncode pdfs into textures so that you can bring books with you in VRChat. Designed for VRChat avatars though should work for worlds or Unity projects in general.\n\nYou can find an example VRChat asset using this at https://finntherabbot.gumroad.com/l/readable-bible\n## Known Missing Features\n### Text\n- Certain types of fonts (no idea which ones though)\n- Horizontal scaling\n### Curve\n- Curve fill with self-intersection\n- Line cap \u0026 join style (currently defaults to hard cap for a single straight line and round otherwise)\n### Color\n- Transparency\n- Certain color spaces\n## Usage\n1. Install script dependencies\n2. Get `msdf-atlas-gen.exe` from https://github.com/Chlumsky/msdf-atlas-gen/releases and place it in this folder\n3. Run script\n4. Get unity package from https://github.com/lambdalemon/pdf2vrcshader/releases\n5. Import textures\n6. Generate mesh\n7. Create pdf material and apply to mesh\n## Install script dependencies\nWe recommed Anaconda for python package management.\n```\nconda create -n pdf2vrc python=3.10\nconda activate pdf2vrc\nconda install pip\npip install -r requirements.txt\n```\n## Run script\n```\npython pdf2vrc.py yourpdf.pdf\n```\nFor more options\n```\npython pdf2vrc.py --help\n```\nIf successful, two textures, one `.png` and one `.exr` will be generated and placed in the `out` directory.\n\nIf your pdf contains non-black text / vector graphics, an additional `.png` color texture will be generated.\n\nIf your pdf contains raster images, an additional `.png` image atlas texture will be generated.\n\nThe script will also print out any necessary info not included in the textures.\n## Import textures\nUse the following settings when importing textures\n### MainTex (exr)\n![](res/maintex.png)\nNOTE: Format should be RGBA Half instead when using Half Precision mode.\n### Glyph Atlas\n![](res/glyph_atlas.png)\n### Glyph Atlas (Packed)\n![](res/glyph_atlas_packed.png)\n### Color\n![](res/color.png)\n## Generate mesh\nAdd a `PdfPageMeshCreator` component to an empty game object. After choosing appropriate parameters, hit \"Create Mesh\". This creates a Mesh Renderer if there is one sheet of paper, or a Skinned Mesh Renderer otherwise, with one bone for each sheet of paper. Remove the `PdfPageMeshCreator` component before uploading to VRChat.\n\nExplanations of some of the parameters:\n- `numTriangles` should be greater or equal to the script output, and equal to the shader property (i.e. if you have multiple pdfs of the same height and width you can reuse the mesh as long as `numTriangles` is big enough)\n- `startPage` and `endPage` does NOT refer to the start / end page number of the pdf. These only refer to the page numbers that are simultaneously visible. An additional page number offset can be applied using shader properties.\n- `startOnBackside` is only relevant when `doubleSided` is chosen. \u003cbr\u003e e.g. for `startPage = 0, endPage = 3`, \u003cbr\u003e \nw/o `startOnBackside`, the generated skinned mesh has 2 bones: \u003cbr\u003e \u0026emsp; front 0 back 1 \u003cbr\u003e \u0026emsp; front 2 back 3 \u003cbr\u003e\nw/ `startOnBackside`, the generated skinned mesh has 3 bones: \u003cbr\u003e \u0026emsp; back 0 \u003cbr\u003e \u0026emsp; front 1 back 2 \u003cbr\u003e \u0026emsp; front 3 \u003cbr\u003e\n## Notes on shading\nThe shader only supports unlit / minimal diffuse (one directional light only). \n\nIf all contents of your pdf are black, use the unlit option. (Note that this does not include all black and white pdfs since they might contain white text / images)\n\nOtherwise, you probably want to match the shading of the background material. If you want to use a background material other than unlit / minimal diffuse, you might want to modify the shader yourself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdalemon%2Fpdf2vrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdalemon%2Fpdf2vrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdalemon%2Fpdf2vrc/lists"}