Heat oven to 400F line a baking sheet with parchment paper. Cook the bacon in a large skillett over medium high heat, stirring often until crisp 6-8 minutes; transfer to a paper towl-lined plate. Spoon off and discard all but 2 tbs of the bacon drippings from the skillet. Add the onions to the skillet and cook stirring often, until very tender and carmelized. 12-15 minutes. Add a splash of water to the skillet if necessary to help release the drippings Stir the bacon and 1/4 tsp pepper.
Lay the pastry flat on the prepared baking sheet. Spread the onion mixture over the pastry leaving a 1/2 inch border and crumble the cheese over the top.
Bake until the pastry is goden and crisp around the edges, 25-to 28 minutes. Transfer to a cutting board and slice into squares. Serve warm or at room temperature.