{
  "product": "Documents with autodetect of Size and BW and Color page counts",
  "url": "https://wp2print.net/shop/document-autodetect-bw-color/",
  "price_page": "https://wp2print.net/shop/document-autodetect-bw-color/prices/",
  "currency": "USD",
  "prices_include_tax": false,
  "updated": "2025-02-24",
  "product_type": "book",
  "detail": "full",
  "rules": {
    "formula": "total = (printing_blackwhite[size,color](blackwhite_pages) + printing_colour[size,color](colour_pages) + binding[size,binding](books))",
    "measures": {
      "blackwhite_pages": "books × Black/White pages per book",
      "colour_pages": "books × Colour pages per book",
      "books": "number of books"
    },
    "price_basis": "each price is the total for the number in its column, not a unit price",
    "lookup": "table[keys](measure) = the row whose keys match the chosen options, at the value of the measure",
    "interpolation": "linear",
    "above_max_column": "extrapolate_last_slope",
    "below_min_column": "proportional_to_first_column",
    "min_books": 1
  },
  "options": {
    "size": ["A4", "Letter 8.5x11"],
    "color": ["1/0 Black/White front only", "1/1 Black/White both sides", "4/0 Full-color front only", "4/4 Full-color both sides"],
    "binding": ["None", "Staple top-left corner", "Staples left-edge", "Ring binder", "Perfect", "Spiral"]
  },
  "tables": {
    "printing_blackwhite": {
      "price_of": "printing",
      "priced_by": "blackwhite_pages",
      "columns": [1, 50, 100, 1000],
      "keys": ["size", "color"],
      "rows": [
        {"size": "A4", "color": "1/0 Black/White front only", "prices": [0.05, 2.5, 4.9, 40]},
        {"size": "A4", "color": "1/1 Black/White both sides", "prices": [0.09, 4.5, 8.9, 85]},
        {"size": "Letter 8.5x11", "color": "1/0 Black/White front only", "prices": [0.06, 3, 5.9, 52]},
        {"size": "Letter 8.5x11", "color": "1/1 Black/White both sides", "prices": [0.1, 5, 9.9, 90]}
      ]
    },
    "printing_colour": {
      "price_of": "printing",
      "priced_by": "colour_pages",
      "columns": [1, 50, 100, 1000],
      "keys": ["size", "color"],
      "rows": [
        {"size": "A4", "color": "4/0 Full-color front only", "prices": [0.2, 10, 19, 160]},
        {"size": "A4", "color": "4/4 Full-color both sides", "prices": [0.29, 14, 27, 250]},
        {"size": "Letter 8.5x11", "color": "4/0 Full-color front only", "prices": [0.3, 15, 29, 270]},
        {"size": "Letter 8.5x11", "color": "4/4 Full-color both sides", "prices": [0.39, 19, 37, 350]}
      ]
    },
    "binding": {
      "price_of": "Binding",
      "priced_by": "books",
      "columns": [1, 10],
      "keys": ["size", "binding"],
      "rows": [
        {"size": "A4", "binding": "None", "prices": [0, 0]},
        {"size": "A4", "binding": "Staple top-left corner", "prices": [0.5, 5]},
        {"size": "A4", "binding": "Staples left-edge", "prices": [0.5, 5]},
        {"size": "A4", "binding": "Ring binder", "prices": [4, 40]},
        {"size": "A4", "binding": "Perfect", "prices": [2, 20]},
        {"size": "A4", "binding": "Spiral", "prices": [3, 30]},
        {"size": "Letter 8.5x11", "binding": "None", "prices": [0, 0]},
        {"size": "Letter 8.5x11", "binding": "Staple top-left corner", "prices": [0.5, 5]},
        {"size": "Letter 8.5x11", "binding": "Staples left-edge", "prices": [0.5, 5]},
        {"size": "Letter 8.5x11", "binding": "Ring binder", "prices": [4, 40]},
        {"size": "Letter 8.5x11", "binding": "Perfect", "prices": [2, 20]},
        {"size": "Letter 8.5x11", "binding": "Spiral", "prices": [3, 30]}
      ]
    }
  },
  "example": {
    "input": {
      "books": 50,
      "size": "A4",
      "printing_blackwhite": {"pages_per_book": 40, "color": "1/0 Black/White front only"},
      "printing_colour": {"pages_per_book": 8, "color": "4/0 Full-color front only"},
      "binding": "Staple top-left corner"
    },
    "lines": [
      {"table": "printing_blackwhite", "blackwhite_pages": 2000, "price": 79},
      {"table": "printing_colour", "colour_pages": 400, "price": 66},
      {"table": "binding", "books": 50, "price": 25}
    ],
    "subtotal": 170,
    "total": 170
  },
  "note": "Account or group pricing may differ. The price shown in the cart is authoritative.",
  "seller": {
    "name": "Acme Print Shop",
    "url": "https://wp2print.net/",
    "location": "Kittery, Maine, United States",
    "service_area": "Kittery, Eliot, York county and southern Maine"
  }
}
