{"id":16908627,"url":"https://github.com/byteit101/ghostscript-pdfa-3-file-embed","last_synced_at":"2025-03-20T17:29:59.026Z","repository":{"id":140196451,"uuid":"439763199","full_name":"byteit101/ghostscript-pdfa-3-file-embed","owner":"byteit101","description":"Ghostscript script to create a PDF/A-3 with embedded files","archived":false,"fork":false,"pushed_at":"2021-12-19T03:03:23.000Z","size":26,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-25T16:22:40.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PostScript","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/byteit101.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":"2021-12-19T03:02:49.000Z","updated_at":"2024-10-14T15:48:01.000Z","dependencies_parsed_at":"2024-07-11T20:19:40.218Z","dependency_job_id":null,"html_url":"https://github.com/byteit101/ghostscript-pdfa-3-file-embed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteit101%2Fghostscript-pdfa-3-file-embed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteit101%2Fghostscript-pdfa-3-file-embed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteit101%2Fghostscript-pdfa-3-file-embed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteit101%2Fghostscript-pdfa-3-file-embed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byteit101","download_url":"https://codeload.github.com/byteit101/ghostscript-pdfa-3-file-embed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244659926,"owners_count":20489251,"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-10-13T18:52:13.601Z","updated_at":"2025-03-20T17:29:59.007Z","avatar_url":"https://github.com/byteit101.png","language":"PostScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDF/A-3 (B) Ghostscript File Embedding \u0026 Attachment Script\n\nThis repo has a script to enable easily embedding files in a PDF/A-3 via Ghostscript. If you do not need PDF/A-3, this can also be used to just embed files too.\n\nThese scripts require ghostscript, and as written, ArgyllCMS for the sRGB color profile. The script should run without modification on Debian 10 with `ghostscript` and `argyll` installed. Otherwise, you will need to make changes.\n\nCommon changes:\n * Different sRGB path or color space: update `ICCProfile` and `OutputConditionIdentifier`\n * Later version of Ghostscript: `-dNOSAFER` (required for computing the hashes, last modified date, and mime type). Do not use this script on PDF files that you do not trust! \n\nThe script is composed of 5 sections, from top to bottom:\n 1. [A PS JSON parser](https://comp.lang.postscript.narkive.com/CtRplAtR/json-reader-writer-in-postscript). \n 2. String concatenate function from [this SO post]( https://stackoverflow.com/a/12379557).\n 3. My function definitions to decode the parsed JSON and attach it to the PDF\n 4. Slightly modified `PDFA_defs.ps` from the Ghostscript distribution to attach the ICC color profiles and make the document PDF/A\n 5. My code to actually load, parse, and insert the attachments\n \n# General Usage\n\nRun the sample: `./run-example.sh`.  This re-generates output.pdf.\n\nValid options to the script are:\n\n * `-sAttachmentSpec=file.json` (required) Load the attachment specification\n * `-dDefaultRel=/Supplement` (optional) Default relation for attached files. See below. Valid values (from pdf specification): `/Source`, `/Data`, `/Alternative`, `/Supplement`, `/EncryptedPayload`, `/FormData`, `/Schema`, `/Unspecified`. Custom values may be used where none of these entries is appropriate.\n * `-sDefaultTitle=\"Any Title here\"` (optional) Default title if the PDF file doesn't have a title already.\n\n# JSON Attachment Specification\n\nThe specification is flexible. If you just want to attach one file with no description, a single string is fine: `\"path/to/my/file.png\"`. If you want to attach multiple files with no description, an array works too: `[\"path/file1.png\", \"path/file2.txt\"]`. In these two cases, the `DefaultRel` applies.\n\nIf you wish to add a description, you must use the full specification:\n\n```\n{\n\t\"/path/to/file1.jpg\": {\n\t\t\"desc\": \"(optional) my description\",\n\t\t\"rel\": \"(optional, uses DefaultRel otherwise) Alternative\"\n\t},\n\t\"/path/to/file2.zip\": {\n\t\t\"rel\": \"EncryptedPayload\"\n\t}\n}\n```\n\nNote that `rel` lacks the leading `/` that `DefaultRel` has, though the values are otherwise the same.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteit101%2Fghostscript-pdfa-3-file-embed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyteit101%2Fghostscript-pdfa-3-file-embed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteit101%2Fghostscript-pdfa-3-file-embed/lists"}