Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Comment on

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

There is a bug with your regexes. If you want to find a gif filename, you have to use something like this:

add_gif($file) if ($file =~ /\.gif$/);

Otherwise you will also find a file bgifblue.txt for example. The same problem is with the png and jpeg regexes

If this doesn't solve the issues, read on:

How many of your gifs (or pngs) cause the error? All of them or only one? If you look at the code in GIF.pm, it dies when it finds anything else but a 0xF9 after identifying a Graphics Control Extension, which seems to be used for specifiying the animation in animated gifs.

I can think of a few possibilities:

1) If you only have one gif with the problem, it likely is a corrupted gif.

2) If you have only one or a few gifs with the problem, it might be some never version of gif, where there could be something other than 0xF9 at that position

3) If all your gifs have this problem then the parser in GIF.pm is probably bugged

I checked the CPAN source of PDF::API2::Resource::XObject::Image for the png error and I don't see how an undefined value can surface there. Either I didn't see the bug or maybe you have an older version of any of the libraries PDF::API2::Resource::XObject::Image, PDF::API2::Basic::PDF::Utils, PDF::API2::Basic::PDF::Number or PDF::API2::Basic::PDF::String


In reply to Re: PDF::API2 error when adding images to pdf by jethro
in thread PDF::API2 error when adding images to pdf by misterMatt

Title:
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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (17)
    As of 2014-09-23 17:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (232 votes), past polls