suggested removing Compress::Zlib

That's a bit strange (because Text::PDF::FlateDecode depends on Compress::Zlib).  But if it works... ;) — although a better option might be to properly install Compress::Zlib, such that it works (it in turn depends on the C library libz (aka "zlib")).

# from Text/PDF/Filter.pm package Text::PDF::FlateDecode; use strict; use vars qw(@ISA $havezlib); @ISA = qw(Text::PDF::Filter); BEGIN { eval {require "Compress/Zlib.pm";}; $havezlib = !$@; } sub new { return undef unless $havezlib; my ($class) = @_; my ($self) = {}; $self->{'outfilt'} = Compress::Zlib::deflateInit(); $self->{'infilt'} = Compress::Zlib::inflateInit(); bless $self, $class; }

And CAM::PDF goes like this:

sub encodeOne ## no critic(Subroutines::ProhibitExcessComplexity) { my $self = shift; my $objnode = shift; my $filtername = shift; (...) my $filt; eval { require Text::PDF::Filter; my $package = "Text::PDF::$filtername"; $filt = $package->new; if (!$filt) { die; } }; if ($EVAL_ERROR) { warn "Failed to open filter $filtername (Text::PDF::$filterna +me)\n"; return 0; } (...)

My guess would be that if that routine returns false, the PDF's content streams simply remain uncompressed  (which is valid PDF format, too, but larger...)


In reply to Re^3: FlateDecode in CAM::PDF by almut
in thread FlateDecode in CAM::PDF by fionbarr

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!
  • 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, details, 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, summary, 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.