Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: PDF::API2 behaving differently on two computers?

by Corion (Pope)
on Apr 08, 2020 at 17:52 UTC ( #11115230=note: print w/replies, xml ) Need Help??

in reply to PDF::API2 behaving differently on two computers?

Can you reduce the program to a very short program that still exhibits the problem? I'm thinking of something like:

#!perl use strict; use warnings; use PDF::API2; print "Using PDF::API2 version $PDF::API2::VERSION\n"; my $pdf = PDF::API2->new; my $bg_file = 'watermark.pdf'; my $bg = $pdf->importPageIntoForm( $bg_file, 1 ); # ... $page->gfx->formimage( $bg, 0, 0, 1.0 ) # write to another file

That would help me understand your steps better and maybe point out where the problem(s) might lie.

Replies are listed 'Best First'.
Re^2: PDF::API2 behaving differently on two computers?
by trillich (Acolyte) on Apr 08, 2020 at 20:42 UTC

    Aha, this was a helpful kick in the pants. When I do a simple script as you suggest, everything works swimmingly. So there's something in the home-grown modules in between, that we are using, that's corrupting things. So at least I have a starting point for sleuthing now.

    One thing I've noticed in the past, is that I must disable $pdf->{forcecompress} = 0. Sometimes it's okay even with forcecompress left enabled, other times it really scrambles the presentation when displaying via a PDF reader (text enormous or skewed or mispositioned on the page). Turning it off makes it so there's dependable display of the results.

    Is that common -- where forcecompress causes issues?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11115230]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2021-10-15 21:01 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (68 votes). Check out past polls.