I'm trying to link a web application to a clinical portal in a hospital. The portal links various web enabled applications so the clinician can see things from all sorts of databases all in one view. I am trying to display from our Electrocardiography application a PDF file of an ECG using LWP for display within this portal. When I get the return of the PDF, the adobe acrobat plugin pops up but it comes up blank. For multi page ECG's it comes up with multiple blank pages. I have saved this blank file and looked at it, it seems like it has the same size as a PDF which displays in the inherent web application. Loading this saved file into Adobe from the desktop, its still blank. Some characters hex code are different though (so I'm not sure this is an encoding issue).
Anyone have any thoughts why the PDF file displays
The code I'm using is:
#!c:\Perl\bin\perl.exe
#################################################
## GEMuse_detail.cgi # ## ============================================ # ## - displays patients individual EKG result # ################################################# $| = 1;
use CGI;
use CGI qw/:standard/; use LWP::UserAgent; $dataIn = new CGI; $dataIn->header(); $requestType = $dataIn->param('requestType'); $PatientID = $dataIn->param('PatientID'); $Date = $dataIn->param('Date'); $Time = $dataIn->param('Time'); $TestType = $dataIn->param('TestType'); $Site = $dataIn->param('Site'); $OutputType = $dataIn->param('OutputType'); $Ext = $dataIn->param('Ext'); my $url = "".$PatientID."&Date=".$Date."&Time=".$Time."&TestType=".$TestType."&Site=".$Site."&OutputType=".$OutputType."&Ext=".$Ext'>http://100.200.10.10/musescripts/museweb.dll?RetrieveTestByDateTime?PatientID=".$PatientID."&Date=".$Date."&Time=".$Time."&TestType=".$TestType."&Site=".$Site."&OutputType=".$OutputType."&Ext=".$Ext; my $browser = LWP::UserAgent->new(); $browser->credentials('100.200.10.10:80', '100.200.10.10', 'user' => 'password'); my $response = $browser->get($url); print "Content-type: ".$response->header('Content-type'); print "\n\n"; print $response->content;
|
- using LWP getting a PDF file which comes up blank Churton Budd