How about just testing the pdf as a standalone file too?
open(FF, ">","/tmp/holamundo.pdf");
print FF $pdf->Finish();
close(FF);
and view that pdf view a viewer, or drag and dropping into your browser?
I created a small testcase (using miniserver.pl), and your pdf is displayed inline in the browser, with barcode and all, no problems.
(at first I thought you needed extra mime encoding). It maybe the browser?
print $client "HTTP/1.0 200 OK", Socket::CRLF;
print $client "Content-type: application/pdf", Socket::CRLF; #view pdf
+ inline
#print $client "Content-type: application/x-unknown", Socket::CRLF; #
+force a save popup
print $client Socket::CRLF;
my $SLURP = `$localfile`;
print $client $SLURP;