⚠️ If you are using Firefox: Have a look at the known issues here
This extension can be used to convert your code into a PDF File like it works with IntelliJ. It works with single code files as well as with whole Directories. It uses puppeteer-core under the hood so you need Firefox or Chrome installed.
- Convert whole directories or single files of code into PDFs.
- Syntax Highlighting thanks to Prism.js for every major language.
- easy to use via commands or the explorer context menu.
This extension contributes the following settings:
codeToPdf.openHTMLPageInBrowser
- default:
false
- opens a browser window with the html which will be converted to pdf
- default:
codeToPdf.ignoredFileExtensions
- default:
[".txt", ".pdf",".jpg",".jpeg",".png",".xlsx",".docx",".pptx",".ico"]
- Stores file extensions which will be ignored when converting to pdf e.g. ['.html']
- default:
codeToPdf.pathForBrowserExec
- default:
""
- Usable for MacOS Users when the Browser is not installed in the default location
- default:
- Firefox cannot be closed with puppeteer: Because of a locked user profile puppeteer cannot close firefox. The task has to be cancelled manually.
- PDF colors can look blurred: The converted PDF can looked blurred. A workarround is to enable the
openHTMLPageInBrowser
option and convert it manually.