{"_id":"@cafeasp/n8n-nodes-pdf-to-pdf","name":"@cafeasp/n8n-nodes-pdf-to-pdf","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@cafeasp/n8n-nodes-pdf-to-pdf","version":"0.1.0","description":"n8n node to re-save PDF files to fix missing page dimensions and other issues","keywords":["n8n-community-node-package","n8n","pdf","pdf-processing","document-conversion"],"license":"MIT","homepage":"https://github.com/cafeasp/n8n-pdf-to-pdf","author":{"name":"Victor","email":"vpacheco99@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/cafeasp/n8n-pdf-to-pdf.git"},"main":"index.js","scripts":{"build":"tsc && gulp build:icons","dev":"tsc --watch","format":"prettier \"nodes/**/*.ts\" --write","lint":"eslint \"nodes/**/*.ts\" package.json","lintfix":"eslint \"nodes/**/*.ts\" package.json --fix","prepublishOnly":"npm run build"},"n8n":{"n8nNodesApiVersion":1,"credentials":[],"nodes":["dist/nodes/PdfToPdf/PdfToPdf.node.js"]},"dependencies":{"pdf-lib":"^1.17.1"},"devDependencies":{"@types/node":"^25.0.8","@typescript-eslint/parser":"^5.0.0","eslint":"^8.0.0","eslint-plugin-n8n-nodes-base":"^1.11.0","gulp":"^4.0.2","n8n-workflow":"*","prettier":"^2.7.1","typescript":"~5.6.0"},"peerDependencies":{"n8n-workflow":"*"},"gitHead":"34757b068dbbfbcdc287b5a9d3cd9d8224faac4a","_id":"@cafeasp/n8n-nodes-pdf-to-pdf@0.1.0","bugs":{"url":"https://github.com/cafeasp/n8n-pdf-to-pdf/issues"},"_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-YHUIXCXLirTMw2qYCSwcBa1peBkqbQ1QHfvKmn2woMOhDx4EddiCDkRWrzPh4qdmVTOnnNWWXjKnBMYTjsqEfA==","shasum":"7e5e843e2bf387f572019e2e6260bf4e27ca8152","tarball":"https://registry.npmjs.org/@cafeasp/n8n-nodes-pdf-to-pdf/-/n8n-nodes-pdf-to-pdf-0.1.0.tgz","fileCount":6,"unpackedSize":14344,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDUXS/jyJY2dEJA+5bgJi5Z7Fh1Z9oTgKpgXYicFYgFFAIhAOrP269wNiXXs3+2y5+YTsBNk3EOK9YoQy6FpxnOxEMo"}]},"_npmUser":{"name":"cafeasp","email":"vpacheco99@gmail.com"},"directories":{},"maintainers":[{"name":"cafeasp","email":"vpacheco99@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-nodes-pdf-to-pdf_0.1.0_1768323097117_0.2339370753982042"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-13T16:51:36.971Z","0.1.0":"2026-01-13T16:51:37.284Z","modified":"2026-01-13T16:51:37.560Z"},"maintainers":[{"name":"cafeasp","email":"vpacheco99@gmail.com"}],"description":"n8n node to re-save PDF files to fix missing page dimensions and other issues","homepage":"https://github.com/cafeasp/n8n-pdf-to-pdf","keywords":["n8n-community-node-package","n8n","pdf","pdf-processing","document-conversion"],"repository":{"type":"git","url":"git+https://github.com/cafeasp/n8n-pdf-to-pdf.git"},"author":{"name":"Victor","email":"vpacheco99@gmail.com"},"bugs":{"url":"https://github.com/cafeasp/n8n-pdf-to-pdf/issues"},"license":"MIT","readme":"# n8n PDF to PDF Node\r\n\r\nAn n8n community node that re-saves PDF files to fix missing page dimensions and other structural issues. This node processes PDF binary data and outputs a properly formatted PDF with corrected metadata.\r\n\r\n## Why This Node?\r\n\r\nSome PDF files may have missing or incorrect page dimensions, which can cause issues when:\r\n- Displaying PDFs in viewers\r\n- Converting PDFs to other formats\r\n- Processing PDFs with other tools\r\n- Printing documents\r\n\r\nThis node loads the PDF, ensures all pages have proper dimensions, and saves it as a new properly formatted PDF file.\r\n\r\n## Installation\r\n\r\nFollow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.\r\n\r\n### Manual Installation\r\n\r\n1. Install the package in your n8n installation:\r\n```bash\r\nnpm install @cafeasp/n8n-nodes-pdf-to-pdf\r\n```\r\n\r\n2. Restart n8n to load the new node.\r\n\r\n### Development Installation\r\n\r\n1. Clone this repository:\r\n```bash\r\ngit clone https://github.com/cafeasp/n8n-pdf-to-pdf.git\r\ncd n8n-pdf-to-pdf\r\n```\r\n\r\n2. Install dependencies:\r\n```bash\r\nnpm install\r\n```\r\n\r\n3. Build the project:\r\n```bash\r\nnpm run build\r\n```\r\n\r\n4. Link your node to n8n:\r\n\r\n**Linux/Mac:**\r\n```bash\r\nnpm link\r\ncd ~/.n8n/custom\r\nnpm link @cafeasp/n8n-nodes-pdf-to-pdf\r\n```\r\n\r\n**Windows (PowerShell - Run as Administrator):**\r\n```powershell\r\nnpm link\r\ncd $env:USERPROFILE\\.n8n\\custom\r\nnpm link @cafeasp/n8n-nodes-pdf-to-pdf\r\n```\r\n\r\n**Windows (Command Prompt - Run as Administrator):**\r\n```cmd\r\nnpm link\r\ncd %USERPROFILE%\\.n8n\\custom\r\nnpm link @cafeasp/n8n-nodes-pdf-to-pdf\r\n```\r\n\r\n5. Restart n8n to load the new node.\r\n\r\n## Usage\r\n\r\n### Node Configuration\r\n\r\nThe node has the following parameters:\r\n\r\n- **Binary Property**: The name of the binary property containing the input PDF file (default: \"data\")\r\n- **Output Binary Property**: The name of the binary property where the re-saved PDF will be stored (default: \"data\")\r\n- **Options**:\r\n  - **File Name**: Optional custom file name for the output PDF\r\n\r\n### Example Workflow\r\n\r\n1. Read a PDF file using the \"Read Binary File\" node or receive it from an HTTP request\r\n2. Add the \"PDF to PDF\" node\r\n3. Configure the binary property names (or use defaults)\r\n4. The node will output the re-saved PDF with proper page dimensions\r\n5. Use the output with other nodes (save to file, send via email, upload to cloud storage, etc.)\r\n\r\n### What the Node Does\r\n\r\n1. Accepts a PDF file as binary input\r\n2. Loads the PDF using pdf-lib\r\n3. Processes each page to ensure dimensions are properly set\r\n4. Saves the PDF with corrected metadata\r\n5. Returns the new PDF as binary output\r\n\r\n## Development\r\n\r\n### Prerequisites\r\n\r\n- Node.js (v14 or higher)\r\n- npm or yarn\r\n- n8n installed (for testing)\r\n\r\n### Scripts\r\n\r\n- `npm run build` - Build the project and copy icons\r\n- `npm run dev` - Watch mode for development\r\n- `npm run format` - Format code with Prettier\r\n- `npm run lint` - Lint the code\r\n- `npm run lintfix` - Auto-fix linting issues\r\n\r\n## Technical Details\r\n\r\nThis node uses the [pdf-lib](https://pdf-lib.js.org/) library to:\r\n- Load PDF documents\r\n- Access and process page dimensions\r\n- Save modified PDFs with proper structure\r\n\r\n## Compatibility\r\n\r\n- n8n version: 0.198.0 or higher\r\n- n8n nodes API version: 1\r\n\r\n## License\r\n\r\nMIT\r\n\r\n## Author\r\n\r\nVictor Pacheco\r\n- Email: vpacheco99@gmail.com\r\n- GitHub: [@cafeasp](https://github.com/cafeasp)\r\n\r\n## Support\r\n\r\nIf you encounter any issues or have questions:\r\n- Open an issue on [GitHub](https://github.com/cafeasp/n8n-pdf-to-pdf/issues)\r\n- Check the [n8n community forum](https://community.n8n.io/)\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please feel free to submit a Pull Request.\r\n\r\n3. Start or restart(control c) n8n:\r\n```bash\r\nnpm run build\r\nnpx n8n\r\n```\r\n\r\nYour node should now appear in the nodes panel\r\n\r\n### Customization\r\n\r\n1. **Update package.json**: Change the `name`, `description`, `author`, and `repository` fields\r\n2. **Rename files**: Rename `Example.node.ts` and the credential file to match your integration\r\n3. **Update the node**: Modify the node properties, operations, and logic in the `.node.ts` file\r\n4. **Update credentials**: Adjust the credential properties to match your API requirements\r\n5. **Replace icon**: Replace `example.svg` with your own icon\r\n6. **Update n8n config**: Update the `n8n` section in package.json to reflect your renamed files\r\n\r\n## Publishing\r\n\r\nBefore publishing to npm:\r\n\r\n1. Update package.json with your package details\r\n2. Ensure your package name starts with `n8n-nodes-`\r\n3. Add `n8n-community-node-package` to keywords in package.json\r\n4. Build the project: `npm run build`\r\n5. Publish: `npm publish`\r\n\r\n## Resources\r\n\r\n- [n8n Documentation](https://docs.n8n.io)\r\n- [Creating Nodes](https://docs.n8n.io/integrations/creating-nodes/)\r\n- [n8n Community Nodes](https://docs.n8n.io/integrations/community-nodes/)\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md","_rev":"1-bf9dfececbe8b4f6cac7ebd4580c24f6"}