#!/usr/bin/env perl
use strict;
use warnings;
use PDF::Reuse;
open my $fh, '>', 'file.tex' or die $!;
print $fh
'
\documentclass{article}
\begin{document}
Nothing to see here.
\end{document}
', "\n";
system "pdflatex file.tex";
prFile( 'result.pdf' );
prDoc( 'file.pdf' );
prEnd();
####
An error occurred
at ./pdfperl.pl line 18
Didn't find pages
More information might be found in
error.log
at ./pdfperl.pl line 18
####
Didn't find pages
The error occurred when executing:
at blib/lib/PDF/Reuse.pm (autosplit into blib/lib/auto/PDF/Reuse/analysera.al) line 5929
PDF::Reuse::analysera('file.pdf', 1, '') called at blib/lib/PDF/Reuse.pm (autosplit into blib/lib/auto/PDF/Reuse/prDoc.al) line 3562
PDF::Reuse::prDoc('file.pdf') called at ./pdfperl.pl line 18
Situation when the error occurred
Bytes written to the current pdf-file, pos = 15
Object processed, not necessarily written objNr = 3
Current pdf-file, utfil = result.pdf
File logging the run, runfil = undef
Local time = Wed Jan 23 14:38:59 2013