Preheat the oven to 400°F (200°C).
In a large bowl, combine chopped spinach, artichoke hearts, cream cheese, sour cream, mozzarella, Parmesan, garlic powder, onion powder, salt, and pepper.
Roll out the puff pastry on a floured surface to fit your baking dish.
Cut the puff pastry into squares, fitting them into greased baking dish.
Spoon the spinach and artichoke mixture into the squares, filling them generously.
Fold the edges of the puff pastry over the filling and press to seal.
Brush the tops of the squares with a little olive oil or butter.
Bake in the preheated oven for 20-25 minutes or until golden brown.
Remove from the oven and let cool slightly before serving.