EDIT:
I changed my question again:
I am using this library to manipulate PDF files.
I am using this code to serve the output to the browser:
#!perl
use strict;
use warnings;
use lib "..\\mymodules\\CAM-PDF-1.57\\lib";
use CAM::PDF;
my $pdf = CAM::PDF->new('doc1.pdf');
# append the other file
my $anotherpdf = CAM::PDF->new('doc2.pdf');
$pdf->appendPDF($anotherpdf);
print "Content-Type: application/pdf\n";
print "Content-Disposition: inline\n\n";
print "Content-Transfer-Encoding: binary\n";
print "Accept-Ranges: bytes\n\n";
$pdf->output();
The result:
I get only the first pdf file loaded in the browser.
Problem solved:
I had to add $pdf->clean();
before the $pdf->output();
command, and it works perfect. :)