{"id":24612646,"url":"https://github.com/codebygio/svelte-pagedjs","last_synced_at":"2026-02-13T10:40:17.681Z","repository":{"id":272786175,"uuid":"917451252","full_name":"codebygio/svelte-pagedjs","owner":"codebygio","description":"A Svelte wrapper for PagedJS, providing easy pagination and print layout capabilities for your Svelte applications.","archived":false,"fork":false,"pushed_at":"2025-01-16T15:38:04.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-17T15:57:47.439Z","etag":null,"topics":["pagedjs","print","svelte","sveltekit"],"latest_commit_sha":null,"homepage":"http://localhost:5173/libs/svelte-pagedjs","language":"Svelte","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/codebygio.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":"2025-01-16T02:24:44.000Z","updated_at":"2025-08-21T18:59:13.000Z","dependencies_parsed_at":"2025-01-16T17:02:44.631Z","dependency_job_id":"790d4b3a-918b-4e1e-a225-35e43dd54f9f","html_url":"https://github.com/codebygio/svelte-pagedjs","commit_stats":null,"previous_names":["codebygio/svelte-pagedjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codebygio/svelte-pagedjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebygio%2Fsvelte-pagedjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebygio%2Fsvelte-pagedjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebygio%2Fsvelte-pagedjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebygio%2Fsvelte-pagedjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebygio","download_url":"https://codeload.github.com/codebygio/svelte-pagedjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebygio%2Fsvelte-pagedjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29402040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"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":["pagedjs","print","svelte","sveltekit"],"created_at":"2025-01-24T20:23:27.805Z","updated_at":"2026-02-13T10:40:17.655Z","avatar_url":"https://github.com/codebygio.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svelte-pagedjs\n\nA Svelte wrapper for PagedJS, providing easy pagination and print layout capabilities for your Svelte applications.\n\n## Installation\n\n```bash\nnpm install svelte-pagedjs pagedjs\n```\n\n## Features\n\n- 📑 Page-based content layout\n- 🖨️ Print-optimized rendering\n- 📏 Automatic content resizing\n- ✏️ Editable content support\n- 📊 Performance metrics\n- 🎨 Custom CSS styling support\n\n## Usage\n\n```svelte\n\u003cscript lang=\"ts\"\u003e\n  import { Pagedjs } from 'svelte-pagedjs';\n\n  // Optional configuration\n  const options = {\n    enableContentEditable: true,\n    autoResize: true,\n    scaleWidth: 0.9,\n    cssFiles: ['path/to/your/styles.css'],\n    showMetrics: true\n  };\n\u003c/script\u003e\n\n\u003cPagedjs {...options}\u003e\n  \u003c!-- Your content here --\u003e\n  \u003cdiv\u003e\n    \u003ch1\u003eMy Paged Content\u003c/h1\u003e\n    \u003cp\u003eThis content will be paginated...\u003c/p\u003e\n  \u003c/div\u003e\n\u003c/Pagedjs\u003e\n```\n\n## Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `enableContentEditable` | boolean | `false` | Makes the content editable after rendering |\n| `autoResize` | boolean | `false` | Enables automatic resizing of content |\n| `scaleWidth` | number | `0.9` | Scale factor for content width (0-1) |\n| `cssFiles` | string[] | `[]` | Array of CSS file paths to apply |\n| `showMetrics` | boolean | `false` | Shows rendering performance metrics |\n\n## Performance Metrics\n\nWhen `showMetrics` is enabled, the component displays a performance dashboard showing:\n- Total number of pages rendered\n- Rendering time\n- Start and completion timestamps\n\n## Server-Side Rendering (SSR)\n\nThe component is SSR-friendly and automatically detects browser environment using `esm-env`.\n\n## TypeScript Support\n\nFull TypeScript support is included. Types are exported for easy integration:\n\n```typescript\nimport type { PagedjsProps, PerformanceMetrics } from 'svelte-pagedjs';\n```\n\n## Example\n\n```svelte\n\u003cscript lang=\"ts\"\u003e\n  import { Pagedjs } from 'svelte-pagedjs';\n\u003c/script\u003e\n\n\u003cPagedjs\n  enableContentEditable={true}\n  autoResize={true}\n  showMetrics={true}\n\u003e\n  \u003carticle\u003e\n    \u003ch1\u003eChapter 1\u003c/h1\u003e\n    \u003cp\u003eYour content here...\u003c/p\u003e\n  \u003c/article\u003e\n\u003c/Pagedjs\u003e\n```\n\n## Event Handling\n\nThe component automatically handles:\n- Window resize events for responsive layouts\n- Content editable toggling\n- Cleanup on component destruction\n\n## Browser Support\n\nWorks in modern browsers that support CSS Custom Properties and CSS Grid.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT\n\n## Acknowledgements\n\nBuilt on top of [PagedJS](https://pagedjs.org/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebygio%2Fsvelte-pagedjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebygio%2Fsvelte-pagedjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebygio%2Fsvelte-pagedjs/lists"}