Skip to content

Commit

Permalink
Actually calculate the length of merged content streams.
Browse files Browse the repository at this point in the history
  • Loading branch information
deven committed Jun 23, 2022
1 parent 32c34c3 commit 95ce840
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/PDF/Data.pm
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ sub merge_content_streams {

# Concatenate stream data and calculate new length.
my $merged = { -data => join("", map { $_->{-data}; } @{$streams}) };
$merged->{Length} = length($merged->{-data});

# Return merged content stream.
return $merged;
Expand Down

0 comments on commit 95ce840

Please sign in to comment.