code-to-pdf 0.1.3

Generates a syntax-highlighted PDF of your source code
Documentation

code-to-pdf

Converts a folder of source code to a fully syntax-highlighted PDF

Features

  • Syntax highlights code (uses two-face for syntax definitions)
  • Automatically handles line wrapping and page overflowing
  • Fast
  • Error-tolerant
  • Configurable (custom file exclusions, output filename, fonts)
  • Displays images

Installation

From crates.io

cargo install code-to-pdf

From this repository

git clone https://github.com/Tommypop2/code-to-pdf
cargo install --path ./code-to-pdf

Usage

Generating a PDF from a folder

c2pdf .

This walks the current folder and generates a syntax-highlighted PDF of all files in that folder