I am sorry it took a few days for me to answer your email and I am a
little surprised that prDoc and prSinglePage don't keep the mediaboxes
of the original pages, they should.
To test a little I wrote this little snippet. It takes 1 page from each
pdf-document in the current directory and creates one big document.
use PDF::Reuse;
use strict;
my $dir = '.';
my @pdfs;
my $fileName;
opendir(DIR, $dir) || die "Couldn't open directory . \n";
while ($fileName = readdir(DIR))
{ if (($fileName =~ m/\w+\.pdf$/i) && ($fileName ne 'newfile.pdf'))
{ push @pdfs, $fileName;
}
}
closedir(DIR);
prFile('newfile.pdf');
for (@pdfs)
{
prSinglePage($_);
}
prEnd()
It seems to preserve the format of the original pages.
You need to have a late version of PDF::Reuse, preferably version 0.32,
because last year I changed the way prPage and prDoc cooperate. As I see
it, you probably don't need prMbox or prPage if you use prSinglePage.
PDF::Reuse doesn't care about crop-box or bleed-box, just media-box,
but I guess that's not the problem.
If you haven't got any good explanation here, you could send me your
script and and some of your pdf-documents and I can test on my computer.
Best Regards
Lars Lundberg