<?php  session_start();

	$method = $_SESSION['method'];
	$name = $_SESSION['name'];
	$pdf = $_SESSION['raw'];

	
	// get bytearray
	//$pdf = $GLOBALS["HTTP_RAW_POST_DATA"];
	
	// add headers for download dialog-box
	header('Content-Type: application/pdf');
	header('Content-Length: '.strlen($pdf));
	header('Content-disposition:'.$method.'; filename="'.$name.'"');
	echo $pdf;
	
	//}  else echo 'An error occured.';

?>


