{"id":26996534,"url":"https://github.com/blopa/a4-to-a6","last_synced_at":"2025-04-04T01:19:37.452Z","repository":{"id":282122401,"uuid":"947562614","full_name":"blopa/a4-to-a6","owner":"blopa","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-12T22:49:25.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T23:24:41.496Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/blopa.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":"2025-03-12T22:19:37.000Z","updated_at":"2025-03-12T22:49:28.000Z","dependencies_parsed_at":"2025-03-30T22:00:25.543Z","dependency_job_id":null,"html_url":"https://github.com/blopa/a4-to-a6","commit_stats":null,"previous_names":["blopa/a4-to-a6"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blopa%2Fa4-to-a6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blopa%2Fa4-to-a6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blopa%2Fa4-to-a6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blopa%2Fa4-to-a6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blopa","download_url":"https://codeload.github.com/blopa/a4-to-a6/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247103580,"owners_count":20884083,"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":"2025-04-04T01:19:36.961Z","updated_at":"2025-04-04T01:19:37.444Z","avatar_url":"https://github.com/blopa.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crop PDF to A6 – README\n\nThis is a simple HTML and JavaScript project that allows you to crop an uploaded (or dragged-and-dropped) PDF to A6 size. It uses:\n\n- **pdf-lib** (loaded via CDN) for reading and editing PDF files directly in the browser\n- **Tailwind CSS** (loaded via CDN) for styling\n\n## How It Works\n\n1. **Drop or Select a File**: When you drop a PDF onto the designated drop zone or click and select one, the file is processed immediately.\n2. **Crop Logic**: The script calculates A6 dimensions in PDF points and updates each PDF page’s crop box so that its top-left corner is the new origin.\n3. **Download**: A new PDF (cropped to A6) is generated, and the browser automatically downloads it as `cropped_a6.pdf`.\n\n## Setup \u0026 Usage\n\n1. **Local/Remote Server**: Place this file in a location served by a local or remote server. Opening via `file://` may cause issues in some browsers.\n2. **Open in Browser**: Navigate to the HTML file’s URL.\n3. **Drag or Click**: Drag and drop a PDF onto the dashed area or click to pick one from your file system.\n4. **Observe**: The newly cropped PDF will automatically download.\n\n## Browser Compatibility\n\n- Modern browsers (Chrome, Firefox, Edge, Safari) should work fine.\n- If anything doesn’t work, check the console for error messages.\n\n## Customizing\n\n- **Crop Dimensions**: By default, A6 is treated as 298x420 points (105x148 mm at 72 DPI). Adjust if needed.\n- **Tailwind Classes**: Modify the Tailwind classes in the HTML to change the style of the drop zone or page layout.\n\n## Acknowledgments\n\n- [**pdf-lib**](https://github.com/Hopding/pdf-lib) – A library for creating and modifying PDFs in JavaScript.\n- [**Tailwind CSS**](https://tailwindcss.com/) – A utility-first CSS framework for rapid UI development.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblopa%2Fa4-to-a6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblopa%2Fa4-to-a6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblopa%2Fa4-to-a6/lists"}