Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 6899)
+++ /controller/wpsg_OrderController.class.php	(revision 6901)
@@ -1084,7 +1084,5 @@
 				// Hier die Rechnungen noch einmal nach CDATE sortieren
 				$IDs = $this->db->fetchAssocField("SELECT `id` FROM `".WPSG_TBL_ORDER."` WHERE `id` IN (".wpsg_q(implode(',', $IDs)).") ORDER BY `cdate` ASC");
-
-                ob_start();
-                
+ 
 				require_once WPSG_PATH_LIB.'fpdf/fpdf.php';
 				require_once WPSG_PATH_LIB.'fpdf/fpdi.php';
@@ -1126,6 +1124,6 @@
 
 					}
- 
-                    ob_clean();
+
+                    ob_end_clean();
                     
 					$pdf->Output('rechnungen.pdf', 'I');
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 6899)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 6901)
@@ -560,7 +560,10 @@
 					"mailtext" => $mail_text
 				));
-				
+
+                ob_end_clean();
+                
 				$pdf->Output(basename($rn_file_copy), 'I');
-				die();
+                
+				exit;
 				
 			}
Index: /views/mods/mod_deliverynote/deliverynote_pdf.phtml
===================================================================
--- /views/mods/mod_deliverynote/deliverynote_pdf.phtml	(revision 6899)
+++ /views/mods/mod_deliverynote/deliverynote_pdf.phtml	(revision 6901)
@@ -344,4 +344,6 @@
 	
 	}
+
+    ob_end_clean();
 	
 	if ($this->view['preview'])
Index: /views/mods/mod_rechnungen/accounting_pdf.phtml
===================================================================
--- /views/mods/mod_rechnungen/accounting_pdf.phtml	(revision 6899)
+++ /views/mods/mod_rechnungen/accounting_pdf.phtml	(revision 6901)
@@ -922,8 +922,12 @@
 	
 	$filename = $this->view['filename'].".pdf";
-	 
+
+    ob_end_clean();
+
 	if ($this->view['preview'])
 	{
+	    
 		$pdf->Output($filename, 'I');
+        
 	}
 	else
Index: /views/mods/mod_rechnungen/invoice_pdf.phtml
===================================================================
--- /views/mods/mod_rechnungen/invoice_pdf.phtml	(revision 6899)
+++ /views/mods/mod_rechnungen/invoice_pdf.phtml	(revision 6901)
@@ -922,11 +922,12 @@
 	
 	$filename = $this->view['filename'].".pdf";
-	 
-	if ($this->view['preview'])
-	{
+
+    ob_end_clean();
+
+	if ($this->view['preview']) {
+	    
 		$pdf->Output($filename, 'I');
-	}
-	else
-	{
+        
+	} else {
 		
 		$pdf->Output($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])).$filename, 'F');
Index: /views/mods/mod_voucherproduct/voucher_pdf.phtml
===================================================================
--- /views/mods/mod_voucherproduct/voucher_pdf.phtml	(revision 6899)
+++ /views/mods/mod_voucherproduct/voucher_pdf.phtml	(revision 6901)
@@ -87,16 +87,17 @@
 		
 	}
+
+    ob_end_clean();
 	
-	if ($this->view['preview'] !== true)
-	{
+	if ($this->view['preview'] !== true) {
 		
 		$pdf->Output($this->view['filename'], 'F');
 	
-	}
-	else 
-	{
+	} else {
 		
 		$pdf->Output($this->view['filename'], 'I');
-		die();
+        
+		exit;
+        
 	}
 		
