Installation
Usage
Below are some example commands for using PdfItDown from the terminal, along with explanations for each option and scenario:Convert a single file to PDF
Use this command to convert a single file (e.g., a Markdown file) to PDF:-i README.md: Specifies the input file to convert.-o README.pdf: Sets the output PDF file path.
Convert multiple files with custom output paths
You can convert several files at once, specifying a matching output PDF for each input:- Multiple
-iflags: List each input file you want to convert. - Multiple
-oflags: Provide an output path for each input file, in the same order.
Bulk convert all files in a directory
To convert every file in a directory to PDF in one go:-d tests/data/testdir: Specifies the directory containing files to convert. All supported files in this directory will be converted to PDF.
Recursive directory conversion
To recursively convert all files in a directory and its subdirectories:--recursive: Walks through all subdirectories and converts supported files.
Prevent overwriting existing files
To skip files that would overwrite an existing PDF:--no-overwrite: If the output file already exists, the conversion will fail instead of replacing it.
For more details on available options, run: