How to Convert CSV to PDF
The shortest path from CSV to PDF: open the CSV in Excel or Google Sheets, then **Print → Save as PDF**. For automation or large batches, Python's `pandas` + `weasyprint` produces clean, paginated reports without opening a spreadsheet.
Excel
Open the CSV in Excel. File → Print. Pick Microsoft Print to PDF, set orientation to Landscape, scale to Fit All Columns on One Page, then Print. Save the PDF.
Google Sheets
Import the CSV. File → Download → PDF. Tick Fit to width, choose Landscape, click Export.
Python automation
import pandas as pd
from weasyprint import HTML
HTML(string=pd.read_csv('data.csv').to_html(index=False)).write_pdf('data.pdf')
Frequently asked questions
How do I fit a wide CSV on one page?
Switch to landscape and scale to fit width. For very wide tables, split into multiple PDFs by column groups.
Can I add a header or footer?
Yes — in Excel via Page Setup → Header/Footer, or in weasyprint via CSS @page rules.