BOMParser

BOM to CSV

BOM to CSV: fixed columns, designators expanded, quantities checked

A BOM that arrives as a PDF has to become rows before anyone can price it, load it or compare it. This page covers what the CSV looks like and what is done to the PDF's table to get there.

Convert a PDF BOM to CSV

  1. 1UploadPDF, up to 30 MB
  2. 2Validatequantity vs designators
  3. 3ExportCSV, XLSX, JSON, report

No PDF at hand? Run a sample

Files are processed in memory and deleted after conversion.Samples do not use your free file.

Definition

What a BOM CSV is

A BOM CSV is one row per BOM line with a fixed set of columns. BOMParser writes line, qty, ref_des, part_number, manufacturer, mpn, description, footprint, dnp, notes. The designators for a line are expanded and sit comma-separated in one quoted cell, so a spreadsheet or an importer can count them against qty.

The same ten columns come out whatever the PDF called its headers, so a mapping built once in your ERP or quote sheet keeps working for the next customer's BOM.

Steps

From PDF table to CSV rows

  1. Read every table

    Tables on all pages are collected. A repeated header row, or a second table with the same header, is read as a continuation. A table without a header and with the same width continues the one before it.

  2. Map the headers

    Header words are matched to the ten columns (list below). When a column could mean two things, the rule is stated in the parser notes.

  3. Normalize each cell

    Quantities are parsed, designator lists expanded, DNP markers read, totals rows set aside. Anything unreadable is flagged and left as found.

  4. Write the CSV

    RFC 4180 quoting, CRLF line ends, UTF-8. Formula-looking cells get an apostrophe and are counted in the notes.

Header synonyms

Which PDF headers land in which column

CSV columnPDF headers read as this column
lineItem, Line, #, No., Pos. "Item No." counts as a line number when it holds small integers.
qtyQty, Quantity, Qty per board, Per board, Qty/Assy, No. off
ref_desReference Designator(s), Ref Des, RefDes, Designator, Reference, Location
part_numberInternal PN, Company PN, Customer PN, SKU, Part Number (when an MPN column also exists)
manufacturerManufacturer, Mfr, Mfg, Vendor, Make, Brand
mpnManufacturer Part Number, MPN, Mfr PN, Mfr P/N, Mfg PN, Part Number (when only a manufacturer column sits beside it)
descriptionDescription, Desc, Value, Comment (when the table has no Description or Value column); Value and Description are joined
footprintFootprint, Package, Case, Pattern, Pkg
dnpDNP, DNI, Do Not Populate, Not Fitted. Fitted / Populate columns are read the other way round.
notesNotes, Remarks, Comments; Comment too, whenever the table also has a Description or Value column

A header that matches none of these is listed under "Column mapping" in the checks and kept in the JSON export. Free: 1 file per day, up to 10 pages, no account.

Comparison

Getting a BOM CSV out of a PDF

What you needRe-typing by handGeneric PDF-to-ExcelBOMParser
Same columns every timeDepends on who typed it.Columns follow each PDF's own layout.Ten fixed columns in a fixed order.
DesignatorsTyped as printed, ranges and all.One text cell, ranges unexpanded.Expanded and counted; the count is compared with qty.
Header namesYou rename them.Copied as printed.Synonyms mapped (Qty, Quantity, Per board; Ref Des, Reference, Designator).
Wrapped rowsYou merge them.Often become extra rows.Appended to the line above; alternate-source rows go to notes.
Special charactersExcel mangles some on open.Depends on the tool.UTF-8 with an optional byte-order mark; formula-looking cells guarded.
EvidenceNone.None.Validation report: every check, with the lines involved.

"Generic PDF-to-Excel" means tools that copy table cells as printed and know nothing about BOMs. Individual products differ.

FAQ

BOM to CSV questions

What is in each column of the BOM CSV?

line is the item number as printed (or a running number when the PDF has none). qty is the quantity per board. ref_des is the expanded designator list. part_number is your internal number, manufacturer and mpn identify the part at the maker, description and footprint describe it, dnp is Y or N, and notes holds remarks.

The BOM template page lists every column with an example and the rule it follows.

Why are the designators in one cell?

One BOM line is one row. The designators for that line sit in a single cell, comma-separated and expanded (quoted whenever there is more than one), so R1, R2, R5-R8 becomes R1,R2,R5,R6,R7,R8. A spreadsheet or importer can count the commas, and the count must equal qty.

Which delimiter and encoding does the CSV use?

Comma-delimited, RFC 4180 quoting, CRLF line ends, UTF-8. The download adds a byte-order mark by default so Excel shows characters such as the micro sign and the ohm sign correctly. Untick the option if your importer rejects a byte-order mark.

What happens to a cell that starts with =, +, - or @?

Excel can read such a cell as a formula. In the CSV, BOMParser puts an apostrophe in front of it, except for plain numbers like -5, and says how many cells it touched in the parser notes. The JSON export keeps the original text.

How are quantities written with commas, units or brackets read?

1,000 is read as 1000 and 0,5 as 0.5. 4 pcs and 3x are read as 4 and 3. A quantity in brackets such as (2) is read as -2 and flagged, never summed. Text that is not a number is left empty and flagged. Nothing is guessed.

What if the PDF has no part number column?

part_number stays empty and the check named 'Every line has a part number' says so. If the PDF has a manufacturer column and a single 'Part Number' column with no MPN column, that column is read as the MPN and the parser notes say it.

What happens to columns that have no place in the CSV?

Columns such as tolerance, voltage or price are not in the ten CSV columns. They are listed in the column-mapping check and kept per line in the JSON export, so nothing is lost silently.

What if a row wraps over two lines in the PDF?

A row with an empty item and quantity that carries only designators, description or notes is appended to the line above. A row with only a manufacturer and part number is read as an alternate source and added to that line's notes as 'alt: ...'. Both cases are listed in the parser notes.

Can I import this CSV into my ERP?

Map the ten columns in your ERP's import tool. BOMParser does not know your ERP's schema, so it does not claim a ready-made import for any particular system. The columns and their rules are fixed, which makes the mapping a one-time job.

How is the upload CSV different from the normalized CSV?

The upload CSV has four columns, qty, mpn, manufacturer and ref_des, and only populated lines that have an MPN and a quantity. It is a generic layout, not a specific distributor's template. The normalized CSV has all ten columns and every line, including DNP lines.