Hexabinary pdf转换正常。它不显示pdf。
%PDF-1.5%����3 0 obj <>流
curl_setopt($soap_do, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset=utf-8', 'Content-Length: '.strlen($partner_string) ));
$result = curl_exec($soap_do);
$p = xml_parser_create();
xml_parse_into_struct($p, $result, $vals, $index);
xml_parser_free($p);
$data ='';
if(isset($vals[5]['value']))
{
$data=$vals[5]['value'];
}
header("Content-type: application/pdf");
header("Content-Disposition: inline; filename=filename.pdf");
echo hex2bin($data);