Step 1Combine the basil, parsley, hazelnuts and oil in a blender or food processor and process until smooth, scraping down the container frequently with a rubber spatula.
Step 2Transfer the mixture to a bowl and stir in the cheese and garlic. Season with salt and pepper to taste.
Step 3Lightly flour a work surface. Cut the puff pastry in half and roll out one half to a thickness of one-eighth inch. Cut it into 3-inch wide strips. Spoon 2 to 3 tablespoons of the pesto down the center of each strip, leaving about a quarter-inch border on the long sides. Fold each strip over lengthwise from each side, overlapping slightly and pressing to seal. Turn the dough over so that the seam side is down. Cut crosswise into 1-inch pieces. Transfer to lightly buttered baking sheets, seam side down. Repeat with the remaining dough and pesto. Chill 30 minutes.
Step 4Heat the oven to 375 degrees. Bake the pastries on the center rack until they are puffed and lightly browned, about 20 minutes. Serve warm or at room temperature.