Convert your code projects into clean, searchable text-based PDFs with client-side syntax highlighting—no server uploads needed.
Tired of IDEs exporting your code as massive, unsearchable image-based PDFs? PDFy is here to help!
PDFy is a client-side web application built with SvelteKit and ShadcnSvelte that allows you to select a local project folder, choose specific code and text files, preview them with syntax highlighting, and then print them to a clean, text-based, searchable PDF using your browser's built-in print functionality.
Live Demo: https://pdfy.oseifert.ch
Please keep in mind that this project was put together quickly (in about a day!). As such, users shouldn't expect complete stability or full feature compatibility at this stage.
Development is ongoing, and contributions are welcome to improve functionality and address these limitations!
Many developers, especially students preparing project documentation, face issues with IDEs or tools that generate PDFs by rasterizing code into images or that can't even do it. This results in:
PDFy aims to provide a simple, local, and effective solution to generate high-quality, text-based PDFs of your codebase and documentation.
highlight.js for a wide range of programming languages..gitignore files within the selected
project directory.To run PDFy locally, you'll need Bun installed.
Clone the repository:
git clone https://github.com/ImGajeed76/pdfy.git
cd pdfy
Install dependencies:
bun install
Run the development server:
bun run dev
This will start the development server, typically on http://localhost:5173.
@media print) to style the content specifically for printing, hiding the application
UI and formatting the code/text for a standard page.PDFy aims to support a wide variety of text-based files, including but not limited to:
highlight.js..sh, .bash, .ps1, Dockerfile, .env, .conf, .ini, .sql..txt, .log, .gitignore, and other generic text files.If a file is text-based, PDFy will do its best to display it with syntax highlighting. Unknown code file types will be treated as plain text. For HTML, MD, and XML, rendering is currently experimental and may default to raw text.
Contributions are welcome! If you have ideas for improvements, new features, or bug fixes, please feel free to:
git checkout -b feature/your-feature-name).git commit -m 'Add some feature').git push origin feature/your-feature-name).Please ensure your code follows the existing style and that any new dependencies are justified.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
Made with ❤️ to solve a frustrating problem. Hope it helps you too!