Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??


It seems .pdf-files produced with pdflatex (TeX Live 2012) cannot be used directly by PDF::Reuse (v. 0.35) (at least not by me).

#!/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();

This gives:

An error occurred at ./ line 18 Didn't find pages More information might be found in error.log at ./ line 18

error.log contains:

Didn't find pages The error occurred when executing: at blib/lib/PDF/ (autosplit into blib/lib/auto/PDF/Reuse/anal line 5929 PDF::Reuse::analysera('file.pdf', 1, '') called at blib/lib/PDF/Re (autosplit into blib/lib/auto/PDF/Reuse/ line 3562 PDF::Reuse::prDoc('file.pdf') called at ./ 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

Anyone have any advice, or a possible fix for this?

In reply to PDF::Reuse and pdflatex by atend

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (5)
    As of 2018-03-20 08:51 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (248 votes). Check out past polls.