{"_id":"@agentxin-ai/plugin-pdfium","name":"@agentxin-ai/plugin-pdfium","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.6":{"name":"@agentxin-ai/plugin-pdfium","version":"0.0.6","license":"AGPL-3.0","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/agentxin-plugins.git"},"bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"@agentxin-plugins-starter/source":"./src/index.ts","types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"dependencies":{"@hyzyla/pdfium":"2.1.9","pngjs":"^7.0.0","tslib":"^2.3.0"},"peerDependencies":{"@langchain/core":"0.3.72","@langchain/langgraph":"0.4.7","@nestjs/common":"^11.1.6","@agentxin-ai/plugin-sdk":"^3.6.2","chalk":"4.1.2","zod":"3.25.67"},"devDependencies":{"@types/pngjs":"^6.0.5"},"_id":"@agentxin-ai/plugin-pdfium@0.0.6","description":"`@agentxin-ai/plugin-pdfium` is a PDF conversion toolset plugin for the [AgentXin AI](https://github.com/agentxin-ai/agentxin) agent platform. It equips agents with the ability to convert PDF files into Markdown format, extracting both text and images for","homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-OQDoExvZaW1OrPR1Wf4qsvHCJXd1SKCXGDYJNenNswNpQFTlNvvKV1J0uThUMihGrupsUp6VZPr0kKDi7annsQ==","shasum":"070b8014b8a5a1e0bf632b6992940e2b0e80c3bb","tarball":"https://registry.npmjs.org/@agentxin-ai/plugin-pdfium/-/plugin-pdfium-0.0.6.tgz","fileCount":20,"unpackedSize":34375,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC1YAGZtS9abkURetS0rsCcqukCHB43fVWXVCZvtwp7iwIgZ2gfnObFk9ImjJXBZpfNv3LXvV4GFnNZefcJNeTEjBc="}]},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"directories":{},"maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-pdfium_0.0.6_1775125115000_0.9500309174984027"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-02T10:18:34.904Z","0.0.6":"2026-04-02T10:18:35.135Z","modified":"2026-04-02T10:18:35.683Z"},"maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"description":"`@agentxin-ai/plugin-pdfium` is a PDF conversion toolset plugin for the [AgentXin AI](https://github.com/agentxin-ai/agentxin) agent platform. It equips agents with the ability to convert PDF files into Markdown format, extracting both text and images for","homepage":"https://github.com/agentxin-ai/agentxin-plugins#readme","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/agentxin-plugins.git"},"bugs":{"url":"https://github.com/agentxin-ai/agentxin-plugins/issues"},"license":"AGPL-3.0","readme":"# AgentXin Plugin: Pdfium\n\n`@agentxin-ai/plugin-pdfium` is a PDF conversion toolset plugin for the [AgentXin AI](https://github.com/agentxin-ai/agentxin) agent platform. It equips agents with the ability to convert PDF files into Markdown format, extracting both text and images for easier processing within workflows.\n\n## Installation\n\n```bash\npnpm add @agentxin-ai/plugin-pdfium\n# or\nnpm install @agentxin-ai/plugin-pdfium\n```\n\n> **Note**: This plugin depends on `@agentxin-ai/plugin-sdk`, `@nestjs/common@^11`, `@hyzyla/pdfium`, `pngjs`, and `zod` as peer dependencies. Install these in the host project before enabling the plugin.\n\n## Quick Start\n\n1. **Register the Plugin**  \n   Include the package in your plugin list (environment variable or configuration):\n\n   ```sh .env\n   PLUGINS=@agentxin-ai/plugin-pdfium\n   ```\n\n   The plugin bootstraps the `PdfiumModule` NestJS module, registers the toolset, and emits lifecycle logs.\n\n2. **Provision Toolsets for Agents**\n\n   - AgentXin Console: add a Built-in Toolset instance and choose `PDF to Markdown`.\n   - API: request toolset `pdfium`.\n\n   No credentials or secrets are required, so any authorized agent can immediately create instances.\n\n## Pdfium Toolset\n\n| Field        | Value                                                              |\n| ------------ | ------------------------------------------------------------------ |\n| Name         | `pdfium`                                                           |\n| Display Name | PDF to Markdown / PDF 转 Markdown                                  |\n| Category     | `tools`                                                            |\n| Description  | Convert PDF files to markdown with extracted text and page images. |\n| Config       | No configuration or external integrations are needed.              |\n\nThe toolset uses `@hyzyla/pdfium` to render PDF pages and extract text. Images are saved as PNG files.\n\n## Tools\n\n| Tool              | Purpose                                                                               | Input Highlights                                                                                    | Output                                                                                      |\n| ----------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |\n| `pdf_to_markdown` | Convert a PDF file into a markdown file with extracted text and rendered page images. | `fileUrl`, `filePath`, or `content` (base64/buffer). Optional `fileName` and `scale` (default 2.0). | JSON object containing `group`, `pageCount`, `content` (markdown string), and `files` list. |\n\n### Example Payloads\n\n```json\n// PDF to Markdown\n{\n  \"tool\": \"pdf_to_markdown\",\n  \"input\": {\n    \"fileUrl\": \"https://example.com/document.pdf\",\n    \"scale\": 2.0\n  }\n}\n```\n\nThe tool returns a JSON object. Agents typically use the `content` field for the markdown text and `files` for accessing generated images.\n\n## Permissions & Security\n\n- **Network Calls**: Fetches PDF from URL if `fileUrl` is provided.\n- **Filesystem**: Writes generated markdown and image files to the workspace volume.\n- **Logging**: Only lightweight lifecycle logs are emitted.\n\n## Development & Testing\n\n```bash\nnpm install\nnpx nx build @agentxin-ai/plugin-pdfium\nnpx nx test @agentxin-ai/plugin-pdfium\n```\n\n## License\n\nThis project follows the [AGPL-3.0 License](../../../LICENSE) located at the repository root.\n","readmeFilename":"README.md","_rev":"1-fccfa28d7db7cd2395ffd42cbad5824d"}