https://github.com/mwelwankuta/pdfy-code
📒 VS Code extension to convert code snippets to pdf
https://github.com/mwelwankuta/pdfy-code
chrome javascript vscode-extension
Last synced: 12 months ago
JSON representation
📒 VS Code extension to convert code snippets to pdf
- Host: GitHub
- URL: https://github.com/mwelwankuta/pdfy-code
- Owner: mwelwankuta
- License: mit
- Created: 2024-04-07T16:43:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-08T10:03:48.000Z (about 2 years ago)
- Last Synced: 2025-06-04T18:03:41.103Z (about 1 year ago)
- Topics: chrome, javascript, vscode-extension
- Language: JavaScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=mwelwankuta.pdfycode
- Size: 437 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PDFyCode
Convert your highlighted code in Visual Studio Code to a PDF file with ease using this extension.

## Features
- Convert highlighted code in the active editor to a PDF file.
- Choose the font size, line height, and page orientation for the PDF output.
- Customize the PDF file name and save location.
## Requirements
- Visual Studio Code version 1.60.0 or higher.
## Installation
1. Open **Visual Studio Code**.
2. Go to the **Extensions** view by clicking on the square icon in the sidebar.
3. Search for **Highlighted Code to PDF**.
4. Click **Install** to install the extension.
5. Once installed, click **Reload** to activate the extension.
6. Run the following command in your terminal to install Puppeteer and Chrome:
```bash
npx puppeteer browsers install chrome
```
## Usage
- **Method 1: Context Menu**
1. Highlight the code you want to convert to a PDF file in the active editor.
2. Right-click on the highlighted code.
3. Select **Convert to PDF** from the context menu.
4. Choose the desired options such as font size, line height, page orientation, file name, and save location in the dialog box.
5. Click **Save** to generate the PDF file.
- **Method 2: Command Palette**
1. Highlight the code you want to convert to a PDF file in the active editor.
2. Press `Ctrl + Shift + P` to open the Command Palette.
3. Type "Convert to PDF" and select it from the list.
4. Choose the desired options such as font size, line height, page orientation, file name, and save location in the dialog box.
5. Click **Save** to generate the PDF file.
## Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue on [GitHub](https://github.com/mwelwankuta/pdfy-code).
## License
This extension is licensed under the [MIT License](LICENSE).