CSV to PDF Rebuilt with New Options

T
Tomas
ConvertAPI

The CSV to PDF converter now renders CSV files directly instead of routing them through Excel. The rewrite brings a configurable field delimiter, a fit-to-page mode, headers repeated on every page, and PDF/A output produced in the same step.

Highlights

  • CSV data is rendered straight to PDF, so a conversion no longer depends on an Excel round trip.
  • FitToPage scales the table so every column fits the page width. It switches to landscape and trims the margins when the table is too wide for portrait, and leaves a PageOrientation you chose yourself unchanged.
  • HeaderOnEachPage repeats the first CSV row at the top of every page, which keeps long tables readable.
  • PDF/A is now selected by version through PdfaVersion rather than a single on or off switch. The older Pdfa flag still works for existing requests.
  • Files above 100,000 rows (roughly 2000 A4 pages) are rejected up front with a clear error instead of failing partway through the conversion.
  • CSV to XLSX now reports an error when the file exceeds the 1,048,576-row worksheet limit. Previously the extra rows were dropped without warning.
  • Excel-only options that never applied to CSV input are no longer offered: worksheet selection, source password, print area, and thousands, decimal and date formatting.

Parameters

  • Delimiter (string, default ,) - the field separator used to split each row.
  • FitToPage (bool, default false) - scale the table down so all columns fit the page width on a single page across.
  • HeaderOnEachPage (bool, default false) - repeat the first CSV row at the top of every page.
  • AutoFitColumns (bool, default false) - fit column widths to their content to reduce empty space.
  • Scale (integer, 10-300) - scale the table content by a percentage.
  • PdfaVersion (collection, default None) - the PDF/A version of the output: PDF/A-1b, PDF/A-2b, PDF/A-2u, PDF/A-3b, PDF/A-3u, PDF/A-4, PDF/A-4e, or PDF/A-4f. Select None to keep a regular PDF.

Try it out